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 "DerivativeParsedMaterial.h" 11 : 12 : registerMooseObject("MooseApp", DerivativeParsedMaterial); 13 : registerMooseObject("MooseApp", ADDerivativeParsedMaterial); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 31708 : DerivativeParsedMaterialTempl<is_ad>::validParams() 18 : { 19 : 20 31708 : InputParameters params = DerivativeParsedMaterialHelperTempl<is_ad>::validParams(); 21 31708 : params += ParsedMaterialBase::validParams(); 22 31708 : params.addClassDescription("Parsed Function Material with automatic derivatives."); 23 31708 : return params; 24 0 : } 25 : 26 : template <bool is_ad> 27 2442 : DerivativeParsedMaterialTempl<is_ad>::DerivativeParsedMaterialTempl( 28 : const InputParameters & parameters) 29 : : DerivativeParsedMaterialHelperTempl<is_ad>(parameters, 30 : VariableNameMappingMode::USE_MOOSE_NAMES), 31 2442 : ParsedMaterialBase(parameters, this) 32 : { 33 : // Build function, take derivatives, optimize 34 4872 : functionParse(_function, 35 2442 : _constant_names, 36 2442 : _constant_expressions, 37 : this->template getParam<std::vector<std::string>>("material_property_names"), 38 : this->template getParam<std::vector<PostprocessorName>>("postprocessor_names"), 39 2442 : _tol_names, 40 2442 : _tol_values, 41 2442 : _functor_names, 42 2442 : _functor_symbols); 43 2430 : } 44 : 45 : // explicit instantiation 46 : template class DerivativeParsedMaterialTempl<false>; 47 : template class DerivativeParsedMaterialTempl<true>;