21 "Declares material properties based on names and values prescribed by input parameters.");
23 "prop_names",
"The names of the properties this material will have");
25 "The values associated with the named properties");
35 _prop_names(getParam<
std::vector<
std::string>>(
"prop_names")),
36 _prop_values(getParam<
std::vector<
Real>>(
"prop_values"))
41 if (num_names != num_values)
43 "Number of prop_names must match the number of prop_values for a GenericConstantMaterial!");
57 computeQpProperties();
64 for (
unsigned int i = 0; i < _num_props; i++)
65 (*_properties[i])[_qp] = _prop_values[i];
std::vector< GenericMaterialProperty< Real, is_ad > * > _properties
GenericConstantMaterialTempl(const InputParameters ¶meters)
registerMooseObject("MooseApp", GenericConstantMaterial)
const std::vector< Real > & _prop_values
static InputParameters validParams()
virtual void computeQpProperties() override
Users must override this method.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const std::vector< std::string > & _prop_names
static InputParameters validParams()
Materials compute MaterialProperties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This material automatically declares as material properties whatever is passed to it through the para...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.