LCOV - code coverage report
Current view: top level - src/bcs - ElementAndTraceScalarHDGBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 329044 Lines: 31 37 83.8 %
Date: 2026-08-03 21:12:22 Functions: 8 9 88.9 %
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 "ElementAndTraceScalarHDGAssemblyHelper.h"
      11             : #include "ElementAndTraceScalarHDGBC.h"
      12             : #include "TaggingInterface.h"
      13             : 
      14             : InputParameters
      15       16536 : ElementAndTraceScalarHDGBC::validParams()
      16             : {
      17       16536 :   return ADIntegratedBC::validParams();
      18             : }
      19             : 
      20         541 : ElementAndTraceScalarHDGBC::ElementAndTraceScalarHDGBC(const InputParameters & parameters)
      21         541 :   : ADIntegratedBC(parameters), _cached_elem(nullptr), _cached_side(libMesh::invalid_uint)
      22             : {
      23         541 : }
      24             : 
      25             : void
      26       27163 : ElementAndTraceScalarHDGBC::computeResidual()
      27             : {
      28       27163 :   auto & helper = hdgHelper();
      29       27163 :   compute(helper);
      30       81489 :   for (const auto & residual_packet : helper.taggingData())
      31       54326 :     addResiduals(_assembly, residual_packet);
      32       27163 : }
      33             : 
      34             : void
      35       11761 : ElementAndTraceScalarHDGBC::computeJacobian()
      36             : {
      37       11761 :   auto & helper = hdgHelper();
      38       11761 :   compute(helper);
      39       35283 :   for (const auto & residual_packet : helper.taggingData())
      40       23522 :     addJacobian(_assembly, residual_packet);
      41       11761 : }
      42             : 
      43             : void
      44           0 : ElementAndTraceScalarHDGBC::computeResidualAndJacobian()
      45             : {
      46           0 :   auto & helper = hdgHelper();
      47           0 :   compute(helper);
      48           0 :   for (const auto & residual_packet : helper.taggingData())
      49           0 :     addResidualsAndJacobian(_assembly, residual_packet);
      50           0 : }
      51             : 
      52             : void
      53         910 : ElementAndTraceScalarHDGBC::jacobianSetup()
      54             : {
      55         910 :   _cached_elem = nullptr;
      56         910 :   _cached_side = libMesh::invalid_uint;
      57         910 : }
      58             : 
      59             : void
      60       23922 : ElementAndTraceScalarHDGBC::computeOffDiagJacobian(const unsigned int)
      61             : {
      62       23922 :   if ((_cached_elem != _current_elem) || (_cached_side != _current_side))
      63             :   {
      64       11761 :     computeJacobian();
      65       11761 :     _cached_elem = _current_elem;
      66       11761 :     _cached_side = _current_side;
      67             :   }
      68       23922 : }
      69             : 
      70             : const std::unordered_set<unsigned int> &
      71        5618 : ElementAndTraceScalarHDGBC::getMatPropDependencies() const
      72             : {
      73        5618 :   return hdgHelper().getMatPropDependencies();
      74             : }
      75             : 
      76             : bool
      77         475 : ElementAndTraceScalarHDGBC::getMaterialPropertyCalled() const
      78             : {
      79         475 :   return hdgHelper().getMaterialPropertyCalled();
      80             : }

Generated by: LCOV version 1.14