aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Yinjian Zhao <yinjianzhao@lbl.gov> 2020-02-11 21:41:07 -0700
committerGravatar GitHub <noreply@github.com> 2020-02-11 20:41:07 -0800
commitb96467d085fd45e750c0db084dfba723ff9caa79 (patch)
tree24664f89ddae5ec8b43718ab5660da19eaef2485 /Source/Particles/PhysicalParticleContainer.cpp
parent5629874c1df9d707ebf1ca939becb90c83e5cfc1 (diff)
downloadWarpX-b96467d085fd45e750c0db084dfba723ff9caa79.tar.gz
WarpX-b96467d085fd45e750c0db084dfba723ff9caa79.tar.zst
WarpX-b96467d085fd45e750c0db084dfba723ff9caa79.zip
Add do_not_gather. (#705)
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 0277a9fe6..dd1407c8b 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -51,6 +51,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp
pp.query("do_splitting", do_splitting);
pp.query("split_type", split_type);
pp.query("do_not_deposit", do_not_deposit);
+ pp.query("do_not_gather", do_not_gather);
pp.query("do_not_push", do_not_push);
pp.query("do_continuous_injection", do_continuous_injection);
@@ -2181,7 +2182,8 @@ PhysicalParticleContainer::FieldGather (WarpXParIter& pti,
(gather_lev==(lev )),
"Gather buffers only work for lev-1");
// If no particles, do not do anything
- if (np_to_gather == 0) return;
+ // If do_not_gather = 1 by user, do not do anything
+ if (np_to_gather == 0 || do_not_gather) return;
// initializing the field value to the externally applied field before
// gathering fields from the grid to the particles.