23 "Material object for defining rank two tensor properties using functions.");
25 "tensor_functions",
"Vector of Function names defining the rank two tensor");
27 "tensor_name",
"Name of the tensor material property to be created");
36 getParam<MaterialPropertyName>(
"tensor_name"))),
37 _function_names(getParam<
std::vector<FunctionName>>(
"tensor_functions")),
38 _num_functions(_function_names.size()),
39 _functions(_num_functions)
56 std::vector<GenericReal<is_ad>> values(_num_functions);
57 for (
unsigned int i = 0; i < _num_functions; i++)
58 values[i] = (*_functions[i]).value(_t, _q_point[_qp]);
60 _prop[_qp].fillFromInputVector(values);
virtual void computeQpProperties() override
Users must override this method.
const unsigned int _num_functions
static InputParameters validParams()
Declares a function material property of type RankTwoTensor.
static InputParameters validParams()
std::vector< const Function * > _functions
const std::vector< FunctionName > _function_names
Materials compute MaterialProperties.
GenericFunctionRankTwoTensorTempl(const InputParameters ¶meters)
const Function & getFunctionByName(const FunctionName &name) const
Get a function with a given name.
virtual void initQpStatefulProperties() override
Initialize stateful properties at quadrature points.
registerMooseObject("MooseApp", GenericFunctionRankTwoTensor)