aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Utils/WarpXUtil.H')
-rw-r--r--Source/Utils/WarpXUtil.H27
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/Utils/WarpXUtil.H b/Source/Utils/WarpXUtil.H
index 745d8eb0c..66b0287ed 100644
--- a/Source/Utils/WarpXUtil.H
+++ b/Source/Utils/WarpXUtil.H
@@ -10,6 +10,7 @@
#include <AMReX_Extension.H>
#include <AMReX_GpuQualifiers.H>
+#include <AMReX_ParmParse.H>
#include <AMReX_Parser.H>
#include <AMReX_REAL.H>
#include <AMReX_Utility.H>
@@ -257,16 +258,20 @@ amrex::ParserExecutor<N> compileParser (amrex::Parser const* parser)
* \param[in] a_pp amrex::ParmParse object
* \param[in] str name of the parameter to read
* \param[out] val where the value queried and parsed is stored, either a scalar or vector
- * \param[in] start_ix start index in the list of inputs values (optional with arrays)
- * \param[in] num_val number of input values to use (optional with arrays)
+ * \param[in] start_ix start index in the list of inputs values (optional with arrays, default is
+ * amrex::ParmParse::FIRST for starting with the first input value)
+ * \param[in] num_val number of input values to use (optional with arrays, default is
+ * amrex::ParmParse::LAST for reading until the last input value)
*/
int queryWithParser (const amrex::ParmParse& a_pp, char const * const str, float& val);
int queryWithParser (const amrex::ParmParse& a_pp, char const * const str, double& val);
int queryArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<amrex::Real>& val,
- const int start_ix, const int num_val);
+ const int start_ix = amrex::ParmParse::FIRST,
+ const int num_val = amrex::ParmParse::LAST);
int queryWithParser (const amrex::ParmParse& a_pp, char const * const str, int& val);
int queryArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<int>& val,
- const int start_ix, const int num_val);
+ const int start_ix = amrex::ParmParse::FIRST,
+ const int num_val = amrex::ParmParse::LAST);
/**
* \brief Similar to amrex::ParmParse::get, but also supports math expressions for the value.
@@ -279,18 +284,20 @@ int queryArrWithParser (const amrex::ParmParse& a_pp, char const * const str, st
* \param[in] a_pp amrex::ParmParse object
* \param[in] str name of the parameter to read
* \param[out] val where the value queried and parsed is stored
- * \param[in] start_ix start index in the list of inputs values (optional with arrays)
- * \param[in] num_val number of input values to use (optional with arrays)
+ * \param[in] start_ix start index in the list of inputs values (optional with arrays, default is
+ * amrex::ParmParse::FIRST for starting with the first input value)
+ * \param[in] num_val number of input values to use (optional with arrays, default is
+ * amrex::ParmParse::LAST for reading until the last input value)
*/
void getWithParser (const amrex::ParmParse& a_pp, char const * const str, float& val);
void getWithParser (const amrex::ParmParse& a_pp, char const * const str, double& val);
-void getArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<amrex::Real>& val);
void getArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<amrex::Real>& val,
- const int start_ix, const int num_val);
+ const int start_ix = amrex::ParmParse::FIRST,
+ const int num_val = amrex::ParmParse::LAST);
void getWithParser (const amrex::ParmParse& a_pp, char const * const str, int& val);
-void getArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<int>& val);
void getArrWithParser (const amrex::ParmParse& a_pp, char const * const str, std::vector<int>& val,
- const int start_ix, const int num_val);
+ const int start_ix = amrex::ParmParse::FIRST,
+ const int num_val = amrex::ParmParse::LAST);
namespace WarpXUtilMsg{