Skip to content

Commit

Permalink
Merge branch 'hackathon-field-register' of https://github.com/ax3l/WarpX
Browse files Browse the repository at this point in the history
 into add_electron_fluid_container_hybrid_solver
  • Loading branch information
marcoacc95 committed Sep 20, 2024
2 parents 4a80a20 + 54bdb71 commit f4618b9
Show file tree
Hide file tree
Showing 12 changed files with 250 additions and 262 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 028638564f7be0694b9898f8d4088cdbf9a6f9f5 && cd -
cd ../amrex && git checkout --detach 3734079379bb6b2a3850d197241f6b2c3b3bfa7d && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4
ccache -s
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ jobs:
run: |
$env:PATH += ';C:/Program Files (x86)/WarpX/bin/'
python3 Examples/Tests/gaussian_beam/inputs_test_3d_gaussian_beam_picmi.py
$job = Start-ThreadJob -Name "test" -ScriptBlock { & "python3" "Examples/Tests/gaussian_beam/inputs_test_3d_gaussian_beam_picmi.py" }
Start-Sleep -Seconds 120
Stop-Job $job.Id
$jobOutput = $job | Receive-Job
$jobOutput
cat Backtrace.0
# JSON writes are currently very slow (50min) with MSVC
# --diagformat=openpmd

Expand Down
10 changes: 10 additions & 0 deletions Docs/source/highlights.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ Scientific works in laser-ion acceleration and laser-matter interaction.
Physical Review Research **6**, 033148, 2024.
`DOI:10.1103/PhysRevResearch.6.033148 <https://doi.org/10.1103/PhysRevResearch.6.033148>`__

#. Zaïm N, Sainte-Marie A, Fedeli L, Bartoli P, Huebl A, Leblanc A, Vay J-L, Vincenti H.
**Light-matter interaction near the Schwinger limit using tightly focused doppler-boosted lasers**.
Physical Review Letters **132**, 175002, 2024.
`DOI:10.1103/PhysRevLett.132.175002 <https://doi.org/10.1103/PhysRevLett.132.175002>`__

#. Knight B, Gautam C, Stoner C, Egner B, Smith J, Orban C, Manfredi J, Frische K, Dexter M, Chowdhury E, Patnaik A (2023).
**Detailed Characterization of a kHz-rate Laser-Driven Fusion at a Thin Liquid Sheet with a Neutron Detection Suite**.
High Power Laser Science and Engineering, 1-13, 2023.
Expand All @@ -110,6 +115,11 @@ Scientific works in laser-ion acceleration and laser-matter interaction.
Phys. Rev. Accel. Beams **25**, 093402, 2022.
`DOI:10.1103/PhysRevAccelBeams.25.093402 <https://doi.org/10.1103/PhysRevAccelBeams.25.093402>`__

#. Fedeli L, Sainte-Marie A, Zaïm N, Thévenet M, Vay J-L, Myers A, Quéré F, Vincenti H.
**Probing strong-field QED with Doppler-boosted PetaWatt-class lasers**.
Physical Review Letters **127**, 114801, 2021.
`DOI:10.1103/PhysRevLett.127.114801 <https://doi.org/10.1103/PhysRevLett.127.114801>`__


Particle Accelerator & Beam Physics
***********************************
Expand Down
35 changes: 14 additions & 21 deletions Source/Evolve/WarpXEvolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
// Initialize multi-J loop:

// 1) Prepare E,B,F,G fields in spectral space
PSATDForwardTransformEB(
m_fields.get_mr_levels_alldirs("Efield_fp", finest_level),
m_fields.get_mr_levels_alldirs("Bfield_fp", finest_level),
m_fields.get_mr_levels_alldirs("Efield_cp", finest_level),
m_fields.get_mr_levels_alldirs("Bfield_cp", finest_level) );
PSATDForwardTransformEB();
if (WarpX::do_dive_cleaning) { PSATDForwardTransformF(); }
if (WarpX::do_divb_cleaning) { PSATDForwardTransformG(); }

Expand All @@ -681,16 +677,18 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
// (after checking that pointer to rho_fp on MR level 0 is not null)
if (m_fields.has("rho_fp", 0) && rho_in_time == RhoInTime::Linear)
{
const ablastr::fields::MultiLevelScalarField rho_fp = m_fields.get_mr_levels("rho_fp", finest_level);
const ablastr::fields::MultiLevelScalarField rho_cp = m_fields.get_mr_levels("rho_fp", finest_level);
ablastr::fields::MultiLevelScalarField const rho_fp = m_fields.get_mr_levels("rho_fp", finest_level);

std::string const rho_fp_string = "rho_fp";
std::string const rho_cp_string = "rho_cp";

// Deposit rho at relative time -dt
// (dt[0] denotes the time step on mesh refinement level 0)
mypc->DepositCharge(rho_fp, -dt[0]);
// Filter, exchange boundary, and interpolate across levels
SyncRho();
// Forward FFT of rho
PSATDForwardTransformRho(rho_fp, rho_cp, 0, rho_new);
PSATDForwardTransformRho(rho_fp_string, rho_cp_string, 0, rho_new);
}

// 4) Deposit J at relative time -dt with time step dt
Expand All @@ -706,9 +704,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
// of guard cells.
SyncCurrent("current_fp");
// Forward FFT of J
PSATDForwardTransformJ(
m_fields.get_mr_levels_alldirs( "current_fp", finest_level),
m_fields.get_mr_levels_alldirs( "current_cp", finest_level) );
PSATDForwardTransformJ("current_fp", "current_cp");
}

// Number of depositions for multi-J scheme
Expand Down Expand Up @@ -742,16 +738,16 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
// of guard cells.
SyncCurrent("current_fp");
// Forward FFT of J
PSATDForwardTransformJ(
m_fields.get_mr_levels_alldirs( "current_fp", finest_level),
m_fields.get_mr_levels_alldirs( "current_cp", finest_level) );
PSATDForwardTransformJ("current_fp", "current_cp");

// Deposit new rho
// (after checking that pointer to rho_fp on MR level 0 is not null)
if (m_fields.has("rho_fp", 0))
{
const ablastr::fields::MultiLevelScalarField rho_fp = m_fields.get_mr_levels("rho_fp", finest_level);
const ablastr::fields::MultiLevelScalarField rho_cp = m_fields.get_mr_levels("rho_cp", finest_level);
ablastr::fields::MultiLevelScalarField const rho_fp = m_fields.get_mr_levels("rho_fp", finest_level);

std::string const rho_fp_string = "rho_fp";
std::string const rho_cp_string = "rho_cp";

// Move rho from new to old if rho is linear in time
if (rho_in_time == RhoInTime::Linear) { PSATDMoveRhoNewToRhoOld(); }
Expand All @@ -762,7 +758,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
SyncRho();
// Forward FFT of rho
const int rho_idx = (rho_in_time == RhoInTime::Linear) ? rho_new : rho_mid;
PSATDForwardTransformRho(rho_fp, rho_cp, 0, rho_idx);
PSATDForwardTransformRho(rho_fp_string, rho_cp_string, 0, rho_idx);
}

if (WarpX::current_correction)
Expand All @@ -778,10 +774,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time)
// (the relative time reached here coincides with an integer full time step)
if (i_deposit == n_deposit-1)
{
PSATDBackwardTransformEB(m_fields.get_mr_levels_alldirs("Efield_fp", max_level),
m_fields.get_mr_levels_alldirs("Bfield_fp", max_level),
m_fields.get_mr_levels_alldirs("Efield_cp", max_level),
m_fields.get_mr_levels_alldirs("Bfield_cp", max_level));
PSATDBackwardTransformEB();
if (WarpX::do_dive_cleaning) { PSATDBackwardTransformF(); }
if (WarpX::do_divb_cleaning) { PSATDBackwardTransformG(); }
}
Expand Down
Loading

0 comments on commit f4618b9

Please sign in to comment.