aboutsummaryrefslogtreecommitdiff
path: root/Source/Laser/LaserParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Laser/LaserParticleContainer.cpp')
-rw-r--r--Source/Laser/LaserParticleContainer.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp
index 515aa1f5d..786ebc622 100644
--- a/Source/Laser/LaserParticleContainer.cpp
+++ b/Source/Laser/LaserParticleContainer.cpp
@@ -453,7 +453,12 @@ LaserParticleContainer::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 (crho) {
+ DepositCharge(pti, wp, crho, 0, np_current, np-np_current, thread_num, lev, lev-1);
+ }
+ }
//
// Particle Push
@@ -522,7 +527,12 @@ LaserParticleContainer::Evolve (int lev,
pti.SetPosition(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, 1, np_current, np, thread_num, lev);
+ if (rho) {
+ DepositCharge(pti, wp, rho, 1, 0, np_current, thread_num, lev, lev);
+ if (crho) {
+ DepositCharge(pti, wp, crho, 1, np_current, np-np_current, thread_num, lev, lev-1);
+ }
+ }
if (cost) {
const Box& tbx = pti.tilebox();