Skip to content
Snippets Groups Projects
Commit ef007797 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MatL] Use make_tuple for return value construct.

This is not working otherwise for either to old (c++11) STL implementation or boost library version.
parent f4014dc7
No related branches found
No related tags found
No related merge requests found
...@@ -739,13 +739,13 @@ SolidEhlers<DisplacementDim>::integrateStress( ...@@ -739,13 +739,13 @@ SolidEhlers<DisplacementDim>::integrateStress(
if (_damage_properties) if (_damage_properties)
sigma_final *= 1 - state.damage.value(); sigma_final *= 1 - state.damage.value();
return { return {std::make_tuple(
{sigma_final, sigma_final,
std::unique_ptr< std::unique_ptr<
typename MechanicsBase<DisplacementDim>::MaterialStateVariables>{ typename MechanicsBase<DisplacementDim>::MaterialStateVariables>{
new StateVariables<DisplacementDim>{ new StateVariables<DisplacementDim>{
static_cast<StateVariables<DisplacementDim> const&>(state)}}, static_cast<StateVariables<DisplacementDim> const&>(state)}},
tangentStiffness}}; tangentStiffness)};
} }
} // namespace Ehlers } // namespace Ehlers
......
...@@ -108,13 +108,14 @@ public: ...@@ -108,13 +108,14 @@ public:
KelvinVector sigma = sigma_prev + C * (eps - eps_prev); KelvinVector sigma = sigma_prev + C * (eps - eps_prev);
return {{sigma, return {
std::unique_ptr<typename MechanicsBase< std::make_tuple(sigma,
DisplacementDim>::MaterialStateVariables>{ std::unique_ptr<typename MechanicsBase<
new MaterialStateVariables{ DisplacementDim>::MaterialStateVariables>{
static_cast<MaterialStateVariables const&>( new MaterialStateVariables{
material_state_variables)}}, static_cast<MaterialStateVariables const&>(
C}}; material_state_variables)}},
C)};
} }
private: private:
......
...@@ -180,13 +180,15 @@ Lubby2<DisplacementDim>::integrateStress( ...@@ -180,13 +180,15 @@ Lubby2<DisplacementDim>::integrateStress(
// Hydrostatic part for the stress and the tangent. // Hydrostatic part for the stress and the tangent.
double const eps_i_trace = Invariants::trace(eps); double const eps_i_trace = Invariants::trace(eps);
return { KelvinVector const sigma =
{local_lubby2_properties.GM0 * sigd_j + local_lubby2_properties.GM0 * sigd_j +
local_lubby2_properties.KM0 * eps_i_trace * Invariants::identity2, local_lubby2_properties.KM0 * eps_i_trace * Invariants::identity2;
std::unique_ptr< return {std::make_tuple(
typename MechanicsBase<DisplacementDim>::MaterialStateVariables>{ sigma,
new MaterialStateVariables{state}}, std::unique_ptr<
C}}; typename MechanicsBase<DisplacementDim>::MaterialStateVariables>{
new MaterialStateVariables{state}},
C)};
} }
template <int DisplacementDim> template <int DisplacementDim>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment