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")),
52 dof_id_type min_elem_id = elem_id;
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;
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("MooseApp", FVPointValueConstraint)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted,...
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
MooseVariableFV< Real > & _var
const Elem *const & _current_elem
This Kernel implements the residuals that enforce the constraint.
ADReal computeQpResidual() override final
This is the primary function that must be implemented for flux kernel terms.
std::unique_ptr< libMesh::PointLocatorBase > _point_locator
We use a point locator in case the constraint is a point value.
FVPointValueConstraint(const InputParameters ¶meters)
const Point _point
The point where the constraint should be enforced.
static InputParameters validParams()
const Elem * _my_elem
Pointer to the element in case we have a point constraint.
Base class for implementing constraints on finite volume variable elemental values using scalar Lagra...
static InputParameters validParams()
const PostprocessorValue & _phi0
The value that we want the average of the primal variable to be equal to.
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...
MooseMesh & _mesh
Reference to this Kernel's mesh object.
void min(const T &r, T &o, Request &req) const
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
static constexpr dof_id_type invalid_id
const Parallel::Communicator & comm() const
static std::unique_ptr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=nullptr)