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)
Moose::GenericType< Real, is_ad > GenericReal
Implements a source term proportional to the value of a coupled variable.
CoupledForceTempl(const InputParameters ¶meters)
unsigned int _v_var
Coupled variable number.
virtual GenericReal< is_ad > computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
For coupling standard variables.
static InputParameters validParams()
MooseVariable & _var
This is a regular kernel so we cast to a regular MooseVariable.
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.