aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.H
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-12-23 14:04:37 -0800
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-12-23 14:04:37 -0800
commit2ebae955f208d63fe781613cb511ff57b5da836a (patch)
tree08d29fc0954aeb1c539d9549ba00bad5080b6ada /Source/Particles/WarpXParticleContainer.H
parent4b5b142d63f047a94919e24b8849841560e7be15 (diff)
parentdb13c6aa943753b514479aa7e0049921937c8846 (diff)
downloadWarpX-2ebae955f208d63fe781613cb511ff57b5da836a.tar.gz
WarpX-2ebae955f208d63fe781613cb511ff57b5da836a.tar.zst
WarpX-2ebae955f208d63fe781613cb511ff57b5da836a.zip
Merge branch 'dev' into comm
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.H')
-rw-r--r--Source/Particles/WarpXParticleContainer.H29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H
index 567bb402d..fa5c586da 100644
--- a/Source/Particles/WarpXParticleContainer.H
+++ b/Source/Particles/WarpXParticleContainer.H
@@ -101,8 +101,32 @@ public:
}
};
+// Forward-declaration needed by WarpXParticleContainer below
class MultiParticleContainer;
+/**
+ * WarpXParticleContainer is the base polymorphic class from which all concrete
+ * particle container classes (that store a collection of particles) derive. Derived
+ * classes can be used for plasma particles, photon particles, or non-physical
+ * particles (e.g., for the laser antenna).
+ * It derives from amrex::ParticleContainer<0,0,PIdx::nattribs>, where the
+ * template arguments stand for the number of int and amrex::Real SoA and AoS
+ * data in amrex::Particle.
+ * - AoS amrex::Real: x, y, z (default), 0 additional (first template
+ * parameter)
+ * - AoS int: id, cpu (default), 0 additional (second template parameter)
+ * - SoA amrex::Real: PIdx::nattribs (third template parameter), see PIdx for
+ * the list.
+ *
+ * WarpXParticleContainer contains the main functions for initialization,
+ * interaction with the grid (field gather and current deposition) and particle
+ * push.
+ *
+ * Note: many functions are pure virtual (meaning they MUST be defined in
+ * derived classes, e.g., Evolve) or empty function (meaning they
+ * do not do anything, e.g., FieldGather, meant to be overriden by derived
+ * function) or actual functions (e.g. CurrentDeposition).
+ */
class WarpXParticleContainer
: public amrex::ParticleContainer<0,0,PIdx::nattribs>
{
@@ -140,6 +164,11 @@ public:
amrex::Real t, amrex::Real dt) = 0;
#endif // WARPX_DO_ELECTROSTATIC
+ /**
+ * Evolve is the central WarpXParticleContainer function that advances
+ * particles for a time dt (typically one timestep). It is a pure virtual
+ * function for flexibility.
+ */
virtual void Evolve (int lev,
const amrex::MultiFab& Ex, const amrex::MultiFab& Ey, const amrex::MultiFab& Ez,
const amrex::MultiFab& Bx, const amrex::MultiFab& By, const amrex::MultiFab& Bz,