aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2021-03-18 15:56:00 -0700
committerGravatar GitHub <noreply@github.com> 2021-03-18 15:56:00 -0700
commitf2136795785b551ad5f450da070aa54fedc2630c (patch)
treeb95214470f07339c7cc9a1469ff2cfe5fd77a6c4 /Source/Particles/LaserParticleContainer.cpp
parent588ef1dad873efef664687adb913ae1302dec6e5 (diff)
downloadWarpX-f2136795785b551ad5f450da070aa54fedc2630c.tar.gz
WarpX-f2136795785b551ad5f450da070aa54fedc2630c.tar.zst
WarpX-f2136795785b551ad5f450da070aa54fedc2630c.zip
Add option to deposit current at arbitrary time (#1810)
* Introduce relative_time for deposition * Deposit current at arbitrary time * Update documentation * Combine parameters in DepositCurrent * Explicitly show the time at which the current is deposited
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp
index fe7990725..313fb7944 100644
--- a/Source/Particles/LaserParticleContainer.cpp
+++ b/Source/Particles/LaserParticleContainer.cpp
@@ -516,14 +516,14 @@ LaserParticleContainer::Evolve (int lev,
int* ion_lev = nullptr;
DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, &jx, &jy, &jz,
0, np_current, thread_num,
- lev, lev, dt);
+ lev, lev, dt, -0.5_rt); // Deposit current at t_{n+1/2}
bool has_buffer = cjx;
if (has_buffer){
// Deposit in buffers
DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, cjx, cjy, cjz,
np_current, np-np_current, thread_num,
- lev, lev-1, dt);
+ lev, lev-1, dt, -0.5_rt); // Deposit current at t_{n+1/2}
}
}