MultiParser Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <MultiParser.H>
Public Member Functions | |
MultiParser (const std::string &default_prefix, const std::string &prefix) | |
const amrex::ParmParse & | default_params () const |
Return the ParmParse instance for the default namespace. | |
const amrex::ParmParse & | params () const |
Return the ParmParse instance for the specialized namespace. | |
bool | contains (const std::string &name) const |
Check if the keyword is present in either namespace. | |
void | get (const std::string &name, vs::Vector &value) const |
void | query (const std::string &name, vs::Vector &value) const |
void | get_either (const std::string &name, vs::Vector &value) const |
void | query_either (const std::string &name, vs::Vector &value) const |
template<typename T > | |
void | get (const std::string &name, T &value) const |
Get the value for the keyword entry from either namespace. | |
template<typename T > | |
void | getarr (const std::string &name, T &value) const |
Get a vector of values for the given keyword entry from either namespace. | |
template<typename T > | |
void | query (const std::string &name, T &value) const |
Query the value for the keyword entry from either namespace. | |
template<typename T > | |
void | queryarr (const std::string &name, T &value) const |
Private Attributes | |
amrex::ParmParse | m_pp_default |
amrex::ParmParse | m_pp |
Detailed Description
Utility to parse inputs from multiple namespaces.
This class is a thin-wrapper around AMReX ParmParse utility to query user inputs from two different namespaces (default and specialized). This allows the user to consolidate common options within a default section and then override specific values in the specialization section.
Constructor & Destructor Documentation
◆ MultiParser()
|
inline |
Member Function Documentation
◆ contains()
|
inline |
Check if the keyword is present in either namespace.
◆ default_params()
|
inline |
Return the ParmParse instance for the default namespace.
◆ get() [1/2]
|
inline |
Get the value for the keyword entry from either namespace.
◆ get() [2/2]
|
inline |
Get a vector from the input file
- Parameters
-
[in] name Keyword to search for [out] value Vector value
◆ get_either()
|
inline |
Get a vector from the input file, but could be specified uniform instead
- Parameters
-
[in] name Keyword to search for [out] value Vector value
◆ getarr()
|
inline |
Get a vector of values for the given keyword entry from either namespace.
◆ params()
|
inline |
Return the ParmParse instance for the specialized namespace.
◆ query() [1/2]
|
inline |
Query the value for the keyword entry from either namespace.
◆ query() [2/2]
|
inline |
Query and return if a vector exists in the input file
- Parameters
-
[in] name Keyword to search for [out] value Vector value
◆ query_either()
|
inline |
Query and return if a scalar (uniform) or vector exists in input file
- Parameters
-
[in] name Keyword to search for [out] value Vector value
◆ queryarr()
|
inline |
Query a vector of values for the given keyword entry from either namespace
Member Data Documentation
◆ m_pp
|
private |
◆ m_pp_default
|
private |
The documentation for this class was generated from the following file:
- /home/runner/work/amr-wind/amr-wind/amr-wind/core/MultiParser.H
Generated by 1.12.0