aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2019-04-29 10:18:34 -0700
committerGravatar Andrew Myers <atmyers2@gmail.com> 2019-04-29 10:18:34 -0700
commitc38f60ee1fe22ae21f9bc38a7d4ff5b1be2d2d5a (patch)
treea559e93eda8494ec1c106197d56f20067bde08ed /Source/Particles/WarpXParticleContainer.cpp
parentd6d9c796040e14dc0fe50e96bc2b1231d953a01e (diff)
downloadWarpX-c38f60ee1fe22ae21f9bc38a7d4ff5b1be2d2d5a.tar.gz
WarpX-c38f60ee1fe22ae21f9bc38a7d4ff5b1be2d2d5a.tar.zst
WarpX-c38f60ee1fe22ae21f9bc38a7d4ff5b1be2d2d5a.zip
add the xold, uxold, etc particle components at runtime if doing boosted frame diagnostics for the particles
Diffstat (limited to '')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index c52e0a6d0..567a3ff51 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -63,6 +63,21 @@ WarpXParticleContainer::WarpXParticleContainer (AmrCore* amr_core, int ispecies)
SetParticleSize();
ReadParameters();
+ // build up the map of string names to particle component numbers
+ particle_comps["w"] = PIdx::w;
+ particle_comps["ux"] = PIdx::ux;
+ particle_comps["uy"] = PIdx::uy;
+ particle_comps["uz"] = PIdx::uz;
+ particle_comps["Ex"] = PIdx::Ex;
+ particle_comps["Ey"] = PIdx::Ey;
+ particle_comps["Ez"] = PIdx::Ez;
+ particle_comps["Bx"] = PIdx::Bx;
+ particle_comps["By"] = PIdx::By;
+ particle_comps["Bz"] = PIdx::Bz;
+#ifdef WARPX_RZ
+ particle_comps["theta"] = PIdx::theta;
+#endif
+
// Initialize temporary local arrays for charge/current deposition
int num_threads = 1;
#ifdef _OPENMP