Block-Structured AMR Software Framework
amrex::ParmParse Class Reference

Parse Parameters From Command Line and Input Files. More...

#include <AMReX_ParmParse.H>

Classes

struct  PP_entry
 

Public Types

enum  { LAST = -1 , FIRST = 0 , ALL = -1 }
 
using Table = std::unordered_map< std::string, PP_entry >
 

Public Member Functions

 ParmParse (std::string prefix=std::string(), std::string parser_prefix=std::string())
 Construct an additional ParmParse object sharing the same internal table as any other such objects in existence. If prefix is specified, load this string as the code prefix for this particular ParmParse object. If parser_prefix is specified, it will be used as prefixed in math expression evaluations. More...
 
bool contains (const char *name) const
 Returns true if name is in table. More...
 
int countval (const char *name, int n=LAST) const
 Returns the number of values associated with nth occurrence of name (prepended with the prefix) in the table. n == -1 implies the last occurrence. More...
 
int countname (const std::string &name) const
 Returns the number of times the given name (prepended with prefix) appears in the table. More...
 
void getkth (const char *name, int k, bool &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a bool and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an bool, an error message is output and the program halts. Note that ival == 0 is the first value in the list. ParmParse converte the value 'true', and non-zero integers or floats to bool(true), and bool(false) for 'false' or zero integer or float values. More...
 
void get (const char *name, bool &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, bool &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, bool &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, bool val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, int &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list. More...
 
void get (const char *name, int &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, int &ref, int ival=FIRST) const
 
int query (const char *name, int &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, int val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, long &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list. More...
 
void get (const char *name, long &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, long &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, long &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, long val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, long long &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list. More...
 
void get (const char *name, long long &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, long long &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, long long &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, long long val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, float &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a float and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a float, an error message is output and the program halts. Note that ival == 0 is the first value in the list. More...
 
void get (const char *name, float &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, float &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, float &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, float val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, double &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a double and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a double, an error message is output and the program halts. Note that ival = 0 is the first value in the list. More...
 
void get (const char *name, double &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, double &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, double &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, double val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, std::string &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a std::string and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a std::string, an error message is output and the program halts. Note that ival = 0 is the first value in the list. More...
 
void get (const char *name, std::string &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, std::string &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, std::string &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, const std::string &val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, IntVect &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an IntVect and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a IntVect, an error message is output and the program halts. Note that ival = 0 is the first value in the list. More...
 
void get (const char *name, IntVect &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, IntVect &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, IntVect &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, const IntVect &val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getkth (const char *name, int k, Box &ref, int ival=FIRST) const
 Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a Box and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a Box, an error message is output and the program halts. Note that ival = 0 is the first value in the list. More...
 
void get (const char *name, Box &ref, int ival=FIRST) const
 Same as getkth() but searches for the last occurrence of name. More...
 
int querykth (const char *name, int k, Box &ref, int ival=FIRST) const
 Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts. More...
 
int query (const char *name, Box &ref, int ival=FIRST) const
 Same as querykth() but searches for the last occurrence of name. More...
 
void add (const char *name, const Box &val)
 Add a key 'name'with value 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<int> of num_val values from kth occurrence of given name. If successful, the values are converted to an int and stored in the std::vector<int> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<int>[0], std::vector<int>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an int, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< int > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name. More...
 
void addarr (const char *name, const std::vector< int > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<long> of num_val values from kth occurrence of given name. If successful, the values are converted to a long and stored in the std::vector<long> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<long>[0], std::vector<long>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a long, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name. More...
 
void addarr (const char *name, const std::vector< long > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<long long> of num_val values from kth occurrence of given name. If successful, the values are converted to a long long and stored in the std::vector<long long> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<long long>[0], std::vector<long long>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a long long, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< long long > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name. More...
 
void addarr (const char *name, const std::vector< long long > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<float> of num_val values from kth occurrence of given name. If successful, the values are converted to a float and stored in the std::vector<float> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<float>[0], std::vector<float>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a float, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< float > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name. More...
 
void addarr (const char *name, const std::vector< float > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<double> of num_val values from kth occurrence of given name. If successful, the values are converted to a double and stored in the std::vector<double> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<double>[0], std::vector<double>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a double, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< double > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name. More...
 
void addarr (const char *name, const std::vector< double > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<std::string> of num_val values from kth occurrence of given name. If successful, the values are converted to an std::string and stored in the std::vector<std::string> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<std::string>[0], std::vector<std::string>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an std::string, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< std::string > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name.2. More...
 
void addarr (const char *name, const std::vector< std::string > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<IntVect> of num_val values from kth occurrence of given name. If successful, the values are converted to an IntVect and stored in the std::vector<IntVect> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<IntVect>[0], std::vector<IntVect>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an IntVect, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< IntVect > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name.2. More...
 
void addarr (const char *name, const std::vector< IntVect > &ref)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
void getktharr (const char *name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 Gets an std::vector<Box> of num_val values from kth occurrence of given name. If successful, the values are converted to an Box and stored in the std::vector<Box> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<Box>[0], std::vector<Box>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an Box, an error message is reported and the program halts. More...
 
void getarr (const char *name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as getktharr() but searches for last occurrence of name. More...
 
int queryktharr (const char *name, int k, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 queryktharr() is to querykth() as getktharr() is to getkth(). More...
 
int queryarr (const char *name, std::vector< Box > &ref, int start_ix=FIRST, int num_val=ALL) const
 Same as queryktharr() but searches for last occurrence of name.2. More...
 
void addarr (const char *name, const std::vector< Box > &refd)
 Add a key 'name' with vector of values 'ref' to the end of the PP table. More...
 
int queryarr (const char *name, IntVect &ref) const
 
void getarr (const char *name, IntVect &ref) const
 
int queryarr (const char *name, RealVect &ref) const
 Query RealVect from array. More...
 
void getarr (const char *name, RealVect &ref) const
 Get RealVect from array. More...
 
template<typename T , std::size_t N>
void get (const char *name, std::array< T, N > &ref) const
 
template<typename T , std::size_t N>
int query (const char *name, std::array< T, N > &ref) const
 
template<typename T , std::enable_if_t<!IsStdVector< T >::value, int > = 0>
int queryAdd (const char *name, T &ref)
 If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously. More...
 
int queryAdd (const char *name, std::string &ref)
 
template<typename T >
int queryAdd (const char *name, std::vector< T > &ref)
 If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously. More...
 
template<typename T >
int queryAdd (const char *name, std::vector< T > &ref, int num_val)
 If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously. More...
 
template<typename T , std::size_t N>
int queryAdd (const char *name, std::array< T, N > &ref)
 If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously. More...
 
int queryWithParser (const char *name, int &ref) const
 Query with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. The return value indicates whether it's found. Note that queryWithParser will be used recursively for unresolved symbols. More...
 
int queryWithParser (const char *name, long &ref) const
 
int queryWithParser (const char *name, long long &ref) const
 
int queryWithParser (const char *name, float &ref) const
 
int queryWithParser (const char *name, double &ref) const
 
int queryarrWithParser (const char *name, int nvals, int *ref) const
 Query with Parser. The return value indicates whether it's found. Note that queryWithParser will be used for unresolved symbols. If the number of elements in the input does not equal to nvals, it's a runtime error. More...
 
int queryarrWithParser (const char *name, int nvals, long *ref) const
 
int queryarrWithParser (const char *name, int nvals, long long *ref) const
 
int queryarrWithParser (const char *name, int nvals, float *ref) const
 
int queryarrWithParser (const char *name, int nvals, double *ref) const
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
int queryarrWithParser (const char *name, int nvals, std::vector< T > &ref) const
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
int queryAddWithParser (const char *name, T &ref) const
 Query with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. If not, the value in ref will be added to the ParmParse database. The return value indicates whether it's found. More...
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void getWithParser (const char *name, T &ref) const
 Get with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. If not, it's a runtime error. More...
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void getarrWithParser (const char *name, int nvals, T *ref) const
 Get with Parser. If name is not found, it's a runtime error. If the number of elements does not equal to nvals, it's also a runtime error. More...
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void getarrWithParser (const char *name, int nvals, std::vector< T > &ref) const
 Get with Parser. If name is not found, it's a runtime error. If the number of elements does not equal to nvals, it's also a runtime error. More...
 
template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
eval (std::string const &expr) const
 
template<typename T >
int query (const char *new_name, const char *old_name, T &ref)
 
template<typename T >
void get (const char *new_name, const char *old_name, T &ref)
 Get using two names. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int query (const char *name, T &ref, int ival=FIRST) const
 . Query enum value using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void get (const char *name, T &ref, int ival=FIRST) const
 . Get enum value using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int queryarr (const char *name, std::vector< T > &ref, int start_ix=FIRST, int num_val=ALL) const
 Query an array of enum values using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void getarr (const char *name, std::vector< T > &ref, int start_ix=FIRST, int num_val=ALL) const
 Get an array of enum values using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int query_enum_case_insensitive (const char *name, T &ref, int ival=FIRST) const
 . Query enum value using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void get_enum_case_insensitive (const char *name, T &ref, int ival=FIRST) const
 . Get enum value using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int query_enum_sloppy (const char *name, T &ref, std::string_view const &ignores, int ival=FIRST) const
 . Query enum value using given name. More...
 
template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void get_enum_sloppy (const char *name, T &ref, std::string_view const &ignores, int ival=FIRST) const
 . Get enum value using given name. More...
 
template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
int queryAsDouble (const char *name, T &ref) const
 Query T with Parser, but treat the number as double precision during parsing. More...
 
template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
int queryarrAsDouble (const char *name, int nvals, T *ref) const
 Query T array with Parser, but treat the number as double precision during parsing. More...
 
template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
void getAsDouble (const char *name, T &ref) const
 Get T with Parser, but treat the number as double precision during parsing. More...
 
template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
void getarrAsDouble (const char *name, int nvals, T *ref) const
 Get T array with Parser, but treat the number as double precision during parsing. More...
 
int remove (const char *name)
 Remove given name from the table. More...
 
Parser makeParser (std::string const &func, Vector< std::string > const &vars) const
 
IParser makeIParser (std::string const &func, Vector< std::string > const &vars) const
 
const Tabletable () const
 
std::string prefixedName (const std::string_view &str) const
 

Static Public Member Functions

static void Initialize (int argc, char **argv, const char *parfile)
 Construct an initial ParmParse object from the argc and argv passed in to main(). An error will be signalled if another ParmParse object currently exists. If parfile is specified, read the parameters in from that file first and then append those derived from argv to the table. More...
 
static void Finalize ()
 The destructor. The internal static table will only be deleted if there are no other ParmParse objects in existence. More...
 
static void SetParserPrefix (std::string a_prefix)
 Set prefix used by math expression Parser. More...
 
static int Verbose ()
 
static void SetVerbose (int v)
 
static void dumpTable (std::ostream &os, bool prettyPrint=false)
 Write the contents of the table in ASCII to the ostream. More...
 
static void prettyPrintTable (std::ostream &os)
 
static void addfile (std::string const &filename)
 Add keys and values from a file to the end of the PP table. More...
 
static bool QueryUnusedInputs ()
 
static bool hasUnusedInputs (const std::string &prefix=std::string())
 Any unused [prefix.]* parameters? More...
 
static std::vector< std::string > getUnusedInputs (const std::string &prefix=std::string())
 Returns unused [prefix.]* parameters. More...
 
static std::set< std::string > getEntries (const std::string &prefix=std::string())
 Returns [prefix.]* parameters. More...
 

Static Public Attributes

static std::string const FileKeyword = "FILE"
 keyword for files to load More...
 
static std::string ParserPrefix
 

Protected Attributes

std::string m_prefix
 
std::string m_parser_prefix
 
Tablem_table
 

Detailed Description

Parse Parameters From Command Line and Input Files.

The ParmParse class is used to interpret parameters passed in to a program from the command line and an arbitrary collection of input files. The parameters are stored in static table that can be queried by any object of type ParmParse. A parameter is a "definition". A definition is of the form "\<name\> = \<value\>\<value\>...\<value\>". It is stored in the table as a name, value-list pair.

In the following example, niter is a definition with the single integer value 10; name is a definition with the string value "big code" and dx is a definition with the two floating point values 0.5 and 0.75 and iv is an IntVect(5,4)

prog niter = 10 name = "big code" dx = 0.5 0.75 iv=(5,4)

The ParmParse class has two constructors. The first is responsible for building the table and is usually called by the main routine of an application. It has arguments for the command line argc and argv parameters, as well as an optional filename argument for reading definitions from an input file. The table is built by reading the input file first (if it exists) with the command line arguments added to the end of the table. The order of a definition in the table is significant, so command line parameters can be used to override definitions in the input file. A definition of the explicit form: FILE=<filename> is not added to the table but is a directive to include the named file at that point in the table.

The second constructor is generally used by other classes in the code. It permits access to the table via a large collection of query functions. Both constructors have an optional prefix argument that narrows the search to entries in the table with the same prefix. For example, let PlanR be a ParmParse object with code prefix "ope". PlanR.get("val",v) will look for an entry in the parameter list of the form: ope.val==<value>, and will reject all entries not starting with the correct code prefix.

The query functions search the table for definition names that match a given string (and prefix) and return values from the corresponding value list. The values can be returned as ints, Vector<int>s, floats, Vector<float>s, doubles, Vector<double>s, std::strings, or Vector<aSring>s. All values in the table are stored as std::string objects, but if an int, float, or double is requested, the translation is done automatically. In the previous example, the value of niter could be returned as either an std::string, an int, a double, or a float. The values of dx can be returned as std::strings, floats, or doubles, but the value of name can be returned only as an std::string.

Comments in an input file include all text from a # character to the end of the line. Here is a sample input file:

niter = 100

title = "Double Wammy"

cell_size = 0.5 0.75

plot.var = Density 1 10

plot.var = Energy 5 12

bigarray = 1 2 3 4 5 6 7 8 \ 9 10 11 12

multi_line_string = "This is a multi-line string."

aBox = ((0,0) (5,5))

test = apple "boy blue" 10 20 30 40

FILE = prob_file

Preprocessing of AMREX_SPACEDIM is supported. It supports if, #elif, #else, and #endif. The condition must be AMREX_SPACEDIM op D, where op is >, <, >=, <=, or ==, and D is 1, 2, or 3. The parentheses around the condition are optional. Some examples are shown below.

if (AMREX_SPACEDIM == 1) n_cell = 256 #elif (AMREX_SPACEDIM == 2) n_cell = 128 128 #else n_cell = 64 64 64 #endif

if AMREX_SPACEDIM >= 2 t = 0.5 #else t = 1.5 #endif

Math expression is supported for integers and reals. For example

n_cell = 128 amrex.n_cell = n_cell*2 8 16**2

becomes

n_cell = 128 amrex.n_cell = 256 8 256

More details can be found at https://amrex-codes.github.io/amrex/docs_html/Basics.html#parmparse

Member Typedef Documentation

◆ Table

using amrex::ParmParse::Table = std::unordered_map<std::string, PP_entry>

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LAST 
FIRST 
ALL 

Constructor & Destructor Documentation

◆ ParmParse()

amrex::ParmParse::ParmParse ( std::string  prefix = std::string(),
std::string  parser_prefix = std::string() 
)
explicit

Construct an additional ParmParse object sharing the same internal table as any other such objects in existence. If prefix is specified, load this string as the code prefix for this particular ParmParse object. If parser_prefix is specified, it will be used as prefixed in math expression evaluations.

Member Function Documentation

◆ add() [1/9]

void amrex::ParmParse::add ( const char *  name,
bool  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [2/9]

void amrex::ParmParse::add ( const char *  name,
const Box val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [3/9]

void amrex::ParmParse::add ( const char *  name,
const IntVect val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [4/9]

void amrex::ParmParse::add ( const char *  name,
const std::string &  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [5/9]

void amrex::ParmParse::add ( const char *  name,
double  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [6/9]

void amrex::ParmParse::add ( const char *  name,
float  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [7/9]

void amrex::ParmParse::add ( const char *  name,
int  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [8/9]

void amrex::ParmParse::add ( const char *  name,
long long  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ add() [9/9]

void amrex::ParmParse::add ( const char *  name,
long  val 
)

Add a key 'name'with value 'ref' to the end of the PP table.

◆ addarr() [1/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< Box > &  refd 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [2/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< double > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [3/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< float > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [4/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< int > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [5/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< IntVect > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [6/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< long > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [7/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< long long > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addarr() [8/8]

void amrex::ParmParse::addarr ( const char *  name,
const std::vector< std::string > &  ref 
)

Add a key 'name' with vector of values 'ref' to the end of the PP table.

◆ addfile()

void amrex::ParmParse::addfile ( std::string const &  filename)
static

Add keys and values from a file to the end of the PP table.

◆ contains()

bool amrex::ParmParse::contains ( const char *  name) const

Returns true if name is in table.

◆ countname()

int amrex::ParmParse::countname ( const std::string &  name) const

Returns the number of times the given name (prepended with prefix) appears in the table.

◆ countval()

int amrex::ParmParse::countval ( const char *  name,
int  n = LAST 
) const

Returns the number of values associated with nth occurrence of name (prepended with the prefix) in the table. n == -1 implies the last occurrence.

◆ dumpTable()

void amrex::ParmParse::dumpTable ( std::ostream &  os,
bool  prettyPrint = false 
)
static

Write the contents of the table in ASCII to the ostream.

◆ eval()

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
T amrex::ParmParse::eval ( std::string const &  expr) const
inline

◆ Finalize()

void amrex::ParmParse::Finalize ( )
static

The destructor. The internal static table will only be deleted if there are no other ParmParse objects in existence.

◆ get() [1/12]

void amrex::ParmParse::get ( const char *  name,
bool &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [2/12]

void amrex::ParmParse::get ( const char *  name,
Box ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [3/12]

void amrex::ParmParse::get ( const char *  name,
double &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [4/12]

void amrex::ParmParse::get ( const char *  name,
float &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [5/12]

void amrex::ParmParse::get ( const char *  name,
int ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [6/12]

void amrex::ParmParse::get ( const char *  name,
IntVect ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [7/12]

void amrex::ParmParse::get ( const char *  name,
long &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [8/12]

void amrex::ParmParse::get ( const char *  name,
long long &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [9/12]

template<typename T , std::size_t N>
void amrex::ParmParse::get ( const char *  name,
std::array< T, N > &  ref 
) const
inline

◆ get() [10/12]

void amrex::ParmParse::get ( const char *  name,
std::string &  ref,
int  ival = FIRST 
) const

Same as getkth() but searches for the last occurrence of name.

◆ get() [11/12]

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void amrex::ParmParse::get ( const char *  name,
T &  ref,
int  ival = FIRST 
) const
inline

. Get enum value using given name.

Here T is an enum class defined by AMREX_ENUM. It's a runtime error, if name is not found. An exception is thrown, if the found string associated with the name cannot be converted to an enumerator (i.e., the string does not match any names in the definition of T).

◆ get() [12/12]

template<typename T >
void amrex::ParmParse::get ( const char *  new_name,
const char *  old_name,
T &  ref 
)
inline

Get using two names.

This function queries with new_name first, If it's not found, it will try again with old_name. It's an error if neither name is found.

◆ get_enum_case_insensitive()

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void amrex::ParmParse::get_enum_case_insensitive ( const char *  name,
T &  ref,
int  ival = FIRST 
) const
inline

. Get enum value using given name.

Here T is an enum class defined by AMREX_ENUM. It's a runtime error, if name is not found. An exception is thrown, if the found string associated with the name cannot be case-insensitively converted to an enumerator (i.e., the found string, not name, does not case-insensitively match any names in the definition of T). If there are multiple matches, the first one is used.

◆ get_enum_sloppy()

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void amrex::ParmParse::get_enum_sloppy ( const char *  name,
T &  ref,
std::string_view const &  ignores,
int  ival = FIRST 
) const
inline

. Get enum value using given name.

Here T is an enum class defined by AMREX_ENUM. It's a runtime error, if name is not found. An exception is thrown, if the found string associated with the name cannot be case-insensitively converted to an enumerator (i.e., the found string, not name, does not case-insensitively match any names in the definition of T). If there are multiple matches, the first one is used. Characters in ignores will be ignored as if they don't exist in the value part of ParamParse entries (e.g., name = value).

◆ getarr() [1/11]

void amrex::ParmParse::getarr ( const char *  name,
IntVect ref 
) const

◆ getarr() [2/11]

void amrex::ParmParse::getarr ( const char *  name,
RealVect ref 
) const

Get RealVect from array.

◆ getarr() [3/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< Box > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [4/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< double > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [5/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< float > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [6/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< int > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [7/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< IntVect > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [8/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [9/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< long long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [10/11]

void amrex::ParmParse::getarr ( const char *  name,
std::vector< std::string > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as getktharr() but searches for last occurrence of name.

◆ getarr() [11/11]

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
void amrex::ParmParse::getarr ( const char *  name,
std::vector< T > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const
inline

Get an array of enum values using given name.

◆ getarrAsDouble()

template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
void amrex::ParmParse::getarrAsDouble ( const char *  name,
int  nvals,
T *  ref 
) const
inline

Get T array with Parser, but treat the number as double precision during parsing.

The final result is cast to T's. It may result in a runtime error if the conversion is not safe. T is either arithmetic type or std::optional of arithmetic type.

◆ getarrWithParser() [1/2]

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void amrex::ParmParse::getarrWithParser ( const char *  name,
int  nvals,
std::vector< T > &  ref 
) const
inline

Get with Parser. If name is not found, it's a runtime error. If the number of elements does not equal to nvals, it's also a runtime error.

◆ getarrWithParser() [2/2]

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void amrex::ParmParse::getarrWithParser ( const char *  name,
int  nvals,
T *  ref 
) const
inline

Get with Parser. If name is not found, it's a runtime error. If the number of elements does not equal to nvals, it's also a runtime error.

◆ getAsDouble()

template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
void amrex::ParmParse::getAsDouble ( const char *  name,
T &  ref 
) const
inline

Get T with Parser, but treat the number as double precision during parsing.

The final result is cast to T. It may result in a runtime error if the conversion is not safe. T is either arithmetic type or std::optional of arithmetic type.

◆ getEntries()

std::set< std::string > amrex::ParmParse::getEntries ( const std::string &  prefix = std::string())
static

Returns [prefix.]* parameters.

◆ getkth() [1/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
bool &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a bool and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an bool, an error message is output and the program halts. Note that ival == 0 is the first value in the list. ParmParse converte the value 'true', and non-zero integers or floats to bool(true), and bool(false) for 'false' or zero integer or float values.

◆ getkth() [2/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
Box ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a Box and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a Box, an error message is output and the program halts. Note that ival = 0 is the first value in the list.

◆ getkth() [3/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
double &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a double and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a double, an error message is output and the program halts. Note that ival = 0 is the first value in the list.

◆ getkth() [4/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
float &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a float and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a float, an error message is output and the program halts. Note that ival == 0 is the first value in the list.

◆ getkth() [5/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
int ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list.

◆ getkth() [6/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
IntVect ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an IntVect and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a IntVect, an error message is output and the program halts. Note that ival = 0 is the first value in the list.

◆ getkth() [7/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
long &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list.

◆ getkth() [8/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
long long &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to an int and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to an int, an error message is output and the program halts. Note that ival == 0 is the first value in the list.

◆ getkth() [9/9]

void amrex::ParmParse::getkth ( const char *  name,
int  k,
std::string &  ref,
int  ival = FIRST 
) const

Get the ival'th value of kth occurrence of the requested name. If successful, the value is converted to a std::string and stored in reference ref. If the kth occurrence does not exist or ival'th value does not exist, or if the printed representation of the value cannot be converted to a std::string, an error message is output and the program halts. Note that ival = 0 is the first value in the list.

◆ getktharr() [1/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< Box > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<Box> of num_val values from kth occurrence of given name. If successful, the values are converted to an Box and stored in the std::vector<Box> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<Box>[0], std::vector<Box>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an Box, an error message is reported and the program halts.

◆ getktharr() [2/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< double > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<double> of num_val values from kth occurrence of given name. If successful, the values are converted to a double and stored in the std::vector<double> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<double>[0], std::vector<double>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a double, an error message is reported and the program halts.

◆ getktharr() [3/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< float > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<float> of num_val values from kth occurrence of given name. If successful, the values are converted to a float and stored in the std::vector<float> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<float>[0], std::vector<float>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a float, an error message is reported and the program halts.

◆ getktharr() [4/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< int > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<int> of num_val values from kth occurrence of given name. If successful, the values are converted to an int and stored in the std::vector<int> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<int>[0], std::vector<int>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an int, an error message is reported and the program halts.

◆ getktharr() [5/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< IntVect > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<IntVect> of num_val values from kth occurrence of given name. If successful, the values are converted to an IntVect and stored in the std::vector<IntVect> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<IntVect>[0], std::vector<IntVect>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an IntVect, an error message is reported and the program halts.

◆ getktharr() [6/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<long> of num_val values from kth occurrence of given name. If successful, the values are converted to a long and stored in the std::vector<long> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<long>[0], std::vector<long>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a long, an error message is reported and the program halts.

◆ getktharr() [7/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< long long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<long long> of num_val values from kth occurrence of given name. If successful, the values are converted to a long long and stored in the std::vector<long long> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<long long>[0], std::vector<long long>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to a long long, an error message is reported and the program halts.

◆ getktharr() [8/8]

void amrex::ParmParse::getktharr ( const char *  name,
int  k,
std::vector< std::string > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Gets an std::vector<std::string> of num_val values from kth occurrence of given name. If successful, the values are converted to an std::string and stored in the std::vector<std::string> object ref. ref is resized (if necessary) to hold num_val values. The value in the list indexed by start_ix is copied into std::vector<std::string>[0], std::vector<std::string>[1] holds start_ix+1, etc. If the kth occurrence does not exist or there are fewer than start_ix + num_val values associated with the kth occurrence, or if some of the values cannot be converted to an std::string, an error message is reported and the program halts.

◆ getUnusedInputs()

std::vector< std::string > amrex::ParmParse::getUnusedInputs ( const std::string &  prefix = std::string())
static

Returns unused [prefix.]* parameters.

◆ getWithParser()

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
void amrex::ParmParse::getWithParser ( const char *  name,
T &  ref 
) const
inline

Get with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. If not, it's a runtime error.

◆ hasUnusedInputs()

bool amrex::ParmParse::hasUnusedInputs ( const std::string &  prefix = std::string())
static

Any unused [prefix.]* parameters?

◆ Initialize()

void amrex::ParmParse::Initialize ( int  argc,
char **  argv,
const char *  parfile 
)
static

Construct an initial ParmParse object from the argc and argv passed in to main(). An error will be signalled if another ParmParse object currently exists. If parfile is specified, read the parameters in from that file first and then append those derived from argv to the table.

◆ makeIParser()

IParser amrex::ParmParse::makeIParser ( std::string const &  func,
Vector< std::string > const &  vars 
) const

Make IParser using given string func as function body and vars as variable names. Constants known to ParmParse will be set. It's a runtime error, if there are unknown symbols in func.

◆ makeParser()

Parser amrex::ParmParse::makeParser ( std::string const &  func,
Vector< std::string > const &  vars 
) const

Make Parser using given string func as function body and vars as variable names. Constants known to ParmParse will be set. It's a runtime error, if there are unknown symbols in func.

◆ prefixedName()

std::string amrex::ParmParse::prefixedName ( const std::string_view &  str) const

◆ prettyPrintTable()

void amrex::ParmParse::prettyPrintTable ( std::ostream &  os)
static

Write the table in a pretty way to the ostream. If there are duplicates, only the last one is printed.

◆ query() [1/12]

int amrex::ParmParse::query ( const char *  name,
bool &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [2/12]

int amrex::ParmParse::query ( const char *  name,
Box ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [3/12]

int amrex::ParmParse::query ( const char *  name,
double &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [4/12]

int amrex::ParmParse::query ( const char *  name,
float &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [5/12]

int amrex::ParmParse::query ( const char *  name,
int ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [6/12]

int amrex::ParmParse::query ( const char *  name,
IntVect ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [7/12]

int amrex::ParmParse::query ( const char *  name,
long &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [8/12]

int amrex::ParmParse::query ( const char *  name,
long long &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [9/12]

template<typename T , std::size_t N>
int amrex::ParmParse::query ( const char *  name,
std::array< T, N > &  ref 
) const
inline

◆ query() [10/12]

int amrex::ParmParse::query ( const char *  name,
std::string &  ref,
int  ival = FIRST 
) const

Same as querykth() but searches for the last occurrence of name.

◆ query() [11/12]

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int amrex::ParmParse::query ( const char *  name,
T &  ref,
int  ival = FIRST 
) const
inline

. Query enum value using given name.

Here T is an enum class defined by AMREX_ENUM. The return value indicates if name is found. An exception is thrown, if the found string associated with the name cannot be converted to an enumerator (i.e., the string does not match any names in the definition of T).

◆ query() [12/12]

template<typename T >
int amrex::ParmParse::query ( const char *  new_name,
const char *  old_name,
T &  ref 
)
inline

◆ query_enum_case_insensitive()

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int amrex::ParmParse::query_enum_case_insensitive ( const char *  name,
T &  ref,
int  ival = FIRST 
) const
inline

. Query enum value using given name.

Here T is an enum class defined by AMREX_ENUM. The return value indicates if name is found. An exception is thrown, if the found string associated with the name cannot be case-insensitively converted to an enumerator (i.e., the found string, not name, does not case-insensitively match any names in the definition of T). If there are multiple matches, the first one is used.

◆ query_enum_sloppy()

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int amrex::ParmParse::query_enum_sloppy ( const char *  name,
T &  ref,
std::string_view const &  ignores,
int  ival = FIRST 
) const
inline

. Query enum value using given name.

Here T is an enum class defined by AMREX_ENUM. The return value indicates if name is found. An exception is thrown, if the found string associated with the name cannot be case-insensitively converted to an enumerator (i.e., the found string, not name, does not case-insensitively match any names in the definition of T). If there are multiple matches, the first one is used. Characters in ignores will be ignored as if they don't exist in the value part of ParamParse entries (e.g., name = value).

◆ queryAdd() [1/5]

template<typename T , std::size_t N>
int amrex::ParmParse::queryAdd ( const char *  name,
std::array< T, N > &  ref 
)
inline

If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously.

◆ queryAdd() [2/5]

int amrex::ParmParse::queryAdd ( const char *  name,
std::string &  ref 
)
inline

◆ queryAdd() [3/5]

template<typename T >
int amrex::ParmParse::queryAdd ( const char *  name,
std::vector< T > &  ref 
)
inline

If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously.

If name is found, then the ref argument will be reallocated (and resized) according to the number of values in the inputs.

◆ queryAdd() [4/5]

template<typename T >
int amrex::ParmParse::queryAdd ( const char *  name,
std::vector< T > &  ref,
int  num_val 
)
inline

If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously.

◆ queryAdd() [5/5]

template<typename T , std::enable_if_t<!IsStdVector< T >::value, int > = 0>
int amrex::ParmParse::queryAdd ( const char *  name,
T &  ref 
)
inline

If name is found, the value in the ParmParse database will be stored in the ref argument. If not, the value in ref will be added to the ParmParse database. The return value indicates if it existed previously.

◆ queryAddWithParser()

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
int amrex::ParmParse::queryAddWithParser ( const char *  name,
T &  ref 
) const
inline

Query with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. If not, the value in ref will be added to the ParmParse database. The return value indicates whether it's found.

◆ queryarr() [1/11]

int amrex::ParmParse::queryarr ( const char *  name,
IntVect ref 
) const

◆ queryarr() [2/11]

int amrex::ParmParse::queryarr ( const char *  name,
RealVect ref 
) const

Query RealVect from array.

◆ queryarr() [3/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< Box > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.2.

◆ queryarr() [4/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< double > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.

◆ queryarr() [5/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< float > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.

◆ queryarr() [6/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< int > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.

◆ queryarr() [7/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< IntVect > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.2.

◆ queryarr() [8/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.

◆ queryarr() [9/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< long long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.

◆ queryarr() [10/11]

int amrex::ParmParse::queryarr ( const char *  name,
std::vector< std::string > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

Same as queryktharr() but searches for last occurrence of name.2.

◆ queryarr() [11/11]

template<typename T , typename ET = amrex_enum_traits<T>, std::enable_if_t< ET::value, int > = 0>
int amrex::ParmParse::queryarr ( const char *  name,
std::vector< T > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const
inline

Query an array of enum values using given name.

◆ queryarrAsDouble()

template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
int amrex::ParmParse::queryarrAsDouble ( const char *  name,
int  nvals,
T *  ref 
) const
inline

Query T array with Parser, but treat the number as double precision during parsing.

The final result is cast to T's. It may result in a runtime error if the conversion is not safe. T is either arithmetic type or std::optional of arithmetic type.

◆ queryarrWithParser() [1/6]

int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
double *  ref 
) const

◆ queryarrWithParser() [2/6]

int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
float *  ref 
) const

◆ queryarrWithParser() [3/6]

int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
int ref 
) const

Query with Parser. The return value indicates whether it's found. Note that queryWithParser will be used for unresolved symbols. If the number of elements in the input does not equal to nvals, it's a runtime error.

◆ queryarrWithParser() [4/6]

int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
long *  ref 
) const

◆ queryarrWithParser() [5/6]

int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
long long *  ref 
) const

◆ queryarrWithParser() [6/6]

template<typename T , std::enable_if_t< std::is_same_v< T, int >||std::is_same_v< T, long >||std::is_same_v< T, long long >||std::is_same_v< T, float >||std::is_same_v< T, double >, int > = 0>
int amrex::ParmParse::queryarrWithParser ( const char *  name,
int  nvals,
std::vector< T > &  ref 
) const
inline

◆ queryAsDouble()

template<typename T , std::enable_if_t< ppdetail::IsArithmeticOptional_v< T >, int > = 0>
int amrex::ParmParse::queryAsDouble ( const char *  name,
T &  ref 
) const
inline

Query T with Parser, but treat the number as double precision during parsing.

The final result is cast to T. It may result in a runtime error if the conversion is not safe. T is either arithmetic type or std::optional of arithmetic type.

◆ querykth() [1/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
bool &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [2/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
Box ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [3/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
double &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [4/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
float &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [5/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
int ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [6/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
IntVect ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [7/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
long &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [8/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
long long &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ querykth() [9/9]

int amrex::ParmParse::querykth ( const char *  name,
int  k,
std::string &  ref,
int  ival = FIRST 
) const

Similar to getkth() but returns 0 if there is no kth occurrence of name. If successful, it returns 1 and stores the value in ref. If the kth occurrence exists, but ival'th value of that occurrence does not, or if there is a type mismatch, then the program signals an error and halts.

◆ queryktharr() [1/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< Box > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [2/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< double > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [3/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< float > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [4/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< int > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [5/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< IntVect > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [6/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [7/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< long long > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ queryktharr() [8/8]

int amrex::ParmParse::queryktharr ( const char *  name,
int  k,
std::vector< std::string > &  ref,
int  start_ix = FIRST,
int  num_val = ALL 
) const

◆ QueryUnusedInputs()

bool amrex::ParmParse::QueryUnusedInputs ( )
static

◆ queryWithParser() [1/5]

int amrex::ParmParse::queryWithParser ( const char *  name,
double &  ref 
) const

◆ queryWithParser() [2/5]

int amrex::ParmParse::queryWithParser ( const char *  name,
float &  ref 
) const

◆ queryWithParser() [3/5]

int amrex::ParmParse::queryWithParser ( const char *  name,
int ref 
) const

Query with Parser. If name is found, this uses amrex::Parser to parse the entire list of empty space separated values as a single scalar. The return value indicates whether it's found. Note that queryWithParser will be used recursively for unresolved symbols.

◆ queryWithParser() [4/5]

int amrex::ParmParse::queryWithParser ( const char *  name,
long &  ref 
) const

◆ queryWithParser() [5/5]

int amrex::ParmParse::queryWithParser ( const char *  name,
long long &  ref 
) const

◆ remove()

int amrex::ParmParse::remove ( const char *  name)

Remove given name from the table.

◆ SetParserPrefix()

void amrex::ParmParse::SetParserPrefix ( std::string  a_prefix)
static

Set prefix used by math expression Parser.

◆ SetVerbose()

void amrex::ParmParse::SetVerbose ( int  v)
static

◆ table()

const Table& amrex::ParmParse::table ( ) const
inline

◆ Verbose()

int amrex::ParmParse::Verbose ( )
static

Member Data Documentation

◆ FileKeyword

std::string const amrex::ParmParse::FileKeyword = "FILE"
static

keyword for files to load

◆ m_parser_prefix

std::string amrex::ParmParse::m_parser_prefix
protected

◆ m_prefix

std::string amrex::ParmParse::m_prefix
protected

◆ m_table

Table* amrex::ParmParse::m_table
protected

◆ ParserPrefix

std::string amrex::ParmParse::ParserPrefix
static

The documentation for this class was generated from the following files: