Line data Source code
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 : 10 : #include "FVBoundaryIntegralValueConstraint.h" 11 : 12 : registerMooseObject("MooseApp", FVBoundaryIntegralValueConstraint); 13 : 14 : InputParameters 15 14290 : FVBoundaryIntegralValueConstraint::validParams() 16 : { 17 14290 : InputParameters params = FVBoundaryScalarLagrangeMultiplierConstraint::validParams(); 18 14290 : params.addClassDescription( 19 : "This class is used to enforce integral of phi = boundary area * phi_0 " 20 : "with a Lagrange multiplier approach."); 21 14290 : return params; 22 0 : } 23 : 24 13 : FVBoundaryIntegralValueConstraint::FVBoundaryIntegralValueConstraint( 25 13 : const InputParameters & parameters) 26 13 : : FVBoundaryScalarLagrangeMultiplierConstraint(parameters) 27 : { 28 13 : } 29 : 30 : ADReal 31 160 : FVBoundaryIntegralValueConstraint::computeQpResidual() 32 : { 33 320 : return _var(makeFace(*_face_info, Moose::FV::LimiterType::CentralDifference, true), 34 160 : determineState()) - 35 480 : _phi0; 36 : }