diff options
author | 2020-12-02 09:43:11 +0100 | |
---|---|---|
committer | 2020-12-02 00:43:11 -0800 | |
commit | 2fbb92dca17e624c6d3c4f51caa412a585b10c32 (patch) | |
tree | c6b5e4534e65d0cb487061e6108419a7d4fe23a1 /Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp | |
parent | 330c6c56ea64a3f4183483f529e66f59aff8f92d (diff) | |
download | WarpX-2fbb92dca17e624c6d3c4f51caa412a585b10c32.tar.gz WarpX-2fbb92dca17e624c6d3c4f51caa412a585b10c32.tar.zst WarpX-2fbb92dca17e624c6d3c4f51caa412a585b10c32.zip |
More parser-enabled ParmParse.query and ParmParse.get (#1501)
* Parser can be used for most input parameters, including charge and mass
* update documentation for the math parser
* eol
* remove typo and update doc for parser
* Apply suggestions from code review
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp')
-rw-r--r-- | Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp index e7dc795a5..b795174d2 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp @@ -8,6 +8,7 @@ #include "Laser/LaserProfiles.H" #include "Utils/WarpX_Complex.H" #include "Utils/WarpXConst.H" +#include "Utils/WarpXUtil.H" #include <cmath> @@ -24,14 +25,14 @@ WarpXLaserProfiles::GaussianLaserProfile::init ( m_common_params = params; // Parse the properties of the Gaussian profile - ppl.get("profile_waist", m_params.waist); - ppl.get("profile_duration", m_params.duration); - ppl.get("profile_t_peak", m_params.t_peak); - ppl.get("profile_focal_distance", m_params.focal_distance); - ppl.query("zeta", m_params.zeta); - ppl.query("beta", m_params.beta); - ppl.query("phi2", m_params.phi2); - ppl.query("phi0", m_params.phi0); + getWithParser(ppl, "profile_waist", m_params.waist); + getWithParser(ppl, "profile_duration", m_params.duration); + getWithParser(ppl, "profile_t_peak", m_params.t_peak); + getWithParser(ppl, "profile_focal_distance", m_params.focal_distance); + queryWithParser(ppl, "zeta", m_params.zeta); + queryWithParser(ppl, "beta", m_params.beta); + queryWithParser(ppl, "phi2", m_params.phi2); + queryWithParser(ppl, "phi0", m_params.phi0); m_params.stc_direction = m_common_params.p_X; ppl.queryarr("stc_direction", m_params.stc_direction); |