aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2022-04-20 14:10:11 -0700
committerGravatar GitHub <noreply@github.com> 2022-04-20 14:10:11 -0700
commitf316aa4e8c199e012ef04c26e1539dee8e682bd2 (patch)
treef3bfcb72376f5dd747db6a1a4dced13e0b5d0e59 /Source/Particles/LaserParticleContainer.cpp
parente538399d99121d37ece3d23f4444342117a9a723 (diff)
downloadWarpX-f316aa4e8c199e012ef04c26e1539dee8e682bd2.tar.gz
WarpX-f316aa4e8c199e012ef04c26e1539dee8e682bd2.tar.zst
WarpX-f316aa4e8c199e012ef04c26e1539dee8e682bd2.zip
Current Deposition Interfaces: Always Pass `dt` & `relative_time` (#2937)
* Current Deposition Interfaces: Always Pass `dt` & `relative_time` * Fix CI Failures * Fix 1D/RZ Warnings * Fix RZ Bug * Fix Bugs * Minimize Changes, Fix Roundoff Errors * Cleaning * Remove dt From doDepositionShapeN * Cleaning Esirkepov Deposition * Cleaning Vay Deposition * Fix Roundoff Errors * Fix Roundoff Errors (continued) * Fix Bug (RZ)
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp
index e29a401d0..22ffb2a5f 100644
--- a/Source/Particles/LaserParticleContainer.cpp
+++ b/Source/Particles/LaserParticleContainer.cpp
@@ -601,22 +601,25 @@ LaserParticleContainer::Evolve (int lev,
amplitude_E.dataPtr(), dt);
WARPX_PROFILE_VAR_STOP(blp_pp);
- //
// Current Deposition
- //
- // Deposit inside domains
- if (! skip_deposition ) {
+ if (skip_deposition == false)
+ {
+ // Deposit at t_{n+1/2}
+ amrex::Real relative_time = -0.5_rt * dt;
+
int* ion_lev = nullptr;
+ // Deposit inside domains
DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, &jx, &jy, &jz,
0, np_current, thread_num,
- lev, lev, dt, -0.5_rt); // Deposit current at t_{n+1/2}
+ lev, lev, dt, relative_time);
- bool has_buffer = cjx;
- if (has_buffer){
+ const 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, -0.5_rt); // Deposit current at t_{n+1/2}
+ lev, lev-1, dt, relative_time);
}
}