21 "Returns a vector function based on string descriptions for each component.");
22 params.
addParam<std::string>(
"expression_x",
"0",
"x-component of function.");
23 params.
addParam<std::string>(
"expression_y",
"0",
"y-component of function.");
24 params.
addParam<std::string>(
"expression_z",
"0",
"z-component of function.");
25 params.
addParam<std::string>(
"curl_x",
"0",
"x-component of curl of function.");
26 params.
addParam<std::string>(
"curl_y",
"0",
"y-component of curl of function.");
27 params.
addParam<std::string>(
"curl_z",
"0",
"z-component of curl of function.");
28 params.
addParam<std::string>(
"div",
"0",
"divergence of function.");
35 _vector_value(verifyFunction(
std::string(
"{") + getParam<
std::string>(
"expression_x") +
"}{" +
36 getParam<
std::string>(
"expression_y") +
"}{" +
37 getParam<
std::string>(
"expression_z") +
"}")),
38 _curl_value(verifyFunction(
std::string(
"{") + getParam<
std::string>(
"curl_x") +
"}{" +
39 getParam<
std::string>(
"curl_y") +
"}{" +
40 getParam<
std::string>(
"curl_z") +
"}")),
41 _div_value(verifyFunction(getParam<
std::string>(
"div")))
66 mooseError(
"The gradient method is not defined in MooseParsedVectorFunction");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObjectAliased("MooseApp", MooseParsedVectorFunction, "ParsedVectorFunction")
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 similar to ParsedFunction except it returns a vector function.
std::string _curl_value
Storage for curl input function(s), in format ready for libMesh.
MooseParsedVectorFunction(const InputParameters ¶meters)
virtual Real div(Real t, const Point &p) const override
Override this to evaluate the divergence of the vector function at a point (t,x,y,...
std::unique_ptr< MooseParsedFunctionWrapper > _div_function_ptr
Pointer to the Parsed function wrapper object for the div.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
virtual RealVectorValue curl(Real t, const Point &p) const override
Override this to evaluate the curl of the vector function at a point (t,x,y,z), by default this retur...
virtual RealGradient gradient(Real t, const Point &p) const override
Function objects can optionally provide a gradient at a point.
std::string _vector_value
Storage for vector input function(s), in format ready for libMesh.
static InputParameters validParams()
Class constructor.
std::unique_ptr< MooseParsedFunctionWrapper > _curl_function_ptr
Pointer to the Parsed function wrapper object for the curl.
std::string _div_value
Storage for div input function, in format ready for libMesh.
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...