aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2021-12-06 20:21:43 -0800
committerGravatar GitHub <noreply@github.com> 2021-12-07 04:21:43 +0000
commit9830a8246ec7c060f5f6690a717bd465514c9bd2 (patch)
tree0f7241d5bc36c8cc5718c9ae1d36b0463ca4b5c1 /Source/Particles/PhysicalParticleContainer.cpp
parent749a4c0d8bce01df5bd886f5c452a76c607a850d (diff)
downloadWarpX-9830a8246ec7c060f5f6690a717bd465514c9bd2.tar.gz
WarpX-9830a8246ec7c060f5f6690a717bd465514c9bd2.tar.zst
WarpX-9830a8246ec7c060f5f6690a717bd465514c9bd2.zip
Transform the external fields into the boosted frame (#2610)
They should be specified in the lab frame
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index bd8c9435d..c669d976a 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -2118,8 +2118,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt,
const auto getPosition = GetParticlePosition(pti);
- const auto getExternalE = GetExternalEField(pti);
- const auto getExternalB = GetExternalBField(pti);
+ const auto getExternalEB = GetExternalEBField(pti);
const auto& xyzmin = WarpX::GetInstance().LowerCornerWithGalilean(box,m_v_galilean,lev);
@@ -2181,10 +2180,8 @@ 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);
+ // Externally applied E and B-field in Cartesian co-ordinates
+ getExternalEB(ip, Exp, Eyp, Ezp, Bxp, Byp, Bzp);
if (do_crr) {
amrex::Real qp = q;
@@ -2467,8 +2464,7 @@ PhysicalParticleContainer::PushPX (WarpXParIter& pti,
const auto getPosition = GetParticlePosition(pti, offset);
auto setPosition = SetParticlePosition(pti, offset);
- const auto getExternalE = GetExternalEField(pti, offset);
- const auto getExternalB = GetExternalBField(pti, offset);
+ const auto getExternalEB = GetExternalEBField(pti, offset);
// Lower corner of tile box physical domain (take into account Galilean shift)
Real cur_time = WarpX::GetInstance().gett_new(lev);
@@ -2584,10 +2580,8 @@ 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);
+ // Externally applied E and B-field in Cartesian co-ordinates
+ getExternalEB(ip, Exp, Eyp, Ezp, Bxp, Byp, Bzp);
scaleFields(xp, yp, zp, Exp, Eyp, Ezp, Bxp, Byp, Bzp);