19 params.
addClassDescription(
"Defines a function and its gradient using input file parameters.");
22 "value",
"User defined function.",
"Use 'expression' instead.");
24 params.
addParam<std::string>(
"expression",
"User defined function.");
25 params.
addParam<std::string>(
"grad_x",
"0",
"Partial derivative with respect to x.");
26 params.
addParam<std::string>(
"grad_y",
"0",
"Partial derivative with respect to y.");
27 params.
addParam<std::string>(
"grad_z",
"0",
"Partial derivative with respect to z.");
34 _value(verifyFunction(getRenamedParam<
std::string>(
"value",
"expression"))),
35 _grad_value(verifyFunction(
std::string(
"{") + getParam<
std::string>(
"grad_x") +
"}{" +
36 getParam<
std::string>(
"grad_y") +
"}{" +
37 getParam<
std::string>(
"grad_z") +
"}"))
60 mooseError(
"The vectorValue method is not defined in ParsedGradFunction");
68 tid = getParam<THREAD_ID>(
"_tid");
std::unique_ptr< MooseParsedFunctionWrapper > _function_ptr
Pointer to the Parsed function wrapper object for the scalar.
Base class for function objects.
Adds user facing parameters for parsed function.
virtual RealGradient gradient(Real t, const Point &p) const override
Compute the gradient of the function.
std::string _value
String for the scalar function string.
FEProblemBase & _pfb_feproblem
Reference to the FEProblemBase class for this object.
const std::vector< std::string > _vals
Values passed by the user, they may be Reals for Postprocessors.
MooseParsedGradFunction(const InputParameters ¶meters)
virtual void initialSetup() override
Creates two libMesh::ParsedFunction objects for returning a vector via the 'gradient' method and a sc...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
std::string _grad_value
String for the gradient, vector function string.
registerMooseObjectAliased("MooseApp", MooseParsedGradFunction, "ParsedGradFunction")
virtual Real value(Real t, const Point &p) const override
Return a scalar value from the function.
virtual ~MooseParsedGradFunction()
Destructor necessary for std::unique_ptr usage.
This class is similar to ParsedFunction except it also supports returning the gradient of the functio...
std::unique_ptr< MooseParsedFunctionWrapper > _grad_function_ptr
Pointer to the Parsed function wrapper object for the gradient.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Method invalid for ParsedGradFunction.
static InputParameters validParams()
Class constructor for the interface.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const std::vector< std::string > _vars
Variables passed to libMesh::ParsedFunction.
static InputParameters validParams()
Class constructor.
static InputParameters validParams()
Class constructor.