|
| amrex::Parser | makeParser (std::string const &parse_function, amrex::Vector< std::string > const &varnames) |
| | Initialize an amrex::Parser object from a string containing a math expression.
|
| |
| void | Store_parserString (amrex::ParmParse const &pp, std::string const &query_string, std::string &stored_string) |
| | Parse a string (typically a mathematical expression) from the input file and store it into a variable.
|
| |
| void | Store_parserString (const amrex::ParmParse &pp, std::string const &group, std::string const &query_string, std::string &stored_string) |
| | Parse a string (typically a mathematical expression) from the input file and store it into a variable. The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like get(pp, "group", "name", val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
|
| |
| bool | Query_parserString (amrex::ParmParse const &pp, std::string const &query_string, std::string &stored_string) |
| | If the input is provided, parse the string (typically a mathematical expression) from the input file and store it into a variable, replacing its contents.
|
| |
| template<int N> |
| amrex::ParserExecutor< N > | compileParser (amrex::Parser const *parser) |
| |
| template<typename T> |
| int | queryWithParser (const amrex::ParmParse &a_pp, char const *const str, T &val) |
| |
| template<typename T> |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val) |
| |
| template<typename T> |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val, const int start_ix, const int num_val) |
| |
| template<typename T> |
| void | getWithParser (const amrex::ParmParse &a_pp, char const *const str, T &val) |
| |
| template<typename T> |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val) |
| |
| template<typename T> |
| void | getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val, const int start_ix, const int num_val) |
| |
| template<typename T> |
| int | queryWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, T &val) |
| |
| template<typename T> |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val) |
| |
| template<typename T> |
| int | queryArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val, const int start_ix, const int num_val) |
| |
| int | query (const amrex::ParmParse &a_pp, std::string const &group, char const *str, std::string &val) |
| |
| template<typename T> |
| void | getWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, T &val) |
| |
| template<typename T> |
| void | getArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val) |
| |
| template<typename T> |
| void | getArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val, const int start_ix, const int num_val) |
| |
| void | get (amrex::ParmParse const &a_pp, std::string const &group, char const *str, std::string &val) |
| |
| void utils::parser::get |
( |
amrex::ParmParse const & | a_pp, |
|
|
std::string const & | group, |
|
|
char const * | str, |
|
|
std::string & | val ) |
Wraps around amrex::ParmParse::get, but also supports an option group name
The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like get(pp, "group", "name", val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored |
template<typename T>
| void utils::parser::getArrWithParser |
( |
const amrex::ParmParse & | a_pp, |
|
|
std::string const & | group, |
|
|
char const *const | str, |
|
|
std::vector< T > & | val, |
|
|
const int | start_ix, |
|
|
const int | num_val ) |
Similar to amrex::ParmParse::getarrWithParser
amrex::ParmParse::get reads a name and a value from the input file. This function does the same, and applies the Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers. The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like getArrWithParser(pp, "group", "name", val, start_ix, num_val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored |
| [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) |
| [in] | num_val | number of input values to use (optional with arrays, default is amrex::ParmParse::LAST for reading until the last input value) |
template<typename T>
| void utils::parser::getWithParser |
( |
const amrex::ParmParse & | a_pp, |
|
|
std::string const & | group, |
|
|
char const *const | str, |
|
|
T & | val ) |
Similar to amrex::ParmParse::getWithParser
amrex::ParmParse::get reads a name and a value from the input file. This function does the same, and applies the Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers. The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like getWithParser(pp, "group", "name", val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored |
| int utils::parser::query |
( |
const amrex::ParmParse & | a_pp, |
|
|
std::string const & | group, |
|
|
char const * | str, |
|
|
std::string & | val ) |
Wraps around amrex::ParmParse::query, but also supports an option group name
The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like get(pp, "group", "name", val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored |
template<typename T>
| int utils::parser::queryArrWithParser |
( |
const amrex::ParmParse & | a_pp, |
|
|
std::string const & | group, |
|
|
char const *const | str, |
|
|
std::vector< T > & | val, |
|
|
const int | start_ix, |
|
|
const int | num_val ) |
Similar to amrex::ParmParse::queryarrWithParser
amrex::ParmParse::query reads a name and a value from the input file. This function does the same, and applies the amrex::Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers. The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like queryArrWithParser(pp, "group", "name", val, start_ix, num_val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored, either a scalar or vector |
| [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) |
| [in] | num_val | number of input values to use (optional with arrays, default is amrex::ParmParse::LAST for reading until the last input value) |
template<typename T>
| int utils::parser::queryWithParser |
( |
const amrex::ParmParse & | a_pp, |
|
|
std::string const & | group, |
|
|
char const *const | str, |
|
|
T & | val ) |
Similar to amrex::ParmParse::queryWithParser
amrex::ParmParse::query reads a name and a value from the input file. This function does the same, and applies the amrex::Parser to the value, so the user has the choice to specify a value or a math expression (including user-defined constants). Works for amrex::Real numbers and integers. The group name specified is optional part of the parameter name. A parameter that includes the group name takes precedence over one without the group name. If this routine is called like queryWithParser(pp, "group", "name", val), it will query both "group.name" or "name" and return the value of "group.name" if found, otherwise the value of "name".
- Parameters
-
| [in] | a_pp | amrex::ParmParse object |
| [in] | group | name of the optional group |
| [in] | str | name of the parameter to read |
| [out] | val | where the value queried and parsed is stored, either a scalar or vector |