aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-08-16 12:53:47 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-08-16 12:53:47 -0700
commita26f56418b18c98e3784d1d48073cae81b938e79 (patch)
treed609a8692e8dd29530d62c87809a54a6699b090d /Source/Particles/PhysicalParticleContainer.cpp
parentc3ce219b9d25e8d28e5a6cc5b878b3c5793cf90a (diff)
parent2d4cf600befb1ef4d5acbefd9d681ff66c11334e (diff)
downloadWarpX-a26f56418b18c98e3784d1d48073cae81b938e79.tar.gz
WarpX-a26f56418b18c98e3784d1d48073cae81b938e79.tar.zst
WarpX-a26f56418b18c98e3784d1d48073cae81b938e79.zip
Merge branch 'dev' into RZgeometry
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index d4cb71059..c44a9a8b7 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1157,7 +1157,12 @@ PhysicalParticleContainer::Evolve (int lev,
pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]);
BL_PROFILE_VAR_STOP(blp_copy);
- if (rho) DepositCharge(pti, wp, rho, crho, 0, np_current, np, thread_num, lev);
+ if (rho) {
+ DepositCharge(pti, wp, rho, 0, 0, np_current, thread_num, lev, lev);
+ if (has_buffer){
+ DepositCharge(pti, wp, crho, 0, np_current, np-np_current, thread_num, lev, lev-1);
+ }
+ }
if (! do_not_push)
{
@@ -1295,7 +1300,12 @@ PhysicalParticleContainer::Evolve (int lev,
BL_PROFILE_VAR_STOP(blp_copy);
}
- if (rho) DepositCharge(pti, wp, rho, crho, 1, np_current, np, thread_num, lev);
+ if (rho) {
+ DepositCharge(pti, wp, rho, 1, 0, np_current, thread_num, lev, lev);
+ if (has_buffer){
+ DepositCharge(pti, wp, crho, 1, np_current, np-np_current, thread_num, lev, lev-1);
+ }
+ }
if (cost) {
const Box& tbx = pti.tilebox();