LCOV - code coverage report
Current view: top level - src/fviks - FVTwoVarContinuityConstraint.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 13 84.6 %
Date: 2025-07-17 01:28:37 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "FVTwoVarContinuityConstraint.h"
      11             : 
      12             : registerMooseObject("MooseApp", FVTwoVarContinuityConstraint);
      13             : 
      14             : InputParameters
      15       14340 : FVTwoVarContinuityConstraint::validParams()
      16             : {
      17       14340 :   InputParameters params = FVScalarLagrangeMultiplierInterface::validParams();
      18       14340 :   params.addClassDescription(
      19             :       "Forces two variables to be equal on an interface for the finite volume method.");
      20             : 
      21       14340 :   return params;
      22           0 : }
      23             : 
      24          39 : FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(const InputParameters & params)
      25          39 :   : FVScalarLagrangeMultiplierInterface(params)
      26             : {
      27          39 :   if (&var1() == &var2())
      28           0 :     paramError("variable1",
      29             :                "FVTwoVarContinuityConstraint may not be applied on a single variable.");
      30          39 : }
      31             : 
      32             : ADReal
      33          64 : FVTwoVarContinuityConstraint::computeQpResidual()
      34             : {
      35         128 :   return var1().getBoundaryFaceValue(*_face_info, determineState()) -
      36         192 :          var2().getBoundaryFaceValue(*_face_info, determineState());
      37             : }

Generated by: LCOV version 1.14