22 "Base class for imposing constraints using scalar Lagrange multipliers");
23 params.
addParam<PostprocessorName>(
"phi0",
"0",
"The value that the constraint will enforce.");
31 _phi0(getPostprocessorValue(
"phi0")),
32 _lambda_var(*getScalarVar(
"lambda", 0)),
33 _lambda(adCoupledScalarValue(
"lambda"))
56 mooseAssert(
_local_re.
size() == 1,
"We should only have a single dof");
58 "The lambda variable should be first order");
66 std::array<Real, 1>{{lm_r}},
92 mooseAssert(dof_indices.size() == 1,
"We're currently built to use CONSTANT MONOMIALS");
96 "The lambda variable should be first order");
105 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 computeResidual(const FaceInfo &fi) override final
Compute the residual on the supplied face.
const FaceInfo * _face_info
Holds information for the face we are currently examining.
FaceInfo::VarFaceNeighbors _face_type
The variable face type.
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 accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
static InputParameters validParams()
unsigned int number() const
Get variable number coming from libMesh.
Assembly & _assembly
Reference to assembly.
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.
MooseVariableFV< Real > & _var
Real & faceCoord()
Sets/gets the coordinate transformation factor (for e.g.
Real faceArea() const
Returns the face area of face id.
This data structure is used to store geometric and variable related metadata about each cell face in ...
unsigned int size() const
The number of elements that can currently be stored in the array.
static InputParameters validParams()
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
ADRealVectorValue _normal
Provides an interface for computing residual contributions from finite volume numerical fluxes comput...
const Point & normal() const
Returns the unit normal vector for the face oriented outward from the face's elem element...
unsigned int number() const
Gets the number of this system.
const ADVariableValue & _lambda
The Lagrange Multiplier value.
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
const MooseVariableScalar & _lambda_var
The Lagrange Multiplier variable.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
virtual unsigned int size() const override final
void computeJacobian(const FaceInfo &fi) override final
Compute the jacobian on the supplied face.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
SystemBase & sys()
Get the system this variable is part of.
virtual ADReal computeQpResidual()=0
FVBoundaryScalarLagrangeMultiplierConstraint(const InputParameters ¶meters)
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
Returns which side(s) the given variable-system number pair is defined on for this face...