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