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),
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'");
const RealEigenVector _coef
static InputParameters validParams()
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 ...
registerMooseObject("MooseApp", ArrayCoupledForce)
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...
static InputParameters validParams()
ArrayCoupledForce(const InputParameters ¶meters)
const unsigned int _v_var
const ArrayVariableValue *const _v_array
const ArrayVariableTestValue & _test
the current test function
unsigned int _i
current index for the test function
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
const unsigned int _count
Number of components of the array variable.
unsigned int _j
current index for the shape function
const ArrayVariablePhiValue & _phi
the current shape functions
ArrayMooseVariable * getArrayVar(const std::string &var_name, unsigned int comp)
Extract pointer to a coupled array variable.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
ArrayMooseVariable & _var
This is an array kernel so we cast to a ArrayMooseVariable.
virtual RealEigenMatrix computeQpOffDiagJacobian(const MooseVariableFEBase &jvar) override
This is the virtual that derived classes should override for computing a full Jacobian component...
virtual void computeQpResidual(RealEigenVector &residual) override
Compute this Kernel's contribution to the residual at the current quadrature point, to be filled in residual.
unsigned int _qp
The current quadrature point index.