24template <
int DisplacementDim>
27 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
30 auto const config_stress0 =
39 auto const stress0_type_opt =
41 config_stress0->getConfigAttributeOptional<std::string>(
"type");
44 if (mandatory_stress_type && !stress0_type_opt)
47 "The attribute \"type\" of the tag \"initial_stress\" is required "
48 "for the current process setting, for example using subtype = "
49 "\"StressSaturation_StrainPressureTemperature\" in TRM. "
50 "However it is missing.");
53 auto const stress0_type_str =
54 stress0_type_opt ? *stress0_type_opt :
"effective";
57 if (stress0_type_str ==
"total")
61 else if (stress0_type_str ==
"effective")
68 "The initial stress type must be \"total\" or "
69 "\"effective\". But the given one is {:s}",
73 auto const parameter_name = config_stress0->getValue<std::string>();
75 parameter_name, parameters,
79 return {initial_stress, stress0_type};
84 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
88 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
Definition of the Mesh class.
std::optional< ConfigTree > getConfigSubtreeOptional(std::string const &root) const
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
template InitialStress createInitialStress< 2 >(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, MeshLib::Mesh const &mesh, bool const mandatory_stress_type)
template InitialStress createInitialStress< 3 >(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, MeshLib::Mesh const &mesh, bool const mandatory_stress_type)
InitialStress createInitialStress(BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const ¶meters, MeshLib::Mesh const &mesh, bool const mandatory_stress_type)