From 588ef1dad873efef664687adb913ae1302dec6e5 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Thu, 18 Mar 2021 12:33:24 -0700 Subject: Use Clear Naming Standard for ParmParse Variables (#1809) --- Source/Particles/LaserParticleContainer.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Source/Particles/LaserParticleContainer.cpp') 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::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 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. -- cgit v1.2.3