diff options
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 250cf2816..04e7c75d8 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1482,10 +1482,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt, getPosition(ip, xp, yp, zp); amrex::ParticleReal Exp = 0._rt, Eyp = 0._rt, Ezp = 0._rt; - getExternalE(ip, Exp, Eyp, Ezp); - amrex::ParticleReal Bxp = 0._rt, Byp = 0._rt, Bzp = 0._rt; - getExternalB(ip, Bxp, Byp, Bzp); if (!t_do_not_gather){ // first gather E and B to the particle positions @@ -1495,6 +1492,10 @@ PhysicalParticleContainer::PushP (int lev, Real dt, dx_arr, xyzmin_arr, lo, n_rz_azimuthal_modes, nox, galerkin_interpolation); } + // Externally applied E-field in Cartesian co-ordinates + getExternalE(ip, Exp, Eyp, Ezp); + // Externally applied B-field in Cartesian co-ordinates + getExternalB(ip, Bxp, Byp, Bzp); if (do_crr) { amrex::Real qp = q; @@ -1861,10 +1862,7 @@ PhysicalParticleContainer::PushPX (WarpXParIter& pti, getPosition(ip, xp, yp, zp); amrex::ParticleReal Exp = 0._rt, Eyp = 0._rt, Ezp = 0._rt; - getExternalE(ip, Exp, Eyp, Ezp); - amrex::ParticleReal Bxp = 0._rt, Byp = 0._rt, Bzp = 0._rt; - getExternalB(ip, Bxp, Byp, Bzp); if(!t_do_not_gather){ // first gather E and B to the particle positions @@ -1874,6 +1872,10 @@ PhysicalParticleContainer::PushPX (WarpXParIter& pti, dx_arr, xyzmin_arr, lo, n_rz_azimuthal_modes, nox, galerkin_interpolation); } + // Externally applied E-field in Cartesian co-ordinates + getExternalE(ip, Exp, Eyp, Ezp); + // Externally applied B-field in Cartesian co-ordinates + getExternalB(ip, Bxp, Byp, Bzp); scaleFields(xp, yp, zp, Exp, Eyp, Ezp, Bxp, Byp, Bzp); |