diff options
author | 2022-08-15 13:43:38 -0700 | |
---|---|---|
committer | 2022-08-15 13:43:38 -0700 | |
commit | 3bb148ebbc1c8eae47d1f00ab60e68a041289cb6 (patch) | |
tree | 34496fd90e9f9aeb443ebef89a1e15bf643decb3 /Source/Particles/LaserParticleContainer.cpp | |
parent | 960e4d717b637443c2efaa5b6a9718718cbdee06 (diff) | |
download | WarpX-3bb148ebbc1c8eae47d1f00ab60e68a041289cb6.tar.gz WarpX-3bb148ebbc1c8eae47d1f00ab60e68a041289cb6.tar.zst WarpX-3bb148ebbc1c8eae47d1f00ab60e68a041289cb6.zip |
Move handling of do_not_deposit to physics callers (#3225)
* Rearrange in preparation for lifting do_not_deposit higher in the call stack
* Make do_not_deposit public, so callers can test on it
* Make all DepositCharge call sites respect WarpXParticleContainer::do_not_deposit
* Drop check for do_not_deposit in DepositCharge
* Fix comment to accurately describe np_to_depose
* Fix logic to account for other logic in AddSpaceChargeField
* Match zero charge density array to filled array in RZ PSATD case
* Structure control flow per @dpgrote's preference
* Reword comment for clarity
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r-- | Source/Particles/LaserParticleContainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp index 155bc49bc..565ac3ee1 100644 --- a/Source/Particles/LaserParticleContainer.cpp +++ b/Source/Particles/LaserParticleContainer.cpp @@ -585,7 +585,7 @@ LaserParticleContainer::Evolve (int lev, plane_Yp.resize(np); amplitude_E.resize(np); - if (rho && ! skip_deposition) { + if (rho && ! skip_deposition && ! do_not_deposit) { int* AMREX_RESTRICT ion_lev = nullptr; DepositCharge(pti, wp, ion_lev, rho, 0, 0, np_current, thread_num, lev, lev); @@ -639,7 +639,7 @@ LaserParticleContainer::Evolve (int lev, } - if (rho && ! skip_deposition) { + if (rho && ! skip_deposition && ! do_not_deposit) { int* AMREX_RESTRICT ion_lev = nullptr; DepositCharge(pti, wp, ion_lev, rho, 1, 0, np_current, thread_num, lev, lev); |