aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-08-09 21:04:27 -0700
committerGravatar GitHub <noreply@github.com> 2019-08-09 21:04:27 -0700
commit411d91f015f1c15796cebd41903beab5cd06f852 (patch)
tree66022a1f0835d0bd9f6cf6d2cc4838eb57dbd5d8 /Source/Particles/PhysicalParticleContainer.cpp
parenta7c1afcba8dc443806780a85b8bbea3a13cc65e6 (diff)
parenta38e581301c7be825a6b7ca0d742fd714aef882d (diff)
downloadWarpX-411d91f015f1c15796cebd41903beab5cd06f852.tar.gz
WarpX-411d91f015f1c15796cebd41903beab5cd06f852.tar.zst
WarpX-411d91f015f1c15796cebd41903beab5cd06f852.zip
Merge pull request #263 from ECP-WarpX/convert_charge_deposition
Convert charge deposition
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 59d3ce76f..d10390204 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1156,7 +1156,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)
{
@@ -1292,7 +1297,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();