LCOV - code coverage report
Current view: top level - src/bcs - AdvectionIPHDGOutflowBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 329044 Lines: 19 20 95.0 %
Date: 2026-08-03 21:12:22 Functions: 4 4 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 "AdvectionIPHDGAssemblyHelper.h"
      11             : #include "AdvectionIPHDGOutflowBC.h"
      12             : 
      13             : registerMooseObject("MooseApp", AdvectionIPHDGOutflowBC);
      14             : 
      15             : InputParameters
      16        3162 : AdvectionIPHDGOutflowBC::validParams()
      17             : {
      18        3162 :   auto params = ElementAndTraceScalarHDGBC::validParams();
      19        3162 :   params += AdvectionIPHDGAssemblyHelper::validParams();
      20        6324 :   params.addClassDescription("Implements an outflow boundary condition for use with a hybridized "
      21             :                              "discretization of the advection equation");
      22        9486 :   params.addRequiredParam<bool>("constrain_lm",
      23             :                                 "Whether to constrain the Lagrange multiplier to weakly match the "
      24             :                                 "interior solution on this boundary. This should be set to true "
      25             :                                 "for pure advection problems and likely false otherwise.");
      26        3162 :   return params;
      27           0 : }
      28             : 
      29          35 : AdvectionIPHDGOutflowBC::AdvectionIPHDGOutflowBC(const InputParameters & parameters)
      30             :   : ElementAndTraceScalarHDGBC(parameters),
      31         105 :     _iphdg_helper(std::make_unique<AdvectionIPHDGAssemblyHelper>(
      32          35 :         this, this, this, _sys, _assembly, _tid, std::set<SubdomainID>{}, boundaryIDs())),
      33         105 :     _constrain_lm(getParam<bool>("constrain_lm"))
      34             : {
      35          35 : }
      36             : 
      37             : void
      38          80 : AdvectionIPHDGOutflowBC::compute(ElementAndTraceScalarHDGAssemblyHelper &)
      39             : {
      40          80 :   _iphdg_helper->resizeResiduals();
      41             : 
      42             :   // u, lm_u
      43          80 :   _iphdg_helper->scalarFace();
      44          80 :   if (_constrain_lm)
      45          52 :     _iphdg_helper->lmOutflow();
      46          80 : }
      47             : 
      48             : ElementAndTraceScalarHDGAssemblyHelper &
      49         221 : AdvectionIPHDGOutflowBC::hdgHelper()
      50             : {
      51         221 :   return *_iphdg_helper;
      52             : }

Generated by: LCOV version 1.14