aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar RevathiJambunathan <revanathan@gmail.com> 2020-01-15 12:15:34 -0800
committerGravatar RevathiJambunathan <revanathan@gmail.com> 2020-01-15 12:15:34 -0800
commit262de3a369647eac5820c79b010e94865b280db8 (patch)
tree7ece4d9506ef02915930d4e44e99e2020cc9bddc /Source/Particles/MultiParticleContainer.cpp
parentca070b083c4fa5cc2db2428da801b3b55501d60c (diff)
downloadWarpX-262de3a369647eac5820c79b010e94865b280db8.tar.gz
WarpX-262de3a369647eac5820c79b010e94865b280db8.tar.zst
WarpX-262de3a369647eac5820c79b010e94865b280db8.zip
changes as suggested in review.
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index c99bd3c5b..ab836ce9d 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -111,19 +111,23 @@ MultiParticleContainer::ReadParameters ()
// must be provided in the input file.
if (m_B_ext_particle_s == "parse_b_ext_particle_function") {
// store the mathematical expression as string
+ std::string str_Bx_ext_particle_function;
+ std::string str_By_ext_particle_function;
+ std::string str_Bz_ext_particle_function;
Store_parserString(pp, "Bx_external_particle_function(x,y,z,t)",
- m_str_Bx_ext_particle_function);
+ str_Bx_ext_particle_function);
Store_parserString(pp, "By_external_particle_function(x,y,z,t)",
- m_str_By_ext_particle_function);
+ str_By_ext_particle_function);
Store_parserString(pp, "Bz_external_particle_function(x,y,z,t)",
- m_str_Bz_ext_particle_function);
+ str_Bz_ext_particle_function);
+ // Parser for B_external on the particle
m_Bx_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_Bx_ext_particle_function)));
+ makeParser(str_Bx_ext_particle_function)));
m_By_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_By_ext_particle_function)));
+ makeParser(str_By_ext_particle_function)));
m_Bz_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_Bz_ext_particle_function)));
+ makeParser(str_Bz_ext_particle_function)));
}
@@ -133,18 +137,22 @@ MultiParticleContainer::ReadParameters ()
// must be provided in the input file.
if (m_E_ext_particle_s == "parse_e_ext_particle_function") {
// store the mathematical expression as string
+ std::string str_Ex_ext_particle_function;
+ std::string str_Ey_ext_particle_function;
+ std::string str_Ez_ext_particle_function;
Store_parserString(pp, "Ex_external_particle_function(x,y,z,t)",
- m_str_Ex_ext_particle_function);
+ str_Ex_ext_particle_function);
Store_parserString(pp, "Ey_external_particle_function(x,y,z,t)",
- m_str_Ey_ext_particle_function);
+ str_Ey_ext_particle_function);
Store_parserString(pp, "Ez_external_particle_function(x,y,z,t)",
- m_str_Ez_ext_particle_function);
+ str_Ez_ext_particle_function);
+ // Parser for E_external on the particle
m_Ex_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_Ex_ext_particle_function)));
+ makeParser(str_Ex_ext_particle_function)));
m_Ey_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_Ey_ext_particle_function)));
+ makeParser(str_Ey_ext_particle_function)));
m_Ez_particle_parser.reset(new ParserWrapper(
- makeParser(m_str_Ez_ext_particle_function)));
+ makeParser(str_Ez_ext_particle_function)));
}