21 params.
addParam<
bool>(
"is_v_array",
false,
"Whether v is an array variable or not");
23 "coef",
"Coefficient ($\\sigma$) multiplier for the coupled force term.");
25 "Implements a source term proportional to the value of a coupled standard or array "
26 "variable. Weak form: $(\\vec{u}^\\ast, -\\vec{\\sigma} v)$.");
32 _is_v_array(getParam<bool>(
"is_v_array")),
34 _v(_is_v_array ? nullptr : &coupledValue(
"v")),
35 _v_array(_is_v_array ? &coupledArrayValue(
"v") : nullptr),
36 _coef(getParam<RealEigenVector>(
"coef"))
40 "Coupled variable 'v' needs to be different from 'variable' with "
41 "ArrayCoupledForce, consider using ArrayReaction or something similar");
44 "Needs to be either a standard variable or an array variable with the same "
45 "number of components as 'variable'");
registerMooseObject("MooseApp", ArrayCoupledForce)
const ArrayVariableValue *const _v_array
const RealEigenVector _coef
const unsigned int _v_var
static InputParameters validParams()
virtual void computeQpResidual(RealEigenVector &residual) override
Compute this Kernel's contribution to the residual at the current quadrature point,...
ArrayCoupledForce(const InputParameters ¶meters)
virtual RealEigenMatrix computeQpOffDiagJacobian(const MooseVariableFEBase &jvar) override
This is the virtual that derived classes should override for computing a full Jacobian component.
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 ArrayVariablePhiValue & _phi
the current shape functions
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
unsigned int _qp
The current quadrature point index.
unsigned int _j
current index for the shape function
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 number() const
Get variable number coming from libMesh.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one.
This class provides an interface for common operations on field variables of both FE and FV types wit...