diff options
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhotonParticleContainer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp index 0e3d80733..77eeb37bc 100644 --- a/Source/Particles/PhotonParticleContainer.cpp +++ b/Source/Particles/PhotonParticleContainer.cpp @@ -164,11 +164,8 @@ PhotonParticleContainer::PushPX (WarpXParIter& pti, ParticleReal x, y, z; GetPosition(i, x, y, z); - amrex::ParticleReal Exp, Eyp, Ezp; - getExternalE(i, Exp, Eyp, Ezp); - - amrex::ParticleReal Bxp, Byp, Bzp; - getExternalB(i, Bxp, Byp, Bzp); + amrex::ParticleReal Exp=0, Eyp=0, Ezp=0; + amrex::ParticleReal Bxp=0, Byp=0, Bzp=0; if(!t_do_not_gather){ // first gather E and B to the particle positions @@ -178,6 +175,8 @@ PhotonParticleContainer::PushPX (WarpXParIter& pti, dx_arr, xyzmin_arr, lo, n_rz_azimuthal_modes, nox, galerkin_interpolation); } + getExternalE(i, Exp, Eyp, Ezp); + getExternalB(i, Bxp, Byp, Bzp); #ifdef WARPX_QED if (local_has_breit_wheeler) { |