aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-07-07 11:20:28 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-07-07 11:20:28 -0700
commita9dde5192caae19bc4198b4ae404c7015c104cf5 (patch)
tree69b7021c348d7144419df0b9e67e3dbcd6b4b938 /Source/Particles/PhysicalParticleContainer.cpp
parent2d623c4f0c219b9bebd1e15d9304a2cd51451dc3 (diff)
downloadWarpX-a9dde5192caae19bc4198b4ae404c7015c104cf5.tar.gz
WarpX-a9dde5192caae19bc4198b4ae404c7015c104cf5.tar.zst
WarpX-a9dde5192caae19bc4198b4ae404c7015c104cf5.zip
avoid duplication in current deposition when using buffers
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 7e7c9534e..1ed318c13 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1529,8 +1529,14 @@ PhysicalParticleContainer::Evolve (int lev,
//
// Current Deposition
//
- DepositCurrent(pti, wp, uxp, uyp, uzp, jx, jy, jz,
- cjx, cjy, cjz, np_current, np, thread_num, lev, dt);
+ // Deposit inside domains
+ DepositCurrent(pti, wp, uxp, uyp, uzp, &jx, &jy, &jz,
+ 0, np_current, thread_num,
+ lev, lev, dt, jx.nGrow());
+ // Deposit in buffers
+ DepositCurrent(pti, wp, uxp, uyp, uzp, cjx, cjy, cjz,
+ np_current, np-np_current, thread_num,
+ lev, lev-1, dt, jx.nGrow());
//
// copy particle data back