22 params.
addClassDescription(
"This class is used to enforce integral of phi = volume * phi_0 " 23 "with a Lagrange multiplier approach.");
24 params.
setDocString(
"phi0",
"What we want the point value of the primal variable to be.");
26 "point",
"The XYZ coordinates of the points where the value shall be enforced.");
32 _point(getParam<Point>(
"point")),
56 mooseError(
"The specified point for the FVPointValueConstraint is not in the " 57 "domain! Try alleviating block restrictions or " 58 "using another point!");
60 _my_elem = min_elem_id == elem_id ? elem :
nullptr;
MooseMesh & _mesh
Reference to this Kernel's mesh object.
ADReal computeQpResidual() override final
This is the primary function that must be implemented for flux kernel terms.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
std::unique_ptr< libMesh::PointLocatorBase > _point_locator
We use a point locator in case the constraint is a point value.
const Parallel::Communicator & comm() const
This Kernel implements the residuals that enforce the constraint.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
Base class for implementing constraints on finite volume variable elemental values using scalar Lagra...
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Helper method to create an elemental argument for a functor that includes whether to perform skewness...
void min(const T &r, T &o, Request &req) const
const Elem *const & _current_elem
const Elem * _my_elem
Pointer to the element in case we have a point constraint.
static InputParameters validParams()
static const dof_id_type invalid_id
registerMooseObject("MooseApp", FVPointValueConstraint)
const Point _point
The point where the constraint should be enforced.
FVPointValueConstraint(const InputParameters ¶meters)
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...
static std::unique_ptr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=nullptr)
const PostprocessorValue & _phi0
The value that we want the average of the primal variable to be equal to.
MooseVariableFV< Real > & _var