23 params.
addClassDescription(
"Implements a source term proportional to the value of a coupled " 24 "variable. Weak form: $(\\psi_i, -\\sigma v)$.");
27 "coef", 1.0,
"Coefficent ($\\sigma$) multiplier for the coupled force term.");
36 _v(this->template coupledGenericValue<is_ad>(
"v")),
37 _coef(this->template getParam<
Real>(
"coef"))
41 "Coupled variable 'v' needs to be different from 'variable' with CoupledForce / " 42 "ADCoupledForce, consider using the CoefReaction kernel or something similar");
49 return -_coef * _v[_qp] * _test[_i][_qp];
60 "In ADCoupledForce, computeQpJacobian should not be called. Check computeJacobian " 63 return -_coef * _phi[_j][_qp] * _test[_i][_qp];
registerMooseObject("MooseApp", CoupledForce)
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
static InputParameters validParams()
unsigned int number() const
Get variable number coming from libMesh.
static InputParameters validParams()
unsigned int _v_var
Coupled variable number.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
For coupling standard variables.
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 ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
typename Moose::GenericType< Real, is_ad > GenericReal
Implements a source term proportional to the value of a coupled variable.
CoupledForceTempl(const InputParameters ¶meters)