LCOV - code coverage report
Current view: top level - src/materials - PorousFlowPermeabilityKozenyCarmanFromVar.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: 3 6 50.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 "PorousFlowPermeabilityKozenyCarmanFromVar.h"
      11             : 
      12             : registerMooseObject("PorousFlowApp", PorousFlowPermeabilityKozenyCarmanFromVar);
      13             : registerMooseObject("PorousFlowApp", ADPorousFlowPermeabilityKozenyCarmanFromVar);
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17          96 : PorousFlowPermeabilityKozenyCarmanFromVarTempl<is_ad>::validParams()
      18             : {
      19          96 :   InputParameters params = PorousFlowPermeabilityKozenyCarmanBase::validParams();
      20         192 :   params.addRequiredCoupledVar("A", "Variable used in permeability function.");
      21          96 :   params.addClassDescription("This Material calculates the permeability tensor from the "
      22             :                              "Kozeny-Carman equation for spatially varying initial properties.");
      23          96 :   return params;
      24           0 : }
      25             : 
      26             : template <bool is_ad>
      27          75 : PorousFlowPermeabilityKozenyCarmanFromVarTempl<
      28             :     is_ad>::PorousFlowPermeabilityKozenyCarmanFromVarTempl(const InputParameters & parameters)
      29          75 :   : PorousFlowPermeabilityKozenyCarmanBaseTempl<is_ad>(parameters), _A(coupledValue("A"))
      30             : {
      31          75 : }
      32             : 
      33             : template <bool is_ad>
      34             : Real
      35         342 : PorousFlowPermeabilityKozenyCarmanFromVarTempl<is_ad>::computeA() const
      36             : {
      37         342 :   if (_A[_qp] < 0)
      38           2 :     mooseError("The variable A must be greater than zero; A = ", _A[_qp], ".");
      39         340 :   return _A[_qp];
      40             : }
      41             : 
      42             : template class PorousFlowPermeabilityKozenyCarmanFromVarTempl<false>;
      43             : template class PorousFlowPermeabilityKozenyCarmanFromVarTempl<true>;

Generated by: LCOV version 1.14