LCOV - code coverage report
Current view: top level - src/kernels - CoefReaction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 12 13 92.3 %
Date: 2026-05-29 20:35:17 Functions: 5 8 62.5 %
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 "CoefReaction.h"
      11             : 
      12             : registerMooseObjectReplaced("MooseApp", CoefReaction, "01/01/2027 00:00", Reaction);
      13             : registerMooseObjectReplaced("MooseApp", ADCoefReaction, "01/21/2027 00:00", ADReaction);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17        7481 : CoefReactionTempl<is_ad>::validParams()
      18             : {
      19        7481 :   InputParameters params = ReactionTempl<is_ad>::validParams();
      20       14962 :   params.addClassDescription("Implements the residual term (p*u, test)");
      21       22443 :   params.addParam<Real>("coefficient", 1.0, "Coefficient of the term");
      22        7481 :   return params;
      23           0 : }
      24             : 
      25             : template <bool is_ad>
      26         703 : CoefReactionTempl<is_ad>::CoefReactionTempl(const InputParameters & parameters)
      27        1406 :   : ReactionTempl<is_ad>(parameters), _coef(this->template getParam<Real>("coefficient"))
      28             : {
      29         703 : }
      30             : 
      31             : template <bool is_ad>
      32             : GenericReal<is_ad>
      33    24629600 : CoefReactionTempl<is_ad>::computeQpResidual()
      34             : {
      35    24629600 :   return _coef * ReactionTempl<is_ad>::computeQpResidual();
      36             : }
      37             : 
      38             : template <bool is_ad>
      39             : Real
      40    18049920 : CoefReactionTempl<is_ad>::computeQpJacobian()
      41             : {
      42             :   mooseAssert(!is_ad,
      43             :               "In ADCoefReaction, computeQpJacobian should not be called. Check computeJacobian "
      44             :               "implementation.");
      45    18049920 :   return _coef * ReactionTempl<is_ad>::computeQpJacobian();
      46             : }
      47             : 
      48             : template class CoefReactionTempl<false>;
      49             : template class CoefReactionTempl<true>;

Generated by: LCOV version 1.14