aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.H
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers@lbl.gov> 2020-06-22 09:28:16 -0700
committerGravatar GitHub <noreply@github.com> 2020-06-22 09:28:16 -0700
commitf4978e1001494e2b148128380fb37f3c2450209f (patch)
tree237a671ca194338411f16f52797e70114b220384 /Source/Particles/WarpXParticleContainer.H
parent97755d1c2e04e5b8c3295182eaff472c73cf8a53 (diff)
downloadWarpX-f4978e1001494e2b148128380fb37f3c2450209f.tar.gz
WarpX-f4978e1001494e2b148128380fb37f3c2450209f.tar.zst
WarpX-f4978e1001494e2b148128380fb37f3c2450209f.zip
Remove persistent E+B (#1050)
* add functor for doing the tmp particles copy for the back-transformed diagnosti * merge the particle push options into one kernel * EOL * fix assertion * add a FieldGatherandPushPX method to PhysicalParticleContainer * handle offset in copyAttribs * allow this functor to be constructed even it we aren't doing the back transformed diagnostics * EOL * update the overloads of PushPX for the Photon and RigidInjected ParticleContainers * function for dispatching the right field gather * init this val to 0.0 * fix some typos * handle scaling the fields for rigid injection * EOL * don't need to get pointers to E and B arrays in PushPX any more. * actually I can't remove these yet * EOL * variable order bug * move the QED stuff to the proper place * EOL * make sure we don't build these functors unless the runtime options are toggled * EOL * perform the field gather prior to the photon particle push * remove E and B components and FieldGather methods. Reimplement PushP for rigid injected and physical particles * update ionization to do field gather inline * remove E and B from the particle diagnostics * don't write E or B in these tests for particles * add missing files * remove EB from the Regtest ini file too * no need to do this twice * important typo * also do the gather inline for the QED processes that need to * move these sources inside ifdef for QED * fix bug in RZ * remove some fields from the Python tests. * remove all particle E and B comps from json benchmarks * don't assert that Ey is the langmuir output * remove uy from this output * update test * restore the mesh fields I turned off by mistake * turn off field IO for a few python tests I missed * fix typo * reset Langmuir_multi benchmark * update Langmuir_multi_nodal benchmark * update single precision langmuir bench * update psatd single precision languir one too * also do ionization_lab * finally, ionizaiton_boost * update benchmarks_json/Langmuir_multi_psatd.json * update benchmarks_json/Langmuir_multi_psatd_current_correction.json * update benchmarks_json/Langmuir_multi_psatd_momentum_conserving.json * update benchmarks_json/Langmuir_multi_psatd_nodal.json * remove the particle E and B from the choices in the docs * fix offset bug * also add the Gather subdirectory * Update Source/WarpX.H Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * add docstring for LowerCornerWithGalilean * add new source files to CMakeLists.txt * also need to update the GPU regression tests * update the name of the output file for this python test * remove field gather call from FieldDiagnostics * fix typo in docstring * init fields to 0 * add docstring to the CopyParticleAttribs constructor * some explicit amrex::namepace Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.H')
-rw-r--r--Source/Particles/WarpXParticleContainer.H26
1 files changed, 7 insertions, 19 deletions
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H
index 8bc4491d7..33769c61c 100644
--- a/Source/Particles/WarpXParticleContainer.H
+++ b/Source/Particles/WarpXParticleContainer.H
@@ -32,7 +32,7 @@ struct PIdx
{
enum { // Particle Attributes stored in amrex::ParticleContainer's struct of array
w = 0, // weight
- ux, uy, uz, Ex, Ey, Ez, Bx, By, Bz,
+ ux, uy, uz,
#ifdef WARPX_DIM_RZ
theta, // RZ needs all three position components
#endif
@@ -65,14 +65,8 @@ namespace ParticleStringNames
{"ux", PIdx::ux },
{"uy", PIdx::uy },
{"uz", PIdx::uz },
- {"Ex", PIdx::Ex },
- {"Ey", PIdx::Ey },
- {"Ez", PIdx::Ez },
- {"Bx", PIdx::Bx },
- {"By", PIdx::By },
- {"Bz", PIdx::Bz }
#ifdef WARPX_DIM_RZ
- ,{"theta", PIdx::theta}
+ {"theta", PIdx::theta}
#endif
};
}
@@ -85,6 +79,8 @@ public:
WarpXParIter (ContainerType& pc, int level);
+ WarpXParIter (ContainerType& pc, int level, amrex::MFItInfo& info);
+
const std::array<RealVector, PIdx::nattribs>& GetAttribs () const {
return GetStructOfArrays().GetRealData();
}
@@ -128,9 +124,7 @@ class MultiParticleContainer;
* 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).
+ * derived classes, e.g., Evolve) or actual functions (e.g. CurrentDeposition).
*/
class WarpXParticleContainer
: public amrex::ParticleContainer<0,0,PIdx::nattribs>
@@ -155,14 +149,6 @@ public:
virtual void InitData () = 0;
- virtual void FieldGatherES (const amrex::Vector<std::array<std::unique_ptr<amrex::MultiFab>, 3> >& E,
- const amrex::Vector<std::unique_ptr<amrex::FabArray<amrex::BaseFab<int> > > >& masks) {}
-
- virtual void FieldGather (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) {}
-
/**
* Evolve is the central WarpXParticleContainer function that advances
* particles for a time dt (typically one timestep). It is a pure virtual
@@ -342,6 +328,8 @@ public:
template<PhysicalSpecies PhysSpec>
bool AmIA () const noexcept {return (physical_species == PhysSpec);}
+ amrex::Array<amrex::Real,3> get_v_galilean () {return v_galilean;}
+
protected:
amrex::Array<amrex::Real,3> v_galilean = {{0}};
std::map<std::string, int> particle_comps;