WarpX
Loading...
Searching...
No Matches
ParserUtils.H File Reference
#include <AMReX_ParmParse.H>
#include <AMReX_Parser.H>
#include <AMReX_REAL.H>
#include <AMReX_Vector.H>
#include <cmath>
#include <string>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  utils
 
namespace  utils::parser
 

Functions

amrex::Parser utils::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 utils::parser::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 utils::parser::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 utils::parser::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 > utils::parser::compileParser (amrex::Parser const *parser)
 
template<typename T>
int utils::parser::queryWithParser (const amrex::ParmParse &a_pp, char const *const str, T &val)
 
template<typename T>
int utils::parser::queryArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val)
 
template<typename T>
int utils::parser::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 utils::parser::getWithParser (const amrex::ParmParse &a_pp, char const *const str, T &val)
 
template<typename T>
void utils::parser::getArrWithParser (const amrex::ParmParse &a_pp, char const *const str, std::vector< T > &val)
 
template<typename T>
void utils::parser::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 utils::parser::queryWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, T &val)
 
template<typename T>
int utils::parser::queryArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val)
 
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)
 
int utils::parser::query (const amrex::ParmParse &a_pp, std::string const &group, char const *str, std::string &val)
 
template<typename T>
void utils::parser::getWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, T &val)
 
template<typename T>
void utils::parser::getArrWithParser (const amrex::ParmParse &a_pp, std::string const &group, char const *const str, std::vector< T > &val)
 
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)
 
void utils::parser::get (amrex::ParmParse const &a_pp, std::string const &group, char const *str, std::string &val)