aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2020-02-10 11:20:10 -0800
committerGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2020-02-10 11:20:10 -0800
commitf9e92c4e2a774100eccbe516b9608944fdb160ff (patch)
treeea7e0649d5b9a18b7974a1ee4a3d3c75ec42375e /Source/Particles/MultiParticleContainer.cpp
parentf65189fec6394faf798e29193cc20be07e56dfe6 (diff)
downloadWarpX-f9e92c4e2a774100eccbe516b9608944fdb160ff.tar.gz
WarpX-f9e92c4e2a774100eccbe516b9608944fdb160ff.tar.zst
WarpX-f9e92c4e2a774100eccbe516b9608944fdb160ff.zip
template Parser so that it works for any number of variables
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index ac3bac467..6252d1ac4 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -130,12 +130,12 @@ MultiParticleContainer::ReadParameters ()
str_Bz_ext_particle_function);
// Parser for B_external on the particle
- m_Bx_particle_parser.reset(new ParserWrapper(
- makeParser(str_Bx_ext_particle_function)));
- m_By_particle_parser.reset(new ParserWrapper(
- makeParser(str_By_ext_particle_function)));
- m_Bz_particle_parser.reset(new ParserWrapper(
- makeParser(str_Bz_ext_particle_function)));
+ m_Bx_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_Bx_ext_particle_function,{"x","y","z","t"})));
+ m_By_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_By_ext_particle_function,{"x","y","z","t"})));
+ m_Bz_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_Bz_ext_particle_function,{"x","y","z","t"})));
}
@@ -155,12 +155,12 @@ MultiParticleContainer::ReadParameters ()
Store_parserString(pp, "Ez_external_particle_function(x,y,z,t)",
str_Ez_ext_particle_function);
// Parser for E_external on the particle
- m_Ex_particle_parser.reset(new ParserWrapper(
- makeParser(str_Ex_ext_particle_function)));
- m_Ey_particle_parser.reset(new ParserWrapper(
- makeParser(str_Ey_ext_particle_function)));
- m_Ez_particle_parser.reset(new ParserWrapper(
- makeParser(str_Ez_ext_particle_function)));
+ m_Ex_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_Ex_ext_particle_function,{"x","y","z","t"})));
+ m_Ey_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_Ey_ext_particle_function,{"x","y","z","t"})));
+ m_Ez_particle_parser.reset(new ParserWrapper<4>(
+ makeParser(str_Ez_ext_particle_function,{"x","y","z","t"})));
}