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)
49 for (
unsigned int i = 0; i <
_var.
count(); ++i)
51 auto gd =
_func[i]->gradient(
_t, p);
registerMooseObject("MooseApp", ArrayFunctionIC)
std::vector< const Function * > _func
virtual RealEigenVector value(const Point &p) override
The value of the variable at a point.
This is a template class that implements the workhorse compute and computeNodal methods.
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.
static InputParameters validParams()
virtual RealVectorArrayValue gradient(const Point &p) override
The value of the gradient at a point.
MooseVariableField< T > & _var
The variable that this initial condition is acting upon.
static InputParameters validParams()
ArrayFunctionIC(const InputParameters ¶meters)
Eigen::Matrix< Real, Eigen::Dynamic, Moose::dim > RealVectorArrayValue
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector