aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-03-18 12:33:24 -0700
committerGravatar GitHub <noreply@github.com> 2021-03-18 12:33:24 -0700
commit588ef1dad873efef664687adb913ae1302dec6e5 (patch)
tree077488532705ea135dcfe516459b174cb63745b7 /Source/Particles/LaserParticleContainer.cpp
parente5babce0e9b81d7950c073a0d2911ea148ccca66 (diff)
downloadWarpX-588ef1dad873efef664687adb913ae1302dec6e5.tar.gz
WarpX-588ef1dad873efef664687adb913ae1302dec6e5.tar.zst
WarpX-588ef1dad873efef664687adb913ae1302dec6e5.zip
Use Clear Naming Standard for ParmParse Variables (#1809)
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp
index b3c07b16c..fe7990725 100644
--- a/Source/Particles/LaserParticleContainer.cpp
+++ b/Source/Particles/LaserParticleContainer.cpp
@@ -38,25 +38,25 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
mass = std::numeric_limits<Real>::max();
do_back_transformed_diagnostics = 0;
- ParmParse pp(m_laser_name);
+ ParmParse pp_laser_name(m_laser_name);
// Parse the type of laser profile and set the corresponding flag `profile`
std::string laser_type_s;
- pp.get("profile", laser_type_s);
+ pp_laser_name.get("profile", laser_type_s);
std::transform(laser_type_s.begin(), laser_type_s.end(), laser_type_s.begin(), ::tolower);
// Parse the properties of the antenna
- pp.getarr("position", m_position);
- pp.getarr("direction", m_nvec);
- pp.getarr("polarization", m_p_X);
+ pp_laser_name.getarr("position", m_position);
+ pp_laser_name.getarr("direction", m_nvec);
+ pp_laser_name.getarr("polarization", m_p_X);
- pp.query("pusher_algo", m_pusher_algo);
- getWithParser(pp, "wavelength", m_wavelength);
+ pp_laser_name.query("pusher_algo", m_pusher_algo);
+ getWithParser(pp_laser_name, "wavelength", m_wavelength);
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
m_wavelength > 0, "The laser wavelength must be >0.");
- const bool e_max_is_specified = queryWithParser(pp, "e_max", m_e_max);
+ const bool e_max_is_specified = queryWithParser(pp_laser_name, "e_max", m_e_max);
Real a0;
- const bool a0_is_specified = queryWithParser(pp, "a0", a0);
+ const bool a0_is_specified = queryWithParser(pp_laser_name, "a0", a0);
if (a0_is_specified){
Real omega = 2._rt*MathConst::pi*PhysConst::c/m_wavelength;
m_e_max = PhysConst::m_e * omega * PhysConst::c * a0 / PhysConst::q_e;
@@ -66,8 +66,8 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
"Exactly one of e_max or a0 must be specified for the laser.\n"
);
- pp.query("do_continuous_injection", do_continuous_injection);
- pp.query("min_particles_per_mode", m_min_particles_per_mode);
+ pp_laser_name.query("do_continuous_injection", do_continuous_injection);
+ pp_laser_name.query("min_particles_per_mode", m_min_particles_per_mode);
if (m_e_max == amrex::Real(0.)){
amrex::Print() << m_laser_name << " with zero amplitude disabled.\n";
@@ -127,10 +127,10 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
m_laser_injection_box= Geom(0).ProbDomain();
{
Vector<Real> lo, hi;
- if (pp.queryarr("prob_lo", lo)) {
+ if (pp_laser_name.queryarr("prob_lo", lo)) {
m_laser_injection_box.setLo(lo);
}
- if (pp.queryarr("prob_hi", hi)) {
+ if (pp_laser_name.queryarr("prob_hi", hi)) {
m_laser_injection_box.setHi(hi);
}
}
@@ -175,7 +175,7 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
common_params.e_max = m_e_max;
common_params.p_X = m_p_X;
common_params.nvec = m_nvec;
- m_up_laser_profile->init(pp, ParmParse{"my_constants"}, common_params);
+ m_up_laser_profile->init(pp_laser_name, ParmParse{"my_constants"}, common_params);
}
/* \brief Check if laser particles enter the box, and inject if necessary.