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

Generated by: LCOV version 1.14