LCOV - code coverage report
Current view: top level - src/fvbcs - FVQpFluxBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33416 (b10b36) with base 9fbd27 Lines: 6 16 37.5 %
Date: 2026-07-23 16:15:30 Functions: 2 4 50.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 "FVQpFluxBC.h"
      11             : #include "MooseVariableFV.h"
      12             : #include "SystemBase.h"
      13             : 
      14             : InputParameters
      15        6396 : FVQpFluxBC::validParams()
      16             : {
      17        6396 :   InputParameters params = FVFluxBC::validParams();
      18        6396 :   return params;
      19             : }
      20             : 
      21         118 : FVQpFluxBC::FVQpFluxBC(const InputParameters & params)
      22         118 :   : FVFluxBC(params), _u(_var.adSln()), _u_neighbor(_var.adSlnNeighbor())
      23             : {
      24         118 : }
      25             : 
      26             : const ADReal &
      27           0 : FVQpFluxBC::uOnUSub() const
      28             : {
      29             :   mooseAssert(_face_info, "The face info has not been set");
      30           0 :   const auto ft = _face_info->faceType(std::make_pair(_var.number(), _var.sys().number()));
      31             :   mooseAssert(
      32             :       ft == FaceInfo::VarFaceNeighbors::ELEM || ft == FaceInfo::VarFaceNeighbors::NEIGHBOR,
      33             :       "The variable " << _var.name()
      34             :                       << " should be defined on exactly one adjacent subdomain for FVFluxBC "
      35             :                       << this->name());
      36             :   mooseAssert(_qp == 0,
      37             :               "At the time of writing, we only support one quadrature point, which should "
      38             :               "correspond to the location of the cell centroid. If that changes, we should "
      39             :               "probably change the body of FVQpFluxBC::uOnUSub");
      40             : 
      41           0 :   if (ft == FaceInfo::VarFaceNeighbors::ELEM)
      42           0 :     return _u[_qp];
      43             :   else
      44           0 :     return _u_neighbor[_qp];
      45             : }
      46             : 
      47             : const ADReal &
      48           0 : FVQpFluxBC::uOnGhost() const
      49             : {
      50             :   mooseAssert(_face_info, "The face info has not been set");
      51           0 :   const auto ft = _face_info->faceType(std::make_pair(_var.number(), _var.sys().number()));
      52             :   mooseAssert(
      53             :       ft == FaceInfo::VarFaceNeighbors::ELEM || ft == FaceInfo::VarFaceNeighbors::NEIGHBOR,
      54             :       "The variable " << _var.name()
      55             :                       << " should be defined on exactly one adjacent subdomain for FVFluxBC "
      56             :                       << this->name());
      57             :   mooseAssert(_qp == 0,
      58             :               "At the time of writing, we only support one quadrature point, which should "
      59             :               "correspond to the location of the cell centroid. If that changes, we should "
      60             :               "probably change the body of FVQpFluxBC::uOnGhost");
      61             : 
      62           0 :   if (ft == FaceInfo::VarFaceNeighbors::ELEM)
      63           0 :     return _u_neighbor[_qp];
      64             :   else
      65           0 :     return _u[_qp];
      66             : }

Generated by: LCOV version 1.14