22 "prescribed by input parameters.");
24 "prop_names",
"The names of the properties this material will have");
26 "The values associated with the named properties. " 27 "The vector lengths must be the same.");
37 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
38 _prop_values(getParam<
std::vector<
Real>>(
"prop_values"))
43 if (num_values != num_names * LIBMESH_DIM)
44 mooseError(
"prop_values must be a equal to dim * number of prop_names for a " 45 "GenericConstantVectorMaterial.");
58 computeQpProperties();
65 for (
unsigned int i = 0; i < _num_props; i++)
67 (*_properties[i])[_qp](j) = _prop_values[i * LIBMESH_DIM + j];
std::vector< GenericMaterialProperty< RealVectorValue, is_ad > * > _properties
A vector of pointer to the material properties.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
const std::vector< Real > & _prop_values
The vector values of each vector material property.
registerMooseObject("MooseApp", GenericConstantVectorMaterial)
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
static InputParameters validParams()
virtual void computeQpProperties() override
Users must override this method.
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Materials compute MaterialProperties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< std::string > _prop_names
The names of the constant vector material properties.
GenericConstantVectorMaterialTempl(const InputParameters ¶meters)
unsigned int _num_props
The number of constant vector material properties defined.