LCOV - code coverage report
Current view: top level - src/dgkernels - HFEMDiffusion.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 27 29 93.1 %
Date: 2025-08-08 20:01:16 Functions: 6 6 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 "HFEMDiffusion.h"
      11             : 
      12             : registerMooseObject("MooseApp", HFEMDiffusion);
      13             : 
      14             : InputParameters
      15       28750 : HFEMDiffusion::validParams()
      16             : {
      17       28750 :   InputParameters params = DGLowerDKernel::validParams();
      18       28750 :   params.addClassDescription("Imposes the constraints on internal sides with HFEM.");
      19       28750 :   return params;
      20           0 : }
      21             : 
      22         113 : HFEMDiffusion::HFEMDiffusion(const InputParameters & parameters) : DGLowerDKernel(parameters) {}
      23             : 
      24             : Real
      25      991360 : HFEMDiffusion::computeQpResidual(Moose::DGResidualType type)
      26             : {
      27      991360 :   switch (type)
      28             :   {
      29      495680 :     case Moose::Element:
      30      495680 :       return -_lambda[_qp] * _test[_i][_qp];
      31             : 
      32      495680 :     case Moose::Neighbor:
      33      495680 :       return _lambda[_qp] * _test_neighbor[_i][_qp];
      34             :   }
      35           0 :   return 0;
      36             : }
      37             : 
      38             : Real
      39       27680 : HFEMDiffusion::computeLowerDQpResidual()
      40             : {
      41       27680 :   return (_u_neighbor[_qp] - _u[_qp]) * _test_lambda[_i][_qp];
      42             : }
      43             : 
      44    18668800 : Real HFEMDiffusion::computeQpJacobian(Moose::DGJacobianType) { return 0; }
      45             : 
      46             : Real
      47     1005200 : HFEMDiffusion::computeLowerDQpJacobian(Moose::ConstraintJacobianType type)
      48             : {
      49     1005200 :   switch (type)
      50             :   {
      51      247840 :     case Moose::LowerPrimary:
      52      247840 :       return -_test_lambda[_i][_qp] * _phi[_j][_qp];
      53             : 
      54      247840 :     case Moose::LowerSecondary:
      55      247840 :       return _test_lambda[_i][_qp] * _phi_neighbor[_j][_qp];
      56             : 
      57      247840 :     case Moose::PrimaryLower:
      58      247840 :       return -_phi_lambda[_j][_qp] * _test[_i][_qp];
      59             : 
      60      247840 :     case Moose::SecondaryLower:
      61      247840 :       return _phi_lambda[_j][_qp] * _test_neighbor[_i][_qp];
      62             : 
      63       13840 :     default:
      64       13840 :       break;
      65             :   }
      66             : 
      67       13840 :   return 0;
      68             : }

Generated by: LCOV version 1.14