15#include "libmesh/fparser_ad.hh"
17#define usingDerivativeParsedMaterialHelperMembers(T) \
18 usingParsedMaterialHelperMembers(T); \
19 using typename DerivativeParsedMaterialHelperTempl<T>::Derivative; \
20 using typename DerivativeParsedMaterialHelperTempl<T>::MaterialPropertyDerivativeRule; \
21 using DerivativeParsedMaterialHelperTempl<T>::_derivative_order; \
22 using DerivativeParsedMaterialHelperTempl<T>::_derivatives
38 const VariableNameMappingMode map_mode = VariableNameMappingMode::USE_PARAM_NAMES,
39 const std::optional<std::string> & function_param_name = {});
45 struct MaterialPropertyDerivativeRule;
57 recurseDerivative(
unsigned int var,
unsigned int order,
const Derivative & parent_derivative);
94 :
_parent(p), _var(v), _child(c)
DerivativeParsedMaterialHelperTempl< true > ADDerivativeParsedMaterialHelper
DerivativeParsedMaterialHelperTempl< false > DerivativeParsedMaterialHelper
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
const ParallelParamObject & _parent
Helper class to perform the auto derivative taking.
DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
static InputParameters validParams()
std::vector< std::size_t > _derivative_symbol_table
list of all indices into _variable_names to take derivatives, w.r.t.
void computeQpProperties() override
Users must override this method.
unsigned int _derivative_order
maximum derivative order
void recurseMatProps(unsigned int var, unsigned int order, const MatPropDescriptorList &parent_mpd)
void recurseDerivative(unsigned int var, unsigned int order, const Derivative &parent_derivative)
std::vector< Derivative > _derivatives
The requested derivatives of the free energy (sorted by order)
usingParsedMaterialHelperMembers(is_ad)
void functionsPostParse() override
std::vector< MaterialPropertyDerivativeRule > _bulk_rules
unsigned int _dmatvar_index
next available variable number for automatically created material property derivative variables
void assembleDerivatives()
Perform construction of all requested derivatives.
const std::string _dmatvar_base
variable base name for the dynamically material property derivatives
void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
const InputParameters & parameters() const
Get the parameters of the object.
Helper class to perform the parsing and optimization of the function expression.
std::vector< FunctionMaterialPropertyDescriptor< is_ad > > MatPropDescriptorList
convenience typedef for the material property descriptors
GenericMaterialProperty< Real, is_ad > * _mat_prop
std::vector< SymbolName > _darg_names
MaterialPropertyDerivativeRule(std::string p, std::string v, std::string c)