From c38f60ee1fe22ae21f9bc38a7d4ff5b1be2d2d5a Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 29 Apr 2019 10:18:34 -0700 Subject: add the xold, uxold, etc particle components at runtime if doing boosted frame diagnostics for the particles --- Source/Particles/WarpXParticleContainer.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source/Particles/WarpXParticleContainer.cpp') 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 -- cgit v1.2.3