LCOV - code coverage report
Current view: top level - include/bcs - IPHDGBC.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 6f668f Lines: 2 3 66.7 %
Date: 2025-09-22 20:01:15 Functions: 1 2 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             : #pragma once
      11             : 
      12             : #include "ADIntegratedBC.h"
      13             : 
      14             : class IPHDGAssemblyHelper;
      15             : 
      16             : /**
      17             :  * Implements a prescribed flux for an IP-HDG discretization
      18             :  */
      19             : class IPHDGBC : public ADIntegratedBC
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   IPHDGBC(const InputParameters & parameters);
      25             : 
      26             :   virtual void computeResidual() override;
      27             :   virtual void computeJacobian() override;
      28             :   virtual void computeOffDiagJacobian(unsigned int jvar) override;
      29             :   virtual void computeResidualAndJacobian() override;
      30             :   virtual void jacobianSetup() override;
      31             :   virtual const std::unordered_set<unsigned int> & getMatPropDependencies() const override;
      32             :   virtual bool getMaterialPropertyCalled() const override;
      33             : 
      34             : protected:
      35             :   /**
      36             :    * compute the AD residuals
      37             :    */
      38             :   virtual void compute() = 0;
      39             : 
      40             :   virtual IPHDGAssemblyHelper & iphdgHelper() = 0;
      41             :   const IPHDGAssemblyHelper & iphdgHelper() const;
      42             : 
      43           0 :   virtual ADReal computeQpResidual() override { mooseError("this will never be called"); }
      44             : 
      45             :   /// A data member used for determining when to compute the Jacobian
      46             :   const Elem * _cached_elem;
      47             : 
      48             :   /// A cache variable to prevent multiple computations of Jacobians
      49             :   unsigned int _cached_side;
      50             : };
      51             : 
      52             : inline const IPHDGAssemblyHelper &
      53       10655 : IPHDGBC::iphdgHelper() const
      54             : {
      55       10655 :   return const_cast<IPHDGBC *>(this)->iphdgHelper();
      56             : }

Generated by: LCOV version 1.14