23 "Variables (excluding t,x,y,z) that are bound to the values provided by the corresponding " 24 "items in the vals vector.",
25 "Use 'symbol_names' instead.");
28 "Constant numeric values, postprocessor names, " 29 "function names, and scalar variables for vars.",
30 "Use 'symbol_values' instead.");
31 params.
addParam<std::vector<std::string>>(
33 "Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding " 34 "items in the vals vector.");
35 params.
addParam<std::vector<std::string>>(
"symbol_values",
36 "Constant numeric values, postprocessor names, " 37 "function names, and scalar variables corresponding to" 38 " the symbols in symbol_names.");
43 : _pfb_feproblem(*parameters.getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base")),
44 _vars(parameters.isParamValid(
"vars")
45 ? parameters.
get<
std::vector<
std::string>>(
"vars")
46 : parameters.
get<
std::vector<
std::string>>(
"symbol_names")),
47 _vals(parameters.isParamValid(
"vals")
48 ? parameters.
get<
std::vector<
std::string>>(
"vals")
49 : parameters.
get<
std::vector<
std::string>>(
"symbol_values"))
52 mooseError(
"Number of symbol_names must match the number of symbol_values!");
55 for (
const auto & var :
_vars)
56 if (var.find_first_of(
"xyzt") != std::string::npos && var.size() == 1)
57 mooseError(
"The variables \"x, y, z, and t\" in the ParsedFunction are pre-declared for use " 58 "and must not be declared in \"vars\"");
67 if (function_str.find(
"\"") != std::string::npos)
68 mooseError(
"The expression in ParsedFunction contains quotes which cannot be properly parsed");
virtual ~MooseParsedFunctionBase()
Class destructor.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
const std::vector< std::string > _vals
Values passed by the user, they may be Reals for Postprocessors.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string verifyFunction(const std::string &function_str)
A helper method to check if the function value contains quotes.
static InputParameters validParams()
Class constructor for the interface.
const std::vector< std::string > _vars
Variables passed to libMesh::ParsedFunction.
MooseParsedFunctionBase(const InputParameters ¶meters)