LCOV - code coverage report
Current view: top level - src/nodalkernels - ReactionNodalKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 12 13 92.3 %
Date: 2025-07-17 01:28:37 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 "ReactionNodalKernel.h"
      11             : 
      12             : #include "Function.h"
      13             : 
      14             : registerMooseObject("MooseApp", ReactionNodalKernel);
      15             : 
      16             : InputParameters
      17       14311 : ReactionNodalKernel::validParams()
      18             : {
      19       14311 :   InputParameters params = NodalKernel::validParams();
      20       14311 :   params.addClassDescription("Implements a simple consuming reaction term at nodes");
      21       14311 :   params.addParam<Real>("coeff", 1., "A coefficient for multiplying the reaction term");
      22       14311 :   return params;
      23           0 : }
      24             : 
      25          24 : ReactionNodalKernel::ReactionNodalKernel(const InputParameters & parameters)
      26          24 :   : NodalKernel(parameters), _coeff(getParam<Real>("coeff"))
      27             : {
      28          24 : }
      29             : 
      30             : Real
      31        2345 : ReactionNodalKernel::computeQpResidual()
      32             : {
      33        2345 :   return _coeff * _u[_qp];
      34             : }
      35             : 
      36             : Real
      37        1029 : ReactionNodalKernel::computeQpJacobian()
      38             : {
      39        1029 :   return _coeff;
      40             : }

Generated by: LCOV version 1.14