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 "MaterialRateRealAux.h" 11 : 12 : registerMooseObject("MooseApp", MaterialRateRealAux); 13 : registerMooseObject("MooseApp", ADMaterialRateRealAux); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 28557 : MaterialRateRealAuxTempl<is_ad>::validParams() 18 : { 19 28557 : InputParameters params = MaterialAuxBaseTempl<Real, is_ad>::validParams(); 20 28557 : params.addClassDescription("Outputs element material properties rate of change"); 21 28557 : return params; 22 0 : } 23 : 24 : template <bool is_ad> 25 14 : MaterialRateRealAuxTempl<is_ad>::MaterialRateRealAuxTempl(const InputParameters & parameters) 26 14 : : MaterialRateAuxBaseTempl<Real, is_ad>(parameters) 27 : { 28 14 : } 29 : 30 : template <bool is_ad> 31 : Real 32 728 : MaterialRateRealAuxTempl<is_ad>::getRealValue() 33 : { 34 728 : Real prop = MetaPhysicL::raw_value(this->_full_value); 35 728 : Real prop_old = MetaPhysicL::raw_value(this->_prop_old[this->_qp]); 36 728 : Real rate = (prop - prop_old) / this->_dt; 37 728 : return rate; 38 : } 39 : 40 : template class MaterialRateRealAuxTempl<false>; 41 : template class MaterialRateRealAuxTempl<true>;