LCOV - code coverage report
Current view: top level - src/hdgkernels - IPHDGKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 48 60 80.0 %
Date: 2026-05-29 20:35:17 Functions: 12 15 80.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 "IPHDGAssemblyHelper.h"
      11             : #include "IPHDGKernel.h"
      12             : 
      13             : using namespace libMesh;
      14             : 
      15             : InputParameters
      16        6766 : IPHDGKernel::validParams()
      17             : {
      18        6766 :   auto params = HDGKernel::validParams();
      19        6766 :   return params;
      20             : }
      21             : 
      22         324 : IPHDGKernel::IPHDGKernel(const InputParameters & params) : HDGKernel(params), _cached_elem(nullptr)
      23             : {
      24         324 : }
      25             : 
      26             : void
      27      157130 : IPHDGKernel::compute()
      28             : {
      29      157130 :   auto & iphdg_helper = iphdgHelper();
      30      157130 :   iphdg_helper.resizeResiduals();
      31      157130 :   iphdg_helper.scalarVolume();
      32      157130 : }
      33             : 
      34             : void
      35      549740 : IPHDGKernel::computeOnSide()
      36             : {
      37      549740 :   auto & iphdg_helper = iphdgHelper();
      38      549740 :   iphdg_helper.resizeResiduals();
      39      549740 :   iphdg_helper.scalarFace();
      40      549740 :   iphdg_helper.lmFace();
      41      549740 : }
      42             : 
      43             : void
      44      107833 : IPHDGKernel::computeResidual()
      45             : {
      46      107833 :   compute();
      47      323499 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      48      215666 :     addResiduals(_assembly, residual_packet);
      49      107833 : }
      50             : 
      51             : void
      52       49297 : IPHDGKernel::computeJacobian()
      53             : {
      54       49297 :   compute();
      55      147891 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      56       98594 :     addJacobian(_assembly, residual_packet);
      57       49297 : }
      58             : 
      59             : void
      60           0 : IPHDGKernel::computeResidualAndJacobian()
      61             : {
      62           0 :   compute();
      63           0 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      64           0 :     addResidualsAndJacobian(_assembly, residual_packet);
      65           0 : }
      66             : 
      67             : void
      68      377386 : IPHDGKernel::computeResidualOnSide()
      69             : {
      70      377386 :   computeOnSide();
      71     1132158 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      72      754772 :     addResiduals(_assembly, residual_packet);
      73      377386 : }
      74             : 
      75             : void
      76      172354 : IPHDGKernel::computeJacobianOnSide()
      77             : {
      78      172354 :   computeOnSide();
      79      517062 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      80      344708 :     addJacobian(_assembly, residual_packet);
      81      172354 : }
      82             : 
      83             : void
      84           0 : IPHDGKernel::computeResidualAndJacobianOnSide()
      85             : {
      86           0 :   computeOnSide();
      87           0 :   for (const auto & residual_packet : iphdgHelper().taggingData())
      88           0 :     addResidualsAndJacobian(_assembly, residual_packet);
      89           0 : }
      90             : 
      91             : void
      92         446 : IPHDGKernel::jacobianSetup()
      93             : {
      94         446 :   _cached_elem = nullptr;
      95         446 : }
      96             : 
      97             : void
      98       99594 : IPHDGKernel::computeOffDiagJacobian(const unsigned int)
      99             : {
     100       99594 :   if (_cached_elem != _current_elem)
     101             :   {
     102       49297 :     computeJacobian();
     103       49297 :     _cached_elem = _current_elem;
     104             :   }
     105       99594 : }
     106             : 
     107             : std::set<std::string>
     108         308 : IPHDGKernel::additionalROVariables()
     109             : {
     110         308 :   return iphdgHelper().additionalROVariables();
     111             : }
     112             : 
     113             : const std::unordered_set<unsigned int> &
     114        1447 : IPHDGKernel::getMatPropDependencies() const
     115             : {
     116        1447 :   return iphdgHelper().getMatPropDependencies();
     117             : }
     118             : 
     119             : bool
     120           0 : IPHDGKernel::getMaterialPropertyCalled() const
     121             : {
     122           0 :   return iphdgHelper().getMaterialPropertyCalled();
     123             : }

Generated by: LCOV version 1.14