LCOV - code coverage report
Current view: top level - src/materials - PorousFlowRelativePermeabilityConst.C (source / functions) Hit Total Coverage
Test: idaholab/moose porous_flow: #31405 (292dce) with base fef103 Lines: 12 13 92.3 %
Date: 2025-09-04 07:55:56 Functions: 8 8 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 "PorousFlowRelativePermeabilityConst.h"
      11             : 
      12             : registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityConst);
      13             : registerMooseObject("PorousFlowApp", ADPorousFlowRelativePermeabilityConst);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17       10637 : PorousFlowRelativePermeabilityConstTempl<is_ad>::validParams()
      18             : {
      19       10637 :   InputParameters params = PorousFlowRelativePermeabilityBaseTempl<is_ad>::validParams();
      20       21274 :   params.addParam<Real>("kr", 1.0, "Relative permeability");
      21       10637 :   params.addClassDescription(
      22             :       "This class sets the relative permeability to a constant value (default = 1)");
      23       10637 :   return params;
      24           0 : }
      25             : 
      26             : template <bool is_ad>
      27        8325 : PorousFlowRelativePermeabilityConstTempl<is_ad>::PorousFlowRelativePermeabilityConstTempl(
      28             :     const InputParameters & parameters)
      29             :   : PorousFlowRelativePermeabilityBaseTempl<is_ad>(parameters),
      30       16650 :     _relperm(this->template getParam<Real>("kr"))
      31             : {
      32        8325 : }
      33             : 
      34             : template <bool is_ad>
      35    13870669 : GenericReal<is_ad> PorousFlowRelativePermeabilityConstTempl<is_ad>::relativePermeability(
      36             :     GenericReal<is_ad> /*seff*/) const
      37             : {
      38    13870669 :   return _relperm;
      39             : }
      40             : 
      41             : template <bool is_ad>
      42    13870669 : Real PorousFlowRelativePermeabilityConstTempl<is_ad>::dRelativePermeability(Real /*seff*/) const
      43             : {
      44    13870669 :   return 0.0;
      45             : }
      46             : 
      47             : template class PorousFlowRelativePermeabilityConstTempl<false>;
      48             : template class PorousFlowRelativePermeabilityConstTempl<true>;

Generated by: LCOV version 1.14