aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
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();