20 params.
addRequiredParam<std::vector<FunctionName>>(
"function",
"The body force functions.");
21 params.
addClassDescription(
"Applies body forces specified with functions to an array variable.");
27 auto & funcs = getParam<std::vector<FunctionName>>(
"function");
30 "Number of functions must agree with the number of array variable components");
31 for (
auto & func : funcs)
38 for (
unsigned int p = 0; p <
_count; ++p)
registerMooseObject("MooseApp", ArrayBodyForce)
ArrayBodyForce(const InputParameters ¶meters)
std::vector< const Function * > _func
static InputParameters validParams()
virtual void computeQpResidual(RealEigenVector &residual) override
Compute this Kernel's contribution to the residual at the current quadrature point,...
const ArrayVariableTestValue & _test
the current test function
static InputParameters validParams()
const unsigned int _count
Number of components of the array variable.
ArrayMooseVariable & _var
This is an array kernel so we cast to a ArrayMooseVariable.
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
unsigned int _qp
The current quadrature point index.
const MooseArray< Point > & _q_point
The physical location of the element's quadrature Points, indexed by _qp.
unsigned int _i
current index for the test function
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 ...
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.
virtual const OutputTools< T >::VariableValue & value()
The value of the variable this object is operating on.