22 "The names of the properties this material will have");
24 "The values associated with the named properties");
27 "A material evaluating one material property in type of RealEigenMatrix");
36 _prop_name(getParam<
std::string>(
"prop_name")),
37 _prop_value(getParam<RealEigenMatrix>(
"prop_value")),
38 _property(declareGenericProperty<RealEigenMatrix, is_ad>(_prop_name))
43std::pair<std::size_t, std::size_t>
45 const MaterialPropertyName & prop_name)
const
47 libmesh_ignore(prop_name);
48 mooseAssert(prop_name == _prop_name,
49 "Property '" + prop_name +
"' is not declared by this material");
50 return {_prop_value.rows(), _prop_value.cols()};
57 computeQpProperties();
64 auto & qp_prop = _property[_qp];
65 const auto m = _prop_value.rows(), n = _prop_value.cols();
67 for (
const auto i : make_range(m))
68 for (
const auto j : make_range(n))
69 qp_prop(i, j) = _prop_value(i, j);
registerMooseObject("MooseApp", GenericConstant2DArray)
Template for defining a constant array material property, using automatic differentiation or not.
static InputParameters validParams()
GenericConstant2DArrayTempl(const InputParameters ¶meters)
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
virtual std::pair< std::size_t, std::size_t > getMatrixPropertySize(const MaterialPropertyName &prop_name) const override
Return the number of rows and columns of the variable size matrix material property that the material...
virtual void computeQpProperties() override
Users must override this method.
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...
Interface class to return the size of material properties that do not have a fixed size.