19 "This class should be inherited to create interface penalties in finite volume.");
28 _lambda_var(*getScalarVar(
"lambda", 0)),
29 _lambda(adCoupledScalarValue(
"lambda"))
31 if (
var1().sys().number() !=
var2().sys().number())
32 mooseError(this->
type(),
" does not support multiple nonlinear systems!");
54 std::array<Real, 1>{{lm_r}},
65 const auto & neigh_dof_indices =
67 mooseAssert((elem_dof_indices.size() == 1) && (neigh_dof_indices.size() == 1),
68 "We're currently built to use CONSTANT MONOMIALS");
75 _assembly, std::array<ADReal, 1>{{primal_r}}, elem_dof_indices, elem_scaling_factor);
77 _assembly, std::array<ADReal, 1>{{-primal_r}}, neigh_dof_indices, neigh_scaling_factor);
83 std::array<ADReal, 1>{{lm_r}},
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const final
Get neighbor DOF indices for currently selected element.
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals and derivatives for the Jacobian, corresponding to the provided d...
const MooseVariableFV< Real > & var1() const
unsigned int number() const
Get variable number coming from libMesh.
void computeResidual(const FaceInfo &fi) override final
Compute the residual on the supplied face.
void addResiduals(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals corresponding to the provided dof indices.
Real & faceCoord()
Sets/gets the coordinate transformation factor (for e.g.
static InputParameters validParams()
Real faceArea() const
Returns the face area of face id.
bool _elem_is_one
Whether the current element is associated with variable/subdomain 1 or 2.
Assembly & _assembly
The Assembly object.
This data structure is used to store geometric and variable related metadata about each cell face in ...
static InputParameters validParams()
Base class for creating kernels that interface physics between subdomains.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
const std::string & type() const
Get the type of this class.
const ADVariableValue & _lambda
The Lagrange Multiplier value.
void setupData(const FaceInfo &fi)
setup data useful for this object
void computeJacobian(const FaceInfo &fi) override final
Compute the jacobian on the supplied face.
const MooseVariableScalar & _lambda_var
The Lagrange Multiplier variable.
FVScalarLagrangeMultiplierInterface(const InputParameters ¶ms)
ADReal computeQpResidual() override=0
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
void addResidual(Real resid, unsigned int var_num, bool neighbor)
Process the provided residual given var_num and whether this is on the neighbor side.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
const MooseVariableFV< Real > & var2() const
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.