25 template <
int N,
bool is_ad = false,
int MaxD = 3>
30 const std::array<std::string, N> variables);
53 std::array<GenericMaterialProperty<Real, is_ad> *,
54 CompileTimeDerivativesMaterialInternal::total_derivatives<MaxD, N>()>
67 template <std::size_t... Ns>
69 const unsigned int & qp,
70 std::index_sequence<Ns...>)
72 return std::make_tuple(
73 CompileTimeDerivatives::makeRef<Ns>(coupledGenericValue<is_ad>(variables[Ns]), qp)...);
76 template <std::
size_t I>
80 template <std::size_t I, std::size_t first, std::size_t... tail>
86 _prop_dF[I] = &declarePropertyDerivative<Real, is_ad>(
88 loopDeclareProperties<I + 1>(details::increment<N>(int_seq));
91 loopDeclareProperties<I>(details::increment<N>(int_seq));
100 loopDeclareProperties<0>(zeroes<MaxD>());
103 template <std::
size_t I,
typename T>
107 template <std::size_t I,
typename T, std::size_t first, std::size_t... tail>
108 constexpr
void loopEvaluate(
const T & expression, std::index_sequence<first, tail...> int_seq)
114 loopEvaluate<I + 1>(expression, details::increment<N>(int_seq));
117 loopEvaluate<I>(expression, details::increment<N>(int_seq));
121 template <
int N,
bool is_ad,
int MaxD>
127 "Name of the parsed material property");
131 template <
int N,
bool is_ad,
int MaxD>
133 const InputParameters & params,
const std::array<std::string, N> variables)
141 _var_name[i] = coupledName(variables[i]);
147 template <
int N,
bool is_ad,
int MaxD>
148 template <
typename T>
154 loopEvaluate<0>(F, zeroes<MaxD>());
GenericMaterialProperty< Real, is_ad > & _prop_F
constexpr void loopDeclareProperties(std::index_sequence<>)
constexpr auto make_tuple_array(std::index_sequence< Ns... >)
Create a tuple with sizeof...(Ns) entries, containing CTArrayRefs with tags given by the Ns...
auto makeRefsTuple(const std::array< std::string, N > &variables, const unsigned int &qp, std::index_sequence< Ns... >)
CompileTimeDerivativesMaterial(const InputParameters ¶ms, const std::array< std::string, N > variables)
auto & declareGenericProperty(const std::string &prop_name)
auto take_derivatives(const T &expression, std::index_sequence< first, tags... >)
Take all derivatives of expression listed in the index sequence.
InputParameters validParams()
constexpr void loopEvaluate(const T &, std::index_sequence<>)
std::array< GenericMaterialProperty< Real, is_ad > *, CompileTimeDerivativesMaterialInternal::total_derivatives< MaxD, N >)> _prop_dF
A serialized list of material properties for all derivatives up to and including order MaxD...
void declareProperties()
Entry point for the compile time loop that declares all derivative material properties.
const MaterialPropertyName _F_name
constexpr void loopEvaluate(const T &expression, std::index_sequence< first, tail... > int_seq)
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
const std::string & type() const
Get the type of this class.
decltype(CompileTimeDerivativesMaterialInternal::make_tuple_array< GenericVariableValue< is_ad >>(std::make_index_sequence< N >{})) ::type _refs
Set up a tuple with one entry per coupled variable (each entry with an increment).
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
constexpr bool is_sorted()
Check if the given index sequence is sorted ()internal function)
Materials compute MaterialProperties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface class ("Veneer") to provide generator methods for derivative material property names...
static InputParameters validParams()
IntRange< T > make_range(T beg, T end)
void evaluate(const T &F)
Entry point for the compile time loop that evaluates all derivatives and assigns them to their respec...
constexpr void loopDeclareProperties(std::index_sequence< first, tail... > int_seq)
std::array< VariableName, N > _var_name
The names of the coupled variables.
Material class to set up an expression and its derivatives built at compile time using the CompileTim...