16 GenericConstantVectorFunctorMaterial,
20 ADGenericConstantVectorFunctorMaterial,
31 "FunctorMaterial object for declaring vector properties that are populated by "
32 "evaluation of functor (constants, functions, variables, matprops) object.");
34 "prop_names",
"The names of the properties this material will have");
37 "The corresponding names of the "
38 "functors that are going to provide "
39 "the values for the vector material properties");
47 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
48 _prop_values(getParam<
std::vector<MooseFunctorName>>(
"prop_values"))
53 if (num_names * LIBMESH_DIM != num_values)
54 mooseError(
"Number of prop_names times three must match the number of prop_values for a "
55 "GenericVectorFunctorMaterial!");
58 for (
const auto i : make_range(num_names))
59 for (
const auto j : make_range(num_values))
62 "prop_names should not be the same as any of the prop_values. They"
63 " can both be functors, and functors may not have the same name.");
68 for (
const auto i : make_range(num_values))
74 addFunctorProperty<GenericRealVectorValue<is_ad>>(
78 return {(*
_functors[LIBMESH_DIM * i])(r, t),
83 addFunctorProperty<GenericRealVectorValue<is_ad>>(
87 return {
_functors[LIBMESH_DIM * i]->dot(r, t),
88 _functors[LIBMESH_DIM * i + 1]->dot(r, t),
89 _functors[LIBMESH_DIM * i + 2]->dot(r, t)};
registerMooseObjectRenamed("MooseApp", GenericConstantVectorFunctorMaterial, "06/30/2022 24:00", GenericVectorFunctorMaterial)
registerMooseObject("MooseApp", GenericVectorFunctorMaterial)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Moose::GenericType< Real, is_ad > GenericReal
Moose::GenericType< RealVectorValue, is_ad > GenericRealVectorValue
const ExecFlagType EXEC_ALWAYS
A MultiMooseEnum object to hold "execute_on" flags.
const Moose::Functor< T > & getFunctor(const std::string &name)
Retrieves a functor from the subproblem.
FunctorMaterials compute functor material properties.
static InputParameters validParams()
This material automatically declares as functor material properties whatever is passed to it through ...
static InputParameters validParams()
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _functors
Vector of the functors, inner-ordering per vector component.
unsigned int _num_props
Number of properties to define.
std::vector< std::string > _prop_names
Names of the functor vector material properties to define.
std::vector< MooseFunctorName > _prop_values
Names of the functors to evaluate for the component of these vector properties.
GenericVectorFunctorMaterialTempl(const InputParameters ¶meters)
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 ...
MooseEnumIterator end() const
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
T timeDerivName(const T &base_prop_name)
automatic prefixing for naming material properties based on time derivatives of coupled variables/fun...