20 "expression",
"FunctionExpression",
"function expression");
21 params.
addParam<std::string>(
"name",
"result",
"Name of output reporter.");
23 "Expression symbol for each reporter");
24 params.
addParam<std::vector<std::string>>(
27 "Vector of constants used in the parsed function (use this for kB etc.)");
28 params.
addParam<std::vector<std::string>>(
29 "constant_expressions",
31 "Vector of values for the constants in constant_names (can be an FParser expression)");
33 "use_t",
false,
"Make time (t) variables available in the function expression.");
40 _use_t(getParam<bool>(
"use_t")),
41 _reporter_symbols(getParam<
std::vector<
std::string>>(
"reporter_symbols"))
44 std::string symbol_str;
50 symbol_str += (symbol_str.empty() ?
"" :
",") + std::string(
"t");
53 _func_F = std::make_shared<SymFunction>();
55 getParam<std::string>(
"expression"),
57 getParam<std::vector<std::string>>(
"constant_names"),
58 getParam<std::vector<std::string>>(
"constant_expressions"),
const Parallel::Communicator & comm() const
static InputParameters validParams()
SymFunctionPtr _func_F
function parser object
const T & getParam(const std::string &name) const
static InputParameters validParams()
const std::vector< std::string > _reporter_symbols
Get symbols to corresponding reporter names need symbols because reporter names have a "/" and that w...
void parsedFunctionSetup(SymFunctionPtr &function, const std::string &expression, const std::string &variables, const std::vector< std::string > &constant_names, const std::vector< std::string > &constant_expressions, const libMesh::Parallel::Communicator &comm) const
std::vector< GenericReal< is_ad > > _func_params
const bool _use_t
whether time is part of the parsed expression
ParsedReporterBase(const InputParameters ¶meters)
static InputParameters validParams()
auto index_range(const T &sizable)