From d4406ac0dfd0e650bc85cbd8b3255f906d5452dd Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Thu, 9 Jan 2020 21:27:29 -0800 Subject: parser for particles in PhysicalParticleContainer --- Source/Particles/WarpXParticleContainer.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Source/Particles/WarpXParticleContainer.cpp') diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 15a6cff9b..9d5f4bcf4 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -13,6 +13,7 @@ #include #include #include +#include using namespace amrex; @@ -113,6 +114,27 @@ WarpXParticleContainer::WarpXParticleContainer (AmrCore* amr_core, int ispecies) m_xp.resize(num_threads); m_yp.resize(num_threads); m_zp.resize(num_threads); + + + // to delete comment + if (WarpX::B_ext_particle_s == "parse_b_ext_particle_function") { + Bx_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_Bx_ext_particle_function))); + By_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_By_ext_particle_function))); + Bz_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_Bz_ext_particle_function))); + } + + if (WarpX::E_ext_particle_s == "parse_e_ext_particle_function") { + Ex_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_Ex_ext_particle_function))); + Ey_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_Ey_ext_particle_function))); + Ez_particle_parser.reset(new ParserWrapper( + makeParser(WarpX::str_Ez_ext_particle_function))); + } + } void -- cgit v1.2.3