aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-07-08 10:25:57 -0700
committerGravatar GitHub <noreply@github.com> 2019-07-08 10:25:57 -0700
commit2ebbffb0d1408751aac0ea78a9bc1dc9d7e577d6 (patch)
tree05bc545e482e59aaefe5b39431ddce3b22cedb3b /Source/Particles/PhysicalParticleContainer.cpp
parent2d623c4f0c219b9bebd1e15d9304a2cd51451dc3 (diff)
parent3ad66d17dcbca4b94ecab60e3ab53282e7552547 (diff)
downloadWarpX-2ebbffb0d1408751aac0ea78a9bc1dc9d7e577d6.tar.gz
WarpX-2ebbffb0d1408751aac0ea78a9bc1dc9d7e577d6.tar.zst
WarpX-2ebbffb0d1408751aac0ea78a9bc1dc9d7e577d6.zip
Merge pull request #195 from ECP-WarpX/avoid_duplication_CD
Small PR to merge current deposition inside and outside buffers
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 7e7c9534e..43b46ec49 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1529,8 +1529,16 @@ 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);
+ if (has_buffer){
+ // Deposit in buffers
+ DepositCurrent(pti, wp, uxp, uyp, uzp, cjx, cjy, cjz,
+ np_current, np-np_current, thread_num,
+ lev, lev-1, dt);
+ }
//
// copy particle data back