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 : #include "InputParameters.h" 13 : 14 : /** 15 : * Helper class for ParsedMaterial and DerivativeParsedMaterial 16 : * to declare and read the input parameters. 17 : */ 18 : class ParsedMaterialBase 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : 23 : ParsedMaterialBase(const InputParameters & parameters); 24 4086 : virtual ~ParsedMaterialBase() = default; 25 : 26 : protected: 27 : /// Parameter that the function comes from 28 : const std::string _function_param; 29 : 30 : /// function expression 31 : const std::string _function; 32 : 33 : /// constant vectors 34 : std::vector<std::string> _constant_names; 35 : std::vector<std::string> _constant_expressions; 36 : 37 : /// tolerance vectors 38 : std::vector<std::string> _tol_names; 39 : std::vector<Real> _tol_values; 40 : 41 : /// Functor vectors (names, count, and symbols) 42 : std::vector<MooseFunctorName> _functor_names; 43 : std::vector<std::string> _functor_symbols; 44 : 45 : /** 46 : * Function to ensure that the names of constants, tolerances, and functors do not overlap with 47 : * each other and (optional) additional names. 48 : * @param reserved_names optional set of names additionaly not to be allowed. 49 : */ 50 : void validateVectorNames(const std::set<std::string> & reserved_names = {}); 51 : };