diff options
author | 2023-04-10 16:46:01 -0700 | |
---|---|---|
committer | 2023-04-10 16:46:01 -0700 | |
commit | 84eeef7971c26dd23b242a027a659ec59db26d42 (patch) | |
tree | ce040906664d24c27aca1632a8eae38a74baa067 /Source/Evolve/WarpXEvolve.cpp | |
parent | d15f45f19f8b63c748cf5ce037b2251d7b392a66 (diff) | |
download | WarpX-84eeef7971c26dd23b242a027a659ec59db26d42.tar.gz WarpX-84eeef7971c26dd23b242a027a659ec59db26d42.tar.zst WarpX-84eeef7971c26dd23b242a027a659ec59db26d42.zip |
`SyncRho`: Pass References To Charge MultiFabs (#3814)
* `SyncRho`: Pass References To Charge MultiFabs
* Keep a function SyncRho for the Python interface
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r-- | Source/Evolve/WarpXEvolve.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Evolve/WarpXEvolve.cpp b/Source/Evolve/WarpXEvolve.cpp index 94379ad3d..ddf052d35 100644 --- a/Source/Evolve/WarpXEvolve.cpp +++ b/Source/Evolve/WarpXEvolve.cpp @@ -505,12 +505,12 @@ void WarpX::SyncCurrentAndRho () { // TODO Replace current_cp with current_cp_vay once Vay deposition is implemented with MR SyncCurrent(current_fp_vay, current_cp); - SyncRho(); + SyncRho(rho_fp, rho_cp); } else { SyncCurrent(current_fp, current_cp); - SyncRho(); + SyncRho(rho_fp, rho_cp); } } else // no periodic single box @@ -522,7 +522,7 @@ void WarpX::SyncCurrentAndRho () current_deposition_algo != CurrentDepositionAlgo::Vay) { SyncCurrent(current_fp, current_cp); - SyncRho(); + SyncRho(rho_fp, rho_cp); } if (current_deposition_algo == CurrentDepositionAlgo::Vay) @@ -536,7 +536,7 @@ void WarpX::SyncCurrentAndRho () else // FDTD { SyncCurrent(current_fp, current_cp); - SyncRho(); + SyncRho(rho_fp, rho_cp); } } @@ -576,7 +576,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time) // (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(); + SyncRho(rho_fp, rho_cp); // Forward FFT of rho PSATDForwardTransformRho(rho_fp, rho_cp, 0, rho_new); } @@ -640,7 +640,7 @@ WarpX::OneStep_multiJ (const amrex::Real cur_time) // Deposit rho at relative time t_depose_charge mypc->DepositCharge(rho_fp, t_depose_charge); // Filter, exchange boundary, and interpolate across levels - SyncRho(); + SyncRho(rho_fp, rho_cp); // 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); |