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)
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...
static InputParameters validParams()
registerMooseObject("MooseApp", ArrayBodyForce)
ArrayBodyForce(const InputParameters ¶meters)
const ArrayVariableTestValue & _test
the current test function
unsigned int _i
current index for the test function
const unsigned int _count
Number of components of the array variable.
std::vector< const Function * > _func
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
virtual void computeQpResidual(RealEigenVector &residual) override
Compute this Kernel's contribution to the residual at the current quadrature point, to be filled in residual.
static InputParameters validParams()
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
ArrayMooseVariable & _var
This is an array kernel so we cast to a ArrayMooseVariable.
const MooseArray< Point > & _q_point
The physical location of the element's quadrature Points, indexed by _qp.
unsigned int _qp
The current quadrature point index.