17 GenericConstantFunctorMaterial,
21 ADGenericConstantFunctorMaterial,
25 GenericFunctionFunctorMaterial,
29 ADGenericFunctionFunctorMaterial,
40 "FunctorMaterial object for declaring properties that are populated by evaluation of a " 41 "Functor (a constant, variable, function or functor material property) objects.");
42 params.
addParam<std::vector<std::string>>(
"prop_names",
43 "The names of the properties this material will have");
44 params.
addParam<std::vector<MooseFunctorName>>(
"prop_values",
45 "The corresponding names of the " 46 "functors that are going to provide " 47 "the values for the variables");
48 params.
addParam<
bool>(
"define_dot_functors",
50 "Whether to define additional functors for the time derivative and the " 51 "time derivative of the gradient");
58 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
59 _prop_values(getParam<
std::vector<MooseFunctorName>>(
"prop_values"))
64 if (num_names != num_values)
65 mooseError(
"Number of prop_names must match the number of prop_values for a " 66 "GenericFunctorMaterial!");
73 "prop_names should not be the same as any of the prop_values. They" 74 " can both be functors, and functors may not have the same name.");
85 addFunctorProperty<GenericReal<is_ad>>(
90 if (getParam<bool>(
"define_dot_functors"))
92 addFunctorProperty<GenericReal<is_ad>>(
97 addFunctorProperty<GenericRealVectorValue<is_ad>>(
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Vector of the functors.
Moose::GenericType< Real, is_ad > GenericReal
A MultiMooseEnum object to hold "execute_on" flags.
static InputParameters validParams()
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
unsigned int _num_props
Number of properties to define.
registerMooseObjectRenamed("MooseApp", GenericConstantFunctorMaterial, "06/30/2022 24:00", GenericFunctorMaterial)
std::vector< MooseFunctorName > _prop_values
Names of the functors to evaluate for those properties.
MooseEnumIterator end() const
GenericFunctorMaterialTempl(const InputParameters ¶meters)
const ExecFlagType EXEC_ALWAYS
static InputParameters validParams()
FunctorMaterials compute functor material properties.
registerMooseObject("MooseApp", GenericFunctorMaterial)
Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const ExecFlagEnum & _execute_enum
Execute settings for this object.
This material automatically declares as functor material properties whatever is passed to it through ...
T gradName(const T &base_prop_name)
automatic prefixing for naming material properties based on gradients of coupled variables/functors ...
T timeDerivName(const T &base_prop_name)
automatic prefixing for naming material properties based on time derivatives of coupled variables/fun...
IntRange< T > make_range(T beg, T end)
std::vector< std::string > _prop_names
Names of the functor material properties to define.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.