20 "The initial condition functions.");
21 params.
addClassDescription(
"An initial condition that uses a normal function of x, y, z to "
22 "produce values (and optionally gradients) for a field variable.");
29 auto & funcs = getParam<std::vector<FunctionName>>(
"function");
31 mooseError(
"Number of functions does not agree with the number of array variable components");
32 for (
auto & func : funcs)
40 for (
unsigned int i = 0; i <
_var.
count(); ++i)
48 RealVectorArrayValue v(
_var.
count(), LIBMESH_DIM);
49 for (
unsigned int i = 0; i <
_var.
count(); ++i)
51 auto gd =
_func[i]->gradient(
_t, p);
registerMooseObject("MooseApp", ArrayFunctionIC)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
std::vector< const Function * > _func
virtual RealEigenVector value(const Point &p) override
The value of the variable at a point.
ArrayFunctionIC(const InputParameters ¶meters)
virtual RealVectorArrayValue gradient(const Point &p) override
The value of the gradient at a point.
static InputParameters validParams()
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
This is a template class that implements the workhorse compute and computeNodal methods.
MooseVariableField< T > & _var
The variable that this initial condition is acting upon.
static InputParameters validParams()
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.