diff --git a/MaterialLib/SolidModels/MFront/MohrCoulombAbboSloanAniso.mfront b/MaterialLib/SolidModels/MFront/MohrCoulombAbboSloanAniso.mfront index 97991b2fe3e5814141c6dd909be83c77611eed47..514704fa6ac6ec113c1ebddf619793f9193e920c 100644 --- a/MaterialLib/SolidModels/MFront/MohrCoulombAbboSloanAniso.mfront +++ b/MaterialLib/SolidModels/MFront/MohrCoulombAbboSloanAniso.mfront @@ -98,13 +98,12 @@ cs.setEntryName("ShearFactor"); tan_3_lodeT = tan(3. * lodeT); auto Hill = Stensor4::Id(); - const int step = sig.size() + 1; - Hill[0] = cn; - Hill[step] = Hill[step * 2] = 1. / cn; - Hill[step * 3] = cs; - if (step == 7) // 3D case + Hill(0,0) = cn; + Hill(1,1) = Hill(2,2) = 1. / cn; + Hill(3,3) = cs; + if (sig.size() == 6) // 3D case { - Hill[step * 5] = cs; + Hill(5,5) = cs; } // Compute initial elastic strain @@ -159,13 +158,12 @@ cs.setEntryName("ShearFactor"); constexpr auto isqrt3 = Cste<real>::isqrt3; constexpr auto id = Stensor::Id(); auto Hill = Stensor4::Id(); - const int step = sig.size() + 1; - Hill[0] = cn; - Hill[step] = Hill[step * 2] = 1. / cn; - Hill[step * 3] = cs; - if (step == 7) // 3D case + Hill(0,0) = cn; + Hill(1,1) = Hill(2,2) = 1. / cn; + Hill(3,3) = cs; + if (sig.size() == 6) // 3D case { - Hill[step * 5] = cs; + Hill(5,5) = cs; } if (F) {