From 4c93fb2f90321dab2477eaabe04785100869c073 Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Thu, 6 Aug 2020 06:31:38 -0700 Subject: swap fieldGather and external fields (#1235) * swap fieldGather and external fields * clarify EB external on particle for RZ * swap order and initialize Exp-Bzp for Photons --- Source/Particles/RigidInjectedParticleContainer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Source/Particles/RigidInjectedParticleContainer.cpp') diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index 6cdd99938..1a480aae7 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -471,10 +471,7 @@ RigidInjectedParticleContainer::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); // first gather E and B to the particle positions doGatherShapeN(xp, yp, zp, Exp, Eyp, Ezp, Bxp, Byp, Bzp, @@ -482,6 +479,8 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, ex_type, ey_type, ez_type, bx_type, by_type, bz_type, dx_arr, xyzmin_arr, lo, n_rz_azimuthal_modes, nox, galerkin_interpolation); + getExternalE(ip, Exp, Eyp, Ezp); + getExternalB(ip, Bxp, Byp, Bzp); if (do_crr) { amrex::Real qp = q; -- cgit v1.2.3