aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-08-02 17:25:35 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-08-02 17:25:35 -0700
commit43ef6e29a1eeba61b9fdb95efb1bb1e301ba1b6d (patch)
tree8915f3a54b479fca96aa6d2dd2a655516edc938a /Source/Particles/PhysicalParticleContainer.cpp
parentd2b7952caeccf6fad0a45d8dea3dfb84d6559a04 (diff)
downloadWarpX-43ef6e29a1eeba61b9fdb95efb1bb1e301ba1b6d.tar.gz
WarpX-43ef6e29a1eeba61b9fdb95efb1bb1e301ba1b6d.tar.zst
WarpX-43ef6e29a1eeba61b9fdb95efb1bb1e301ba1b6d.zip
PushP now uses FIeldGather
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index a34fb69e2..89ea3c9f3 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1647,6 +1647,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt,
const int ll4symtry = false;
long lvect_fieldgathe = 64;
+#ifdef WARPX_RZ
warpx_geteb_energy_conserving(
&np,
m_xp[thread_num].dataPtr(),
@@ -1666,6 +1667,12 @@ PhysicalParticleContainer::PushP (int lev, Real dt,
BL_TO_FORTRAN_ANYD(bzfab),
&ll4symtry, &WarpX::l_lower_order_in_v, &WarpX::do_nodal,
&lvect_fieldgathe, &WarpX::field_gathering_algo);
+#else
+ int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal();
+ FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp,
+ &exfab, &eyfab, &ezfab, &bxfab, &byfab, &bzfab,
+ Ex.nGrow(), e_is_nodal, 0, np, thread_num, lev, lev);
+#endif
// This wraps the momentum advance so that inheritors can modify the call.
// Extract pointers to the different particle quantities