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