LCOV - code coverage report
Current view: top level - include/auxkernels - MaterialRateAuxBase.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 3 3 100.0 %
Date: 2025-07-17 01:28:37 Functions: 1 2 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             : #pragma once
      11             : 
      12             : // MOOSE includes
      13             : #include "MaterialAuxBase.h"
      14             : 
      15             : /**
      16             :  * A base class for the various Material related AuxKernal objects.
      17             :  * \p RT is short for return type
      18             :  */
      19             : template <typename T, bool is_ad, typename RT = Real>
      20             : class MaterialRateAuxBaseTempl : public MaterialAuxBaseTempl<RT, is_ad>
      21             : {
      22             : public:
      23             :   static InputParameters validParams();
      24             :   MaterialRateAuxBaseTempl(const InputParameters & parameters);
      25             : 
      26             : protected:
      27             :   /// Returns material rate property values at quadrature points
      28             :   virtual RT getRealValue() = 0;
      29             : 
      30             :   /// Reference to the old material property for this AuxKernel
      31             :   const MaterialProperty<T> & _prop_old;
      32             : };
      33             : 
      34             : template <typename T, bool is_ad, typename RT>
      35             : InputParameters
      36             : MaterialRateAuxBaseTempl<T, is_ad, RT>::validParams()
      37             : {
      38             :   InputParameters params = MaterialAuxBaseTempl<RT, is_ad>::validParams();
      39             :   return params;
      40             : }
      41             : 
      42             : template <typename T, bool is_ad, typename RT>
      43          13 : MaterialRateAuxBaseTempl<T, is_ad, RT>::MaterialRateAuxBaseTempl(const InputParameters & parameters)
      44             :   : MaterialAuxBaseTempl<RT, is_ad>(parameters),
      45          13 :     _prop_old(this->template getMaterialPropertyOld<T>("property"))
      46             : {
      47          13 : }
      48             : 
      49             : template <typename T = Real>
      50             : using MaterialRateAuxBase = MaterialRateAuxBaseTempl<T, false, Real>;

Generated by: LCOV version 1.14