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];
registerMooseObject("MooseApp", GenericConstantVectorMaterial)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
virtual void computeQpProperties() override
Users must override this method.
std::vector< std::string > _prop_names
The names of the constant vector material properties.
const std::vector< Real > & _prop_values
The vector values of each vector material property.
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
unsigned int _num_props
The number of constant vector material properties defined.
static InputParameters validParams()
GenericConstantVectorMaterialTempl(const InputParameters ¶meters)
std::vector< GenericMaterialProperty< RealVectorValue, is_ad > * > _properties
A vector of pointer to the material properties.
Materials compute MaterialProperties.
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.