23 "FunctorMaterial object for declaring properties that are populated by evaluation of " 24 "gradients of Functors (a constant, variable, function or functor material property) " 26 params.
addParam<std::vector<std::string>>(
"prop_names",
27 "The names of the properties this material will have");
29 params.
addParam<std::vector<MooseFunctorName>>(
"prop_values",
30 "The corresponding names of the " 31 "functors which gradient are going to provide " 32 "the values for the variables");
40 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
41 _prop_values(getParam<
std::vector<MooseFunctorName>>(
"prop_values"))
46 if (num_names != num_values)
47 mooseError(
"Number of prop_names must match the number of prop_values for a " 48 "GenericFunctorGradientMaterial!");
55 "prop_names should not be the same as any of the prop_values. They" 56 " can both be functors, and functors may not have the same name.");
69 {
return (*
_functors[i]).gradient(r, t); },
A MultiMooseEnum object to hold "execute_on" flags.
registerMooseObject("MooseApp", GenericFunctorGradientMaterial)
unsigned int _num_props
Number of properties to define.
static InputParameters validParams()
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
static InputParameters validParams()
This material automatically declares as functor material properties whatever is passed to it through ...
std::vector< MooseFunctorName > _prop_values
Names of the functors to evaluate for those properties.
std::vector< std::string > _prop_names
Names of the functor material properties to define.
MooseEnumIterator end() const
const ExecFlagType EXEC_ALWAYS
GenericFunctorGradientMaterialTempl(const InputParameters ¶meters)
FunctorMaterials compute functor material properties.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Vector of the functors.
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.
const Moose::FunctorBase< T > & addFunctorProperty(const std::string &name, PolymorphicLambda my_lammy, const std::set< ExecFlagType > &clearance_schedule={EXEC_ALWAYS})
Declare a functor material property.
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.