aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Particles/MultiParticleContainer.H8
-rw-r--r--Source/Particles/MultiParticleContainer.cpp32
-rw-r--r--Source/Particles/PhysicalParticleContainer.H5
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp5
-rw-r--r--Source/Particles/WarpXParticleContainer.H10
-rw-r--r--Source/WarpX.H2
6 files changed, 24 insertions, 38 deletions
diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H
index f3ea1825c..ed1c2f371 100644
--- a/Source/Particles/MultiParticleContainer.H
+++ b/Source/Particles/MultiParticleContainer.H
@@ -221,14 +221,6 @@ public:
// External fields added to particle fields.
amrex::Vector<amrex::Real> m_B_external_particle;
amrex::Vector<amrex::Real> m_E_external_particle;
- // Parser for B_external on the particle
- std::string m_str_Bx_ext_particle_function;
- std::string m_str_By_ext_particle_function;
- std::string m_str_Bz_ext_particle_function;
- // Parser for E_external on the particle
- std::string m_str_Ex_ext_particle_function;
- std::string m_str_Ey_ext_particle_function;
- std::string m_str_Ez_ext_particle_function;
// ParserWrapper for B_external on the particle
std::unique_ptr<ParserWrapper> m_Bx_particle_parser;
std::unique_ptr<ParserWrapper> m_By_particle_parser;
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)));
}
diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H
index 8867778f7..74d1a0f62 100644
--- a/Source/Particles/PhysicalParticleContainer.H
+++ b/Source/Particles/PhysicalParticleContainer.H
@@ -53,8 +53,9 @@ public:
* in a mathematical expression. The default value for the E- and B-fields
* is (0.0,0.0,0.0).
*
- * \param Exp-Bzp: fields on particles modified based on external E and B
- * \param xp,yp,zp: arrays of particle positions required to compute
+ * \param[in,out] Exp-Bzp pointer to fields on particles modified based
+ * on external E and B
+ * \param[in] xp,yp,zp arrays of particle positions required to compute
* mathematical expression for the external fields
* using parser.
*/
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index c04b3d32a..91cc5fb12 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -1218,11 +1218,6 @@ PhysicalParticleContainer::Evolve (int lev,
exfab, eyfab, ezfab, bxfab, byfab, bzfab);
}
- //
- // copy data from particle container to temp arrays
- //
- pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]);
-
// Determine which particles deposit/gather in the buffer, and
// which particles deposit/gather in the fine patch
long nfine_current = np;
diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H
index 39ce1dcda..398334d93 100644
--- a/Source/Particles/WarpXParticleContainer.H
+++ b/Source/Particles/WarpXParticleContainer.H
@@ -323,16 +323,6 @@ public:
//amrex::Real getMass () {return mass;}
amrex::ParticleReal getMass () const {return mass;}
-// // ParserWrapper for B_external on the particle
-// std::unique_ptr<ParserWrapper> Bx_particle_parser;
-// std::unique_ptr<ParserWrapper> By_particle_parser;
-// std::unique_ptr<ParserWrapper> Bz_particle_parser;
-// // ParserWrapper for E_external on the particle
-// std::unique_ptr<ParserWrapper> Ex_particle_parser;
-// std::unique_ptr<ParserWrapper> Ey_particle_parser;
-// std::unique_ptr<ParserWrapper> Ez_particle_parser;
-
-
protected:
std::map<std::string, int> particle_comps;
diff --git a/Source/WarpX.H b/Source/WarpX.H
index ad4fa29b1..ed6233743 100644
--- a/Source/WarpX.H
+++ b/Source/WarpX.H
@@ -87,7 +87,7 @@ public:
static amrex::Vector<amrex::Real> E_external_grid;
static amrex::Vector<amrex::Real> B_external_grid;
- // Initialization Type for External E and B on grid and particles
+ // Initialization Type for External E and B on grid
static std::string B_ext_grid_s;
static std::string E_ext_grid_s;