16 GenericConstantVectorFunctorMaterial,
20 ADGenericConstantVectorFunctorMaterial,
31 "FunctorMaterial object for declaring vector properties that are populated by " 32 "evaluation of functor (constants, functions, variables, matprops) object.");
33 params.
addParam<std::vector<std::string>>(
"prop_names",
34 "The names of the properties this material will have");
35 params.
addParam<std::vector<MooseFunctorName>>(
"prop_values",
36 "The corresponding names of the " 37 "functors that are going to provide " 38 "the values for the vector material properties");
46 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
47 _prop_values(getParam<
std::vector<MooseFunctorName>>(
"prop_values"))
52 if (num_names * LIBMESH_DIM != num_values)
53 mooseError(
"Number of prop_names times three must match the number of prop_values for a " 54 "GenericVectorFunctorMaterial!");
61 "prop_names should not be the same as any of the prop_values. They" 62 " can both be functors, and functors may not have the same name.");
73 addFunctorProperty<GenericRealVectorValue<is_ad>>(
77 return {(*
_functors[LIBMESH_DIM * i])(r, t),
82 addFunctorProperty<GenericRealVectorValue<is_ad>>(
86 return {
_functors[LIBMESH_DIM * i]->dot(r, t),
87 _functors[LIBMESH_DIM * i + 1]->dot(r, t),
88 _functors[LIBMESH_DIM * i + 2]->dot(r, t)};
std::vector< MooseFunctorName > _prop_values
Names of the functors to evaluate for the component of these vector properties.
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.
std::vector< std::string > _prop_names
Names of the functor vector material properties to define.
MooseEnumIterator end() const
static InputParameters validParams()
This material automatically declares as functor material properties whatever is passed to it through ...
GenericVectorFunctorMaterialTempl(const InputParameters ¶meters)
const ExecFlagType EXEC_ALWAYS
FunctorMaterials compute functor material properties.
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.
unsigned int _num_props
Number of properties to define.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Vector of the functors, inner-ordering per vector component.
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)
registerMooseObjectRenamed("MooseApp", GenericConstantVectorFunctorMaterial, "06/30/2022 24:00", GenericVectorFunctorMaterial)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
registerMooseObject("MooseApp", GenericVectorFunctorMaterial)