LCOV - code coverage report
Current view: top level - src/linearfvbcs - LinearFVPressureSymmetryBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #32971 (54bef8) with base c6cf66 Lines: 16 24 66.7 %
Date: 2026-05-29 20:37:52 Functions: 5 8 62.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://www.mooseframework.org
       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 "LinearFVPressureSymmetryBC.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", LinearFVPressureSymmetryBC);
      13             : 
      14             : InputParameters
      15         240 : LinearFVPressureSymmetryBC::validParams()
      16             : {
      17         240 :   InputParameters params = LinearFVAdvectionDiffusionBC::validParams();
      18         240 :   params.addClassDescription("Adds a symmetry boundary condition for pressure in a segregated "
      19             :                              "velocity and pressure solve.");
      20         480 :   params.addRequiredParam<MooseFunctorName>("HbyA_flux", "The total HbyA face flux value.");
      21         240 :   return params;
      22           0 : }
      23             : 
      24         120 : LinearFVPressureSymmetryBC::LinearFVPressureSymmetryBC(const InputParameters & parameters)
      25         240 :   : LinearFVAdvectionDiffusionBC(parameters), _HbyA_flux(getFunctor<Real>("HbyA_flux"))
      26             : {
      27         120 : }
      28             : 
      29             : Real
      30      187298 : LinearFVPressureSymmetryBC::computeBoundaryValue() const
      31             : {
      32      187298 :   const auto elem_info = _current_face_type == FaceInfo::VarFaceNeighbors::ELEM
      33      187298 :                              ? _current_face_info->elemInfo()
      34           0 :                              : _current_face_info->neighborInfo();
      35      187298 :   return _var.getElemValue(*elem_info, determineState());
      36             : }
      37             : 
      38             : Real
      39           0 : LinearFVPressureSymmetryBC::computeBoundaryNormalGradient() const
      40             : {
      41           0 :   return 0.0;
      42             : }
      43             : 
      44             : Real
      45           0 : LinearFVPressureSymmetryBC::computeBoundaryValueMatrixContribution() const
      46             : {
      47           0 :   return 1.0;
      48             : }
      49             : 
      50             : Real
      51           0 : LinearFVPressureSymmetryBC::computeBoundaryValueRHSContribution() const
      52             : {
      53           0 :   return 0.0;
      54             : }
      55             : 
      56             : Real
      57      373124 : LinearFVPressureSymmetryBC::computeBoundaryGradientMatrixContribution() const
      58             : {
      59      373124 :   return 0.0;
      60             : }
      61             : 
      62             : Real
      63      373124 : LinearFVPressureSymmetryBC::computeBoundaryGradientRHSContribution() const
      64             : {
      65      373124 :   return -_HbyA_flux(singleSidedFaceArg(_current_face_info), determineState());
      66             : }

Generated by: LCOV version 1.14