Evaluating string math expressions containing named variables. More...
#include <dumux/common/functionfromstringexpression.hh>
numVars | number of variables in the expression; number of function arguments of the call operator |
Scalar | type of numerical values in the expression |
Example usage
For variables with several characters construct
Public Member Functions | |
FunctionFromStringExpression (const std::string &expression, const std::array< std::string, numVars > &variableNames) | |
Constructor from math expression and array of variable names. More... | |
FunctionFromStringExpression (const std::string &expression, std::string_view variableNames) | |
Delegating constructor using all characters of a string as variables. More... | |
template<class S , std::enable_if_t< std::is_convertible_v< Scalar, S >, int > = 0> | |
Scalar | operator() (const std::array< S, numVars > ¶ms) const |
template<class S , std::enable_if_t< std::is_convertible_v< Scalar, S >, int > = 0> | |
Scalar | operator() (const Dune::FieldVector< S, numVars > ¶ms) const |
template<class ... Params, std::enable_if_t<(sizeof...(Params)==numVars) &&(std::is_convertible_v< Scalar, std::decay_t< Params > > &&...), int > = 0> | |
Scalar | operator() (Params &&... params) const |
void | setVerbosity (unsigned int v) |
Static Public Attributes | |
static constexpr std::size_t | numVariables = numVars |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |