aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index 09f51ef49..06000a32f 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -18,6 +18,7 @@
using namespace amrex;
int WarpXParticleContainer::do_not_push = 0;
+int WarpXParticleContainer::do_not_deposit_current = 0;
WarpXParIter::WarpXParIter (ContainerType& pc, int level)
: ParIter(pc, level, MFItInfo().SetDynamic(WarpX::do_dynamic_scheduling))
@@ -121,6 +122,7 @@ WarpXParticleContainer::ReadParameters ()
#endif
pp.query("do_tiling", do_tiling);
pp.query("do_not_push", do_not_push);
+ pp.query("do_not_deposit_current", do_not_deposit_current);
initialized = true;
}
@@ -271,6 +273,9 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti,
// If no particles, do not do anything
if (np_to_depose == 0) return;
+ // If user decides not to deposit current
+ if (do_not_deposit_current) return;
+
const long ngJ = jx->nGrow();
const std::array<Real,3>& dx = WarpX::CellSize(std::max(depos_lev,0));
Real q = this->charge;