LCOV - code coverage report
Current view: top level - src/kernels - MassEigenKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 12 13 92.3 %
Date: 2025-08-08 20:01:16 Functions: 4 4 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 "MassEigenKernel.h"
      11             : 
      12             : registerMooseObject("MooseApp", MassEigenKernel);
      13             : 
      14             : InputParameters
      15       14657 : MassEigenKernel::validParams()
      16             : {
      17       14657 :   InputParameters params = EigenKernel::validParams();
      18       14657 :   params.addClassDescription(
      19             :       "An eigenkernel with weak form $\\lambda(\\psi_i, -u_h \\times coeff)$ where "
      20             :       "$\\lambda$ is the eigenvalue.");
      21       14657 :   params.addParam<Real>("coefficient", 1.0, "Coefficient multiplying the term");
      22       14657 :   return params;
      23           0 : }
      24             : 
      25         256 : MassEigenKernel::MassEigenKernel(const InputParameters & parameters)
      26         256 :   : EigenKernel(parameters), _coef(this->template getParam<Real>("coefficient"))
      27             : {
      28         256 : }
      29             : 
      30             : Real
      31    10332128 : MassEigenKernel::computeQpResidual()
      32             : {
      33    10332128 :   return -_coef * _u[_qp] * _test[_i][_qp];
      34             : }
      35             : 
      36             : Real
      37      871296 : MassEigenKernel::computeQpJacobian()
      38             : {
      39      871296 :   return -_coef * _phi[_j][_qp] * _test[_i][_qp];
      40             : }

Generated by: LCOV version 1.14