13 template <
bool is_ad,
typename T>
19 "elasticity_tensor_prefactor",
20 "Optional function to use as a scalar prefactor on the elasticity tensor.");
21 params.
addParam<std::string>(
"base_name",
22 "Optional parameter that allows the user to define " 23 "multiple mechanics material systems on the same " 24 "block, i.e. for multiple phases");
28 template <
bool is_ad,
typename T>
33 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
34 _elasticity_tensor_name(_base_name +
"elasticity_tensor"),
35 _elasticity_tensor(declareGenericProperty<T, is_ad>(_elasticity_tensor_name)),
36 _effective_stiffness(declareGenericProperty<
Real, is_ad>(_base_name +
"effective_stiffness")),
37 _prefactor_function(isParamValid(
"elasticity_tensor_prefactor")
38 ? &getFunction(
"elasticity_tensor_prefactor")
43 template <
bool is_ad,
typename T>
47 _effective_stiffness[_qp] = 0;
48 computeQpElasticityTensor();
51 if (_prefactor_function)
53 _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
54 _effective_stiffness[_qp] *=
std::sqrt(_prefactor_function->value(_t, _q_point[_qp]));
ComputeElasticityTensorBase the base class for computing elasticity tensors.
Add-on class that provides the functionality to issue guarantees for declared material properties...
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
static InputParameters validParams()
static InputParameters validParams()
ComputeElasticityTensorBaseTempl(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeQpProperties()