https://mooseframework.inl.gov
FVIntegralValueConstraint.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 #include "MooseVariableScalar.h"
13 #include "MooseVariableFV.h"
14 #include "Assembly.h"
15 
18  FVScalarLagrangeMultiplier,
19  "06/30/2022 24:00",
21 
24 {
26  params.addClassDescription("This class is used to enforce integral of phi = volume * phi_0 "
27  "with a Lagrange multiplier approach.");
28  params.setDocString("phi0", "What we want the average value of the primal variable to be.");
29  return params;
30 }
31 
34 {
35 }
36 
37 ADReal
39 {
41 }
void setDocString(const std::string &name, const std::string &doc)
Set the doc string of a parameter.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for implementing constraints on finite volume variable elemental values using scalar Lagra...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:46
ADReal computeQpResidual() override final
This is the primary function that must be implemented for flux kernel terms.
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...
const Elem *const & _current_elem
registerMooseObjectRenamed("MooseApp", FVScalarLagrangeMultiplier, "06/30/2022 24:00", FVIntegralValueConstraint)
FVIntegralValueConstraint(const InputParameters &parameters)
This Kernel implements the residuals that enforce the constraint.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
registerMooseObject("MooseApp", FVIntegralValueConstraint)
const PostprocessorValue & _phi0
The value that we want the average of the primal variable to be equal to.
MooseVariableFV< Real > & _var