diff options
author | 2020-08-06 06:31:38 -0700 | |
---|---|---|
committer | 2020-08-06 06:31:38 -0700 | |
commit | 4c93fb2f90321dab2477eaabe04785100869c073 (patch) | |
tree | a922a0852fee789e05deeadf49d848bf96d95406 /Source/Particles/PhotonParticleContainer.cpp | |
parent | 0564feb5041728173716ef251f1d66d37c314770 (diff) | |
download | WarpX-4c93fb2f90321dab2477eaabe04785100869c073.tar.gz WarpX-4c93fb2f90321dab2477eaabe04785100869c073.tar.zst WarpX-4c93fb2f90321dab2477eaabe04785100869c073.zip |
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
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) { |