11#include "libmesh/point.h"
19 params.
addParam<FunctionName>(
"function",
20 "The initial condition vector function. This cannot be supplied "
21 "with the component parameters.");
23 "function_x",
"0",
"A function that describes the x-component of the initial condition");
25 "function_y",
"0",
"A function that describes the y-component of the initial condition");
27 "function_z",
"0",
"A function that describes the z-component of the initial condition");
29 "Sets component values for a vector field variable based on a vector function.");
35 _function(isParamValid(
"function") ? &getFunction(
"function") : nullptr),
36 _function_x(getFunction(
"function_x")),
37 _function_y(getFunction(
"function_y")),
38 _function_z(getFunction(
"function_z"))
41 paramError(
"function_x",
"The 'function' and 'function_x' parameters cannot both be set.");
43 paramError(
"function_y",
"The 'function' and 'function_y' parameters cannot both be set.");
45 paramError(
"function_z",
"The 'function' and 'function_z' parameters cannot both be set.");
54 return RealVectorValue(
registerMooseObject("MooseApp", VectorFunctionIC)
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero,...
virtual RealVectorValue vectorValue(Real t, const Point &p) const
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
This is a template class that implements the workhorse compute and computeNodal methods.
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
IC that calls vectorValue method of a Function object.
VectorFunctionIC(const InputParameters ¶meters)
static InputParameters validParams()
const Function *const _function
Optional vectorValue function.
const Function & _function_z
const Function & _function_x
Optional component function value.
virtual RealVectorValue value(const Point &p) override
The value of the variable at a point.
const Function & _function_y