LCOV - code coverage report
Current view: top level - src/dgkernels - MassMatrixDGKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #31405 (292dce) with base fef103 Lines: 16 20 80.0 %
Date: 2025-09-04 07:54:44 Functions: 3 4 75.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 "MassMatrixDGKernel.h"
      11             : #include "MassMatrix.h"
      12             : 
      13             : registerMooseObject("NavierStokesApp", MassMatrixDGKernel);
      14             : 
      15             : InputParameters
      16          71 : MassMatrixDGKernel::validParams()
      17             : {
      18          71 :   InputParameters params = DGKernel::validParams();
      19          71 :   params.addClassDescription(
      20             :       "Computes a finite element mass matrix on internal faces meant for use in "
      21             :       "preconditioning schemes which require one");
      22          71 :   MassMatrix::setMassMatrixParams(params);
      23         142 :   params.addParam<Real>("density", 1, "The density");
      24          71 :   return params;
      25           0 : }
      26             : 
      27          39 : MassMatrixDGKernel::MassMatrixDGKernel(const InputParameters & parameters)
      28          78 :   : DGKernel(parameters), _density(getParam<Real>("density"))
      29             : {
      30          78 :   if (!isParamValid("matrix_tags") && !isParamValid("extra_matrix_tags"))
      31           0 :     mooseError("One of 'matrix_tags' or 'extra_matrix_tags' must be provided");
      32          39 : }
      33             : 
      34             : Real
      35           0 : MassMatrixDGKernel::computeQpResidual(Moose::DGResidualType)
      36             : {
      37             :   mooseAssert(false, "should never be called");
      38           0 :   return 0;
      39             : }
      40             : 
      41             : Real
      42    14929380 : MassMatrixDGKernel::computeQpJacobian(const Moose::DGJacobianType type)
      43             : {
      44             :   Real jac = 0;
      45             : 
      46    14929380 :   switch (type)
      47             :   {
      48     3732345 :     case Moose::ElementElement:
      49     3732345 :       jac = _test[_i][_qp] * _density * _phi[_j][_qp];
      50     3732345 :       break;
      51             : 
      52             :     default:
      53             :       jac = 0;
      54             :       break;
      55             :   }
      56             : 
      57    14929380 :   return jac;
      58             : }

Generated by: LCOV version 1.14