11 #include "RankTwoTensor.h"
12 #include "RankFourTensor.h"
22 params.addClassDescription(
"Compute a global stress in a two phase model");
23 params.addParam<MaterialPropertyName>(
24 "h",
"h",
"Switching Function Material that provides h(eta)");
25 params.addRequiredParam<std::string>(
"base_A",
"Base name for the Phase A strain.");
26 params.addRequiredParam<std::string>(
"base_B",
"Base name for the Phase B strain.");
27 params.addParam<std::string>(
"base_name",
"Base name for the computed global stress (optional).");
32 : DerivativeMaterialInterface<Material>(parameters),
33 _h_eta(getMaterialProperty<Real>(
"h")),
35 _base_A(getParam<std::string>(
"base_A") +
"_"),
36 _stress_A(getMaterialPropertyByName<
RankTwoTensor>(_base_A +
"stress")),
37 _dstress_dstrain_A(getMaterialPropertyByName<
RankFourTensor>(_base_A +
"Jacobian_mult")),
39 _base_B(getParam<std::string>(
"base_B") +
"_"),
40 _stress_B(getMaterialPropertyByName<
RankTwoTensor>(_base_B +
"stress")),
41 _dstress_dstrain_B(getMaterialPropertyByName<
RankFourTensor>(_base_B +
"Jacobian_mult")),
43 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
44 _stress(declareProperty<
RankTwoTensor>(_base_name +
"stress")),
45 _dstress_dstrain(declareProperty<
RankFourTensor>(_base_name +
"Jacobian_mult")),
46 _global_extra_stress(getDefaultMaterialProperty<
RankTwoTensor>(
"extra_stress"))