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}},
Base class for creating kernels that interface physics between subdomains.
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.
static InputParameters validParams()
void setupData(const FaceInfo &fi)
setup data useful for this object
bool _elem_is_one
Whether the current element is associated with variable/subdomain 1 or 2.
const MooseVariableFV< Real > & var1() const
Assembly & _assembly
The Assembly object.
const MooseVariableFV< Real > & var2() const
const ADVariableValue & _lambda
The Lagrange Multiplier value.
static InputParameters validParams()
void computeResidual(const FaceInfo &fi) override final
Compute the residual on the supplied face.
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
This data structure is used to store geometric and variable related metadata about each cell face in ...
Real faceArea() const
Returns the face area of face id.
Real & faceCoord()
Sets/gets the coordinate transformation factor (for e.g.
const std::string & type() const
Get the type of this class.
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...
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
unsigned int number() const
Get variable number coming from libMesh.
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
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...
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.