diff options
author | 2021-04-13 12:00:17 -0700 | |
---|---|---|
committer | 2021-04-13 12:00:17 -0700 | |
commit | 7b7267ed685b4b045c576004a17ad8090bc6744c (patch) | |
tree | 5b33528e0fe4dee7f91e5d8026132d837de7c45d /Source/Particles/LaserParticleContainer.cpp | |
parent | 599d590e60e480cf2e8a7c766565da1edaf79b0b (diff) | |
download | WarpX-7b7267ed685b4b045c576004a17ad8090bc6744c.tar.gz WarpX-7b7267ed685b4b045c576004a17ad8090bc6744c.tar.zst WarpX-7b7267ed685b4b045c576004a17ad8090bc6744c.zip |
Add an option to skip deposition in the `Evolve` function ; use it for electrostatic (#1807)
* Introduce new option skip_deposition
* Properly implement the option to skip deposition
* Skip deposition for electrostatic solver
* Correct typo
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r-- | Source/Particles/LaserParticleContainer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp index 03b623a6d..c5fe3e4fb 100644 --- a/Source/Particles/LaserParticleContainer.cpp +++ b/Source/Particles/LaserParticleContainer.cpp @@ -418,7 +418,7 @@ LaserParticleContainer::Evolve (int lev, MultiFab* rho, MultiFab* crho, const MultiFab*, const MultiFab*, const MultiFab*, const MultiFab*, const MultiFab*, const MultiFab*, - Real t, Real dt, DtType /*a_dt_type*/) + Real t, Real dt, DtType /*a_dt_type*/, bool skip_deposition) { WARPX_PROFILE("LaserParticleContainer::Evolve()"); WARPX_PROFILE_VAR_NS("LaserParticleContainer::Evolve::ParticlePush", blp_pp); @@ -475,7 +475,7 @@ LaserParticleContainer::Evolve (int lev, plane_Yp.resize(np); amplitude_E.resize(np); - if (rho) { + if (rho && ! skip_deposition) { int* AMREX_RESTRICT ion_lev = nullptr; DepositCharge(pti, wp, ion_lev, rho, 0, 0, np_current, thread_num, lev, lev); @@ -510,7 +510,7 @@ LaserParticleContainer::Evolve (int lev, // Current Deposition // // Deposit inside domains - { + if (! skip_deposition ) { int* ion_lev = nullptr; DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, &jx, &jy, &jz, 0, np_current, thread_num, @@ -525,7 +525,7 @@ LaserParticleContainer::Evolve (int lev, } } - if (rho) { + if (rho && ! skip_deposition) { int* AMREX_RESTRICT ion_lev = nullptr; DepositCharge(pti, wp, ion_lev, rho, 1, 0, np_current, thread_num, lev, lev); |