aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Gather/GetExternalFields.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/Gather/GetExternalFields.H')
-rw-r--r--Source/Particles/Gather/GetExternalFields.H6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Particles/Gather/GetExternalFields.H b/Source/Particles/Gather/GetExternalFields.H
index 92f1a21bc..ff107dce5 100644
--- a/Source/Particles/Gather/GetExternalFields.H
+++ b/Source/Particles/Gather/GetExternalFields.H
@@ -13,13 +13,12 @@
#include <AMReX_Parser.H>
#include <AMReX_REAL.H>
-enum ExternalFieldInitType { None, Constant, Parser, RepeatedPlasmaLens, Unknown };
-
/** \brief Functor class that assigns external
* field values (E and B) to particles.
*/
struct GetExternalEBField
{
+ enum ExternalFieldInitType { None, Constant, Parser, RepeatedPlasmaLens, Unknown };
GetExternalEBField () = default;
@@ -56,6 +55,9 @@ struct GetExternalEBField
const amrex::ParticleReal* AMREX_RESTRICT m_uz = nullptr;
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
+ bool isNoOp () const { return (m_Etype == None && m_Btype == None); }
+
+ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void operator () (long i,
amrex::ParticleReal& field_Ex,
amrex::ParticleReal& field_Ey,