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}},
MooseVariableFV< Real > & _var
const FaceInfo * _face_info
Holds information for the face we are currently examining.
Assembly & _assembly
Reference to assembly.
const ADVariableValue & _lambda
The Lagrange Multiplier value.
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.
FVBoundaryScalarLagrangeMultiplierConstraint(const InputParameters ¶meters)
static InputParameters validParams()
Provides an interface for computing residual contributions from finite volume numerical fluxes comput...
ADRealVectorValue _normal
FaceInfo::VarFaceNeighbors _face_type
The variable face type.
virtual ADReal computeQpResidual()=0
static InputParameters validParams()
This data structure is used to store geometric and variable related metadata about each cell face in ...
const Point & normal() const
Returns the unit normal vector for the face oriented outward from the face's elem element.
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.
Real faceArea() const
Returns the face area of face id.
Real & faceCoord()
Sets/gets the coordinate transformation factor (for e.g.
unsigned int size() const
The number of elements that can currently be stored in the array.
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.
SystemBase & sys()
Get the system this variable is part of.
libMesh::Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int.
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.
unsigned int number() const
Gets the number of this system.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
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.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
virtual unsigned int size() const override final