Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsSoilCreator.cs =================================================================== diff -u -r708bcebfe9e5db209c818a12d630cb418231f863 -r4a09cd9c68d573626eed8a24a67306ad8690e9cb --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsSoilCreator.cs (.../MacroStabilityInwardsSoilCreator.cs) (revision 708bcebfe9e5db209c818a12d630cb418231f863) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsSoilCreator.cs (.../MacroStabilityInwardsSoilCreator.cs) (revision 4a09cd9c68d573626eed8a24a67306ad8690e9cb) @@ -21,9 +21,7 @@ using System; using System.Linq; -using Core.Common.Base.Data; using Deltares.WTIStability.Data.Geo; -using Ringtoets.Common.Data.Probabilistics; using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.KernelWrapper @@ -44,11 +42,22 @@ /// has an type that can't be converted to . public static Soil[] Create(MacroStabilityInwardsSoilProfileUnderSurfaceLine profile) { - return profile.LayersUnderSurfaceLine.Select(l => new Soil(l.Properties.MaterialName) + return profile.LayersUnderSurfaceLine.Select(l => { - UsePop = l.Properties.UsePop, - ShearStrengthModel = ConvertShearStrengthModel(l.Properties.ShearStrengthModel), - AbovePhreaticLevel = l.Properties.AbovePhreaticLevelDesignVariable + MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties = l.Properties; + + return new Soil(properties.MaterialName) + { + UsePop = properties.UsePop, + ShearStrengthModel = ConvertShearStrengthModel(properties.ShearStrengthModel), + AbovePhreaticLevel = properties.AbovePhreaticLevelDesignVariable, + BelowPhreaticLevel = properties.BelowPhreaticLevelDesignVariable, + Cohesion = properties.CohesionDesignVariable, + FrictionAngle = properties.FrictionAngleDesignVariable, + RatioCuPc = properties.ShearStrengthRatioDesignVariable, + StrengthIncreaseExponent = properties.StrengthIncreaseExponentDesignVariable, + PoP = properties.PopDesignVariable + }; }).ToArray(); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs =================================================================== diff -u -r739cf596f79acc842ee61e885220a8022f3cdedf -r4a09cd9c68d573626eed8a24a67306ad8690e9cb --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs (.../MacroStabilityInwardsSoilCreatorTest.cs) (revision 739cf596f79acc842ee61e885220a8022f3cdedf) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsSoilCreatorTest.cs (.../MacroStabilityInwardsSoilCreatorTest.cs) (revision 4a09cd9c68d573626eed8a24a67306ad8690e9cb) @@ -21,9 +21,9 @@ using System; using System.Linq; +using Core.Common.TestUtil; using Deltares.WTIStability.Data.Geo; using NUnit.Framework; -using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.Primitives; using Point2D = Core.Common.Base.Geometry.Point2D; @@ -48,8 +48,6 @@ UsePop = true, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhi, MaterialName = "Sand", - AbovePhreaticLevelMean = 0.1, - AbovePhreaticLevelCoefficientOfVariation = 0.7 })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { @@ -60,9 +58,7 @@ { UsePop = false, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.None, - MaterialName = "Mud", - AbovePhreaticLevelMean = 0.2, - AbovePhreaticLevelCoefficientOfVariation = 0.6 + MaterialName = "Mud" })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { @@ -73,9 +69,7 @@ { UsePop = true, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.CPhiOrSuCalculated, - MaterialName = "Clay", - AbovePhreaticLevelMean = 0.3, - AbovePhreaticLevelCoefficientOfVariation = 0.5 + MaterialName = "Clay" })), new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[] { @@ -86,9 +80,7 @@ { UsePop = true, ShearStrengthModel = MacroStabilityInwardsShearStrengthModel.SuCalculated, - MaterialName = "Grass", - AbovePhreaticLevelMean = 0.4, - AbovePhreaticLevelCoefficientOfVariation = 0.4 + MaterialName = "Grass" })) }); @@ -107,10 +99,13 @@ ShearStrengthModel.CPhiOrCuCalculated, ShearStrengthModel.CuCalculated }, soils.Select(s => s.ShearStrengthModel)); - CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine - .Select(l => MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetAbovePhreaticLevel(l.Properties) - .GetDesignValue().Value), - soils.Select(s => s.AbovePhreaticLevel)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.AbovePhreaticLevelDesignVariable.Value), soils.Select(s => s.AbovePhreaticLevel)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.BelowPhreaticLevelDesignVariable.Value), soils.Select(s => s.BelowPhreaticLevel)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.CohesionDesignVariable.Value), soils.Select(s => s.Cohesion)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.FrictionAngleDesignVariable.Value), soils.Select(s => s.FrictionAngle)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.ShearStrengthRatioDesignVariable.Value), soils.Select(s => s.RatioCuPc)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.StrengthIncreaseExponentDesignVariable.Value), soils.Select(s => s.StrengthIncreaseExponent)); + CollectionAssert.AreEqual(profile.LayersUnderSurfaceLine.Select(l => l.Properties.PopDesignVariable.Value), soils.Select(s => s.PoP)); } [Test] @@ -141,8 +136,14 @@ public TestMacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(ConstructionProperties properties) : base(properties) { - AbovePhreaticLevelDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignValueFactory.GetAbovePhreaticLevel(this) - .GetDesignValue(); + var random = new Random(21); + AbovePhreaticLevelDesignVariable = random.NextRoundedDouble(); + BelowPhreaticLevelDesignVariable = random.NextRoundedDouble(); + CohesionDesignVariable = random.NextRoundedDouble(); + FrictionAngleDesignVariable = random.NextRoundedDouble(); + ShearStrengthRatioDesignVariable = random.NextRoundedDouble(); + StrengthIncreaseExponentDesignVariable = random.NextRoundedDouble(); + PopDesignVariable = random.NextRoundedDouble(); } } }