26 "expression",
"FunctionExpression",
"The user defined function.");
34 _value(verifyFunction(this->template getRenamedParam<
std::string>(
"value",
"expression")))
41 mooseAssert(
_function_ptr,
"ParsedFunction should have been initialized");
48 mooseAssert(
_function_ptr,
"ParsedFunction should have been initialized");
55 mooseAssert(
_function_ptr,
"ParsedFunction should have been initialized");
62 mooseError(
"The vectorValue method is not defined in ParsedFunction");
69 for (
const auto i : index_range(
_vars))
73 mooseError(
"The only variables supported by ParsedFunction are scalar variables, and var '" +
74 _vals[i] +
"' is not scalar.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObjectAliased("MooseApp", MooseParsedFunction, "ParsedFunction")
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided.
bool hasPostprocessorValueByName(const PostprocessorName &name) const
Whether or not a Postprocessor value exists by a given name.
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
virtual bool hasFunction(const std::string &name, const THREAD_ID tid=0)
Base class for function objects.
static InputParameters validParams()
Class constructor.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Adds user facing parameters for parsed function.
const std::vector< std::string > _vals
Values passed by the user, they may be Reals for Postprocessors.
FEProblemBase & _pfb_feproblem
Reference to the FEProblemBase class for this object.
std::unique_ptr< MooseParsedFunctionWrapper > _function_ptr
Pointer to the Parsed function wrapper object for the scalar.
static InputParameters validParams()
Class constructor for the interface.
const std::vector< std::string > _vars
Variables passed to libMesh::ParsedFunction.
This class is used to evaluate symbolic equations passed in to Moose through the input file.
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Method invalid for ParsedGradFunction.
static InputParameters validParams()
Created from MooseSystem via the FunctionFactory.
virtual RealGradient gradient(Real t, const Point &p) const override
Evaluate the gradient of the function.
virtual Real timeDerivative(Real t, const Point &p) const override
Evaluate the time derivative of the function.
virtual Real value(Real t, const Point &pt) const override
Evaluate the equation at the given location.
virtual void initialSetup() override
Creates the parsed function.
MooseParsedFunction(const InputParameters ¶meters)
std::string _value
The function defined by the user.