17 #include "libmesh/fparser_ad.hh" 19 #define usingParsedMaterialHelperMembers(T) \ 20 usingFunctionMaterialBaseMembers(T); \ 21 usingFunctionParserUtilsMembers(T); \ 22 using typename ParsedMaterialHelper<T>::VariableNameMappingMode; \ 23 using typename ParsedMaterialHelper<T>::MatPropDescriptorList; \ 24 using ParsedMaterialHelper<T>::functionParse; \ 25 using ParsedMaterialHelper<T>::functionsPostParse; \ 26 using ParsedMaterialHelper<T>::_func_F; \ 27 using ParsedMaterialHelper<T>::_symbol_names; \ 28 using ParsedMaterialHelper<T>::_mat_prop_descriptors; \ 29 using ParsedMaterialHelper<T>::_tol; \ 30 using ParsedMaterialHelper<T>::_postprocessor_values; \ 31 using ParsedMaterialHelper<T>::_extra_symbols; \ 32 using ParsedMaterialHelper<T>::_functors; \ 33 using ParsedMaterialHelper<T>::_map_mode 83 const std::vector<std::string> & constant_names,
84 const std::vector<std::string> & constant_expressions);
101 const std::vector<std::string> & constant_names,
102 const std::vector<std::string> & constant_expressions,
103 const std::vector<std::string> & mat_prop_names,
104 const std::vector<std::string> & tol_names,
105 const std::vector<Real> & tol_values);
122 const std::vector<std::string> & constant_names,
123 const std::vector<std::string> & constant_expressions,
124 const std::vector<std::string> & mat_prop_names,
125 const std::vector<PostprocessorName> & postprocessor_names,
126 const std::vector<std::string> & tol_names,
127 const std::vector<Real> & tol_values);
146 const std::vector<std::string> & constant_names,
147 const std::vector<std::string> & constant_expressions,
148 const std::vector<std::string> & mat_prop_names,
149 const std::vector<PostprocessorName> & postprocessor_names,
150 const std::vector<std::string> & tol_names,
151 const std::vector<Real> & tol_values,
152 const std::vector<MooseFunctorName> & functor_names,
153 const std::vector<std::string> & functor_symbols);
void insertReservedNames(std::set< std::string > &reserved_names)
Populates the given set with names not to be used as user-defined symbol (e.g.
std::vector< MaterialBase * > _upstream_mat
Vector to hold list of materials that must be updated prior to evaluating current material (for compu...
virtual void initialSetup() override final
Gets called at the beginning of the simulation before this object is asked to do its job...
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
std::vector< const Moose::Functor< Real > * > _functors
Vector of pointers to functors.
Material properties get fully described using this structure, including their dependent variables and...
std::vector< SymbolName > _symbol_names
Symbol names used in the expression (depends on the map_mode).
void computeQpProperties() override
Users must override this method.
Material base class, central to all Materials that provide a Function as a material property value...
MatPropDescriptorList _mat_prop_descriptors
Material property descriptors (obtained by parsing _mat_prop_expressions)
usingFunctionMaterialBaseMembers(is_ad)
usingFunctionParserUtilsMembers(is_ad)
static InputParameters validParams()
std::vector< const PostprocessorValue * > _postprocessor_values
List of coupled Postprocessors.
FunctorEnvelope< T > Functor
DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
Real PostprocessorValue
various MOOSE typedefs
const std::vector< ExtraSymbols > _extra_symbols
Extra symbols.
const VariableNameMappingMode _map_mode
Flag to indicate if MOOSE nonlinear variable names should be used as FParser variable names...
void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
std::vector< Real > _tol
Tolerance values for all arguments (to protect from log(0)).
std::vector< MaterialName > _upstream_mat_names
Vector to hold list of material names that must be updated prior to evaluating current material (for ...
Helper class to perform the parsing and optimization of the function expression.
const bool _error_on_missing_material_properties
This is true by default, but can be disabled to make non-existing properties default to zero...
SymFunctionPtr _func_F
The undiffed free energy function parser object.
const InputParameters & parameters() const
Get the parameters of the object.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
MaterialBases compute MaterialProperties.
ParsedMaterialHelper(const InputParameters ¶meters, VariableNameMappingMode map_mode)
virtual void functionsPostParse()
void functionParse(const std::string &function_expression)
This method sets up and parses the function string given by the user.
std::vector< FunctionMaterialPropertyDescriptor< is_ad > > MatPropDescriptorList
convenience typedef for the material property descriptors