11 #include "RankTwoTensor.h"
12 #include "RankFourTensor.h"
22 params.addClassDescription(
"Compute a global stress form multiple phase stresses");
23 params.addParam<std::vector<MaterialPropertyName>>(
24 "h",
"Switching Function Materials that provide h(eta_i)");
25 params.addRequiredParam<std::vector<std::string>>(
"phase_base",
26 "Base names for the Phase strains");
27 params.addParam<std::string>(
"base_name",
"Base name for the computed global stress (optional)");
32 : Material(parameters),
33 _h_list(getParam<std::vector<MaterialPropertyName>>(
"h")),
34 _n_phase(_h_list.size()),
36 _phase_base(getParam<std::vector<std::string>>(
"phase_base")),
37 _phase_stress(_n_phase),
38 _dphase_stress_dstrain(_n_phase),
39 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
40 _stress(declareProperty<
RankTwoTensor>(_base_name +
"stress")),
41 _dstress_dstrain(declareProperty<
RankFourTensor>(_base_name +
"Jacobian_mult"))
46 "h and phase_base input vectors need to have the same length in MultiPhaseStressMaterial ",
49 for (
unsigned int i = 0; i <
_n_phase; ++i)
54 &getMaterialProperty<RankFourTensor>(
_phase_base[i] +
"_Jacobian_mult");
64 for (
unsigned int i = 0; i <
_n_phase; ++i)