Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs =================================================================== diff -u -rfed1915e1f165e844339d8cf21479f4639cfe546 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs) (revision fed1915e1f165e844339d8cf21479f4639cfe546) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -20,6 +20,7 @@ // All rights reserved. using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine; namespace Ringtoets.MacroStabilityInwards.Data @@ -30,9 +31,9 @@ public static class MacroStabilityInwardsSemiProbabilisticDesignVariableFactory { /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetAbovePhreaticLevel(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetAbovePhreaticLevel(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.AbovePhreaticLevel) { @@ -41,9 +42,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetBelowPhreaticLevel(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.BelowPhreaticLevel) { @@ -52,9 +53,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetCohesion(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.Cohesion) { @@ -63,9 +64,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetFrictionAngle(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.FrictionAngle) { @@ -74,9 +75,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetShearStrengthRatio(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.ShearStrengthRatio) { @@ -85,9 +86,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetStrengthIncreaseExponent(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.StrengthIncreaseExponent) { @@ -96,9 +97,9 @@ } /// - /// Creates the design variable for . + /// Creates the design variable for . /// - public static VariationCoefficientDesignVariable GetPop(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public static VariationCoefficientDesignVariable GetPop(MacroStabilityInwardsSoilLayerProperties properties) { return new VariationCoefficientLogNormalDistributionDesignVariable(properties.Pop) { Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs =================================================================== diff -u -r699207e2c22dbbd77b4a01edafc53e1745731766 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision 699207e2c22dbbd77b4a01edafc53e1745731766) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactory.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -93,44 +93,14 @@ layer => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( RingToPoints(layer.OuterRing), layer.Holes.Select(RingToPoints), - ToUnderSurfaceLineProperties(layer.Properties))).ToArray(); + layer.Properties)).ToArray(); IEnumerable preconsolidationStressesUnderSurfaceLine = soilProfile.PreconsolidationStresses.Select(ToPreconsolidationStressUnderSurfaceLine).ToArray(); return new MacroStabilityInwardsSoilProfileUnderSurfaceLine(layersUnderSurfaceLine, preconsolidationStressesUnderSurfaceLine); } - private static MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine ToUnderSurfaceLineProperties( - MacroStabilityInwardsSoilLayerProperties properties) - { - var props = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties - { - UsePop = properties.UsePop, - IsAquifer = properties.IsAquifer, - ShearStrengthModel = properties.ShearStrengthModel, - MaterialName = properties.MaterialName, - AbovePhreaticLevelMean = properties.AbovePhreaticLevel.Mean, - AbovePhreaticLevelCoefficientOfVariation = properties.AbovePhreaticLevel.CoefficientOfVariation, - BelowPhreaticLevelMean = properties.BelowPhreaticLevel.Mean, - BelowPhreaticLevelCoefficientOfVariation = properties.BelowPhreaticLevel.CoefficientOfVariation, - CohesionMean = properties.Cohesion.Mean, - CohesionCoefficientOfVariation = properties.Cohesion.CoefficientOfVariation, - FrictionAngleMean = properties.FrictionAngle.Mean, - FrictionAngleCoefficientOfVariation = properties.FrictionAngle.CoefficientOfVariation, - StrengthIncreaseExponentMean = properties.StrengthIncreaseExponent.Mean, - StrengthIncreaseExponentCoefficientOfVariation = properties.StrengthIncreaseExponent.CoefficientOfVariation, - ShearStrengthRatioMean = properties.ShearStrengthRatio.Mean, - ShearStrengthRatioCoefficientOfVariation = properties.ShearStrengthRatio.CoefficientOfVariation, - PopMean = properties.Pop.Mean, - PopCoefficientOfVariation = properties.Pop.CoefficientOfVariation - }); - - SetDesignVariablesOfProperties(props); - return props; - } - private static MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine ToPreconsolidationStressUnderSurfaceLine( MacroStabilityInwardsPreconsolidationStress preconsolidationStress) { @@ -150,17 +120,6 @@ return macroStabilityInwardsPreconsolidationStressUnderSurfaceLine; } - private static void SetDesignVariablesOfProperties(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine props) - { - props.AbovePhreaticLevelDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(props).GetDesignValue(); - props.BelowPhreaticLevelDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(props).GetDesignValue(); - props.CohesionDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(props).GetDesignValue(); - props.FrictionAngleDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(props).GetDesignValue(); - props.StrengthIncreaseExponentDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(props).GetDesignValue(); - props.ShearStrengthRatioDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(props).GetDesignValue(); - props.PopDesignVariable = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(props).GetDesignValue(); - } - private static Point2D[] RingToPoints(Ring ring) { return ring.Points.ToArray(); @@ -176,7 +135,7 @@ { foreach (Point2D[] soilLayerArea in GetSoilLayerWithSurfaceLineIntersection(surfaceLineGeometryArray, layer.OuterLoop)) { - collection.Add(new MacroStabilityInwardsSoilLayerUnderSurfaceLine(soilLayerArea, ToUnderSurfaceLineProperties(layer.Properties))); + collection.Add(new MacroStabilityInwardsSoilLayerUnderSurfaceLine(soilLayerArea, layer.Properties)); } } Fisheye: Tag b1f91c40a335a9e2df70844ddee08b7dc3923259 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs =================================================================== diff -u -reb77464397a17cc0a006933b6d9bfeb5cfba3d66 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs) (revision eb77464397a17cc0a006933b6d9bfeb5cfba3d66) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLine.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -37,7 +37,7 @@ /// The outer ring of the geometry of the soil layer. /// The properties of the soil layer. /// Thrown when any parameter is null. - public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, MacroStabilityInwardsSoilLayerProperties properties) : this(outerRing, Enumerable.Empty(), properties) {} /// @@ -47,7 +47,7 @@ /// The holes of the geometry of the soil layer. /// The properties of the soil layer. /// Thrown when any parameter is null. - public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, IEnumerable holes, MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties) + public MacroStabilityInwardsSoilLayerUnderSurfaceLine(Point2D[] outerRing, IEnumerable holes, MacroStabilityInwardsSoilLayerProperties properties) { if (outerRing == null) { @@ -79,6 +79,6 @@ /// /// Gets the properties of the soil layer. /// - public MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine Properties { get; } + public MacroStabilityInwardsSoilLayerProperties Properties { get; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj =================================================================== diff -u -r3fe99efe7580ec1d9eb850908c001c990dc43fe5 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision 3fe99efe7580ec1d9eb850908c001c990dc43fe5) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -49,7 +49,6 @@ - Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs =================================================================== diff -u -r3b20cfd37a7802163d500bbbe37d562a38ab3989 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs (.../UpliftVanSoilProfileConverter.cs) (revision 3b20cfd37a7802163d500bbbe37d562a38ab3989) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/Converters/UpliftVanSoilProfileConverter.cs (.../UpliftVanSoilProfileConverter.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -46,10 +46,10 @@ /// Thrown when /// is null. /// Thrown when - /// + /// /// is an invalid value. /// Thrown when - /// + /// /// is a valid value but unsupported. public static UpliftVanSoilProfile Convert(MacroStabilityInwardsSoilProfileUnderSurfaceLine soilProfile) { @@ -65,22 +65,22 @@ } /// - /// Converts + /// Converts /// into . /// /// The layers to convert. /// The converted . /// Thrown when - /// + /// /// is an invalid value. /// Thrown when - /// + /// /// is a valid value but unsupported. private static IEnumerable ConvertLayers(IEnumerable layers) { return layers.Select(l => { - MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties = l.Properties; + MacroStabilityInwardsSoilLayerProperties properties = l.Properties; return new UpliftVanSoilLayer(l.OuterRing, l.Holes, new UpliftVanSoilLayer.ConstructionProperties { MaterialName = properties.MaterialName, Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs =================================================================== diff -u -rb807a83a281be5e9f4645d35ba7da968a0a5e26f -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs) (revision b807a83a281be5e9f4645d35ba7da968a0a5e26f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs (.../MacroStabilityInwardsSemiProbabilisticDesignVariableFactoryTest.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -20,9 +20,11 @@ // All rights reserved. using System; +using Core.Common.Base.Data; using NUnit.Framework; using Ringtoets.Common.Data.Probabilistics; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine; namespace Ringtoets.MacroStabilityInwards.Data.Test @@ -46,12 +48,15 @@ public void GetAbovePhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForAbovePhreaticLevel() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + AbovePhreaticLevel = { - AbovePhreaticLevelMean = mean, - AbovePhreaticLevelCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation, + Shift = (RoundedDouble) (mean - 0.1) + } + }; // Call VariationCoefficientDesignVariable abovePhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(properties); @@ -65,13 +70,17 @@ public void GetBelowPhreaticLevel_ValidSoilLayerProperties_CreateDesignVariableForBelowPhreaticLevel() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + BelowPhreaticLevel = { - BelowPhreaticLevelMean = mean, - BelowPhreaticLevelCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation, + Shift = (RoundedDouble) (mean - 0.1) + } + }; + // Call VariationCoefficientDesignVariable belowPhreaticLevel = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(properties); @@ -84,13 +93,16 @@ public void GetCohesion_ValidSoilLayerProperties_CreateDesignVariableForCohesion() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + Cohesion = { - CohesionMean = mean, - CohesionCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation + } + }; + // Call VariationCoefficientDesignVariable cohesion = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(properties); @@ -103,13 +115,16 @@ public void GetFrictionAngle_ValidSoilLayerProperties_CreateDesignVariableForFrictionAngle() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + FrictionAngle = { - FrictionAngleMean = mean, - FrictionAngleCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation + } + }; + // Call VariationCoefficientDesignVariable frictionAngle = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(properties); @@ -122,13 +137,16 @@ public void GetShearStrengthRatio_ValidSoilLayerProperties_CreateDesignVariableForShearStrengthRatio() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + ShearStrengthRatio = { - ShearStrengthRatioMean = mean, - ShearStrengthRatioCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation + } + }; + // Call VariationCoefficientDesignVariable shearStrengthRatio = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(properties); @@ -141,13 +159,16 @@ public void GetStrengthIncreaseExponent_ValidSoilLayerProperties_CreateDesignVariableForStrengthIncreaseExponent() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + StrengthIncreaseExponent = { - StrengthIncreaseExponentMean = mean, - StrengthIncreaseExponentCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation + } + }; + // Call VariationCoefficientDesignVariable strengthIncreaseExponent = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(properties); @@ -160,13 +181,16 @@ public void GetPop_ValidSoilLayerProperties_CreateDesignVariableForPop() { // Setup - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + var properties = new MacroStabilityInwardsSoilLayerProperties + { + Pop = { - PopMean = mean, - PopCoefficientOfVariation = coefficientOfVariation - }); + Mean = (RoundedDouble) mean, + CoefficientOfVariation = (RoundedDouble) coefficientOfVariation + } + }; + // Call VariationCoefficientDesignVariable pop = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(properties); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs =================================================================== diff -u -r699207e2c22dbbd77b4a01edafc53e1745731766 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs) (revision 699207e2c22dbbd77b4a01edafc53e1745731766) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs (.../MacroStabilityInwardsSoilProfileUnderSurfaceLineFactoryTest.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -418,20 +418,7 @@ profile, surfaceLine); // Assert - MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine layerUnderSurfaceLineProperties = profileUnderSurfaceLine.Layers.First().Properties; - Assert.AreEqual(usePop, layerUnderSurfaceLineProperties.UsePop); - Assert.AreEqual(isAquifer, layerUnderSurfaceLineProperties.IsAquifer); - Assert.AreEqual(shearStrengthModel, layerUnderSurfaceLineProperties.ShearStrengthModel); - Assert.AreEqual(material, layerUnderSurfaceLineProperties.MaterialName); - - AssertDistributionsAndDesignVariables(layerUnderSurfaceLineProperties, - abovePhreaticLevelMean, abovePhreaticLevelCoefficientOfVariation, - belowPhreaticLevelMean, belowPhreaticLevelCoefficientOfVariation, - cohesionMean, cohesionCoefficientOfVariation, - frictionAngleMean, frictionAngleCoefficientOfVariation, - shearStrengthRatioMean, shearStrengthRatioCoefficientOfVariation, - strengthIncreaseExponentMean, strengthIncreaseExponentCoefficientOfVariation, - popMean, popCoefficientOfVariation); + Assert.AreSame(layer.Properties, profileUnderSurfaceLine.Layers.First().Properties); } [Test] @@ -584,20 +571,7 @@ profile, new MacroStabilityInwardsSurfaceLine(string.Empty)); // Assert - MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine layerUnderSurfaceLineProperties = profileUnderSurfaceLine.Layers.First().Properties; - Assert.AreEqual(usePop, layerUnderSurfaceLineProperties.UsePop); - Assert.AreEqual(isAquifer, layerUnderSurfaceLineProperties.IsAquifer); - Assert.AreEqual(shearStrengthModel, layerUnderSurfaceLineProperties.ShearStrengthModel); - Assert.AreEqual(material, layerUnderSurfaceLineProperties.MaterialName); - - AssertDistributionsAndDesignVariables(layerUnderSurfaceLineProperties, - abovePhreaticLevelMean, abovePhreaticLevelCoefficientOfVariation, - belowPhreaticLevelMean, belowPhreaticLevelCoefficientOfVariation, - cohesionMean, cohesionCoefficientOfVariation, - frictionAngleMean, frictionAngleCoefficientOfVariation, - shearStrengthRatioMean, shearStrengthRatioCoefficientOfVariation, - strengthIncreaseExponentMean, strengthIncreaseExponentCoefficientOfVariation, - popMean, popCoefficientOfVariation); + Assert.AreSame(layer.Properties, profileUnderSurfaceLine.Layers.First().Properties); } [Test] @@ -643,65 +617,6 @@ preconsolidationStressUnderSurfaceLine.PreconsolidationStressDesignVariable); } - private static void AssertDistributionsAndDesignVariables(MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine properties, - double abovePhreaticLevelMean, double abovePhreaticLevelCoefficientOfVariation, - double belowPhreaticLevelMean, double belowPhreaticLevelCoefficientOfVariation, - double cohesionMean, double cohesionCoefficientOfVariation, - double frictionAngleMean, double frictionAngleCoefficientOfVariation, - double shearStrengthRatioMean, double shearStrengthRatioCoefficientOfVariation, - double strengthIncreaseExponentMean, double strengthIncreaseExponentCoefficientOfVariation, - double popMean, double popCoefficientOfVariation) - { - Assert.AreEqual(abovePhreaticLevelMean, properties.AbovePhreaticLevel.Mean, - properties.AbovePhreaticLevel.Mean.GetAccuracy()); - Assert.AreEqual(abovePhreaticLevelCoefficientOfVariation, properties.AbovePhreaticLevel.CoefficientOfVariation, - properties.AbovePhreaticLevel.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetAbovePhreaticLevel(properties).GetDesignValue(), - properties.AbovePhreaticLevelDesignVariable); - - Assert.AreEqual(belowPhreaticLevelMean, properties.BelowPhreaticLevel.Mean, - properties.BelowPhreaticLevel.Mean.GetAccuracy()); - Assert.AreEqual(belowPhreaticLevelCoefficientOfVariation, properties.BelowPhreaticLevel.CoefficientOfVariation, - properties.BelowPhreaticLevel.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetBelowPhreaticLevel(properties).GetDesignValue(), - properties.BelowPhreaticLevelDesignVariable); - - Assert.AreEqual(cohesionMean, properties.Cohesion.Mean, - properties.Cohesion.Mean.GetAccuracy()); - Assert.AreEqual(cohesionCoefficientOfVariation, properties.Cohesion.CoefficientOfVariation, - properties.Cohesion.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetCohesion(properties).GetDesignValue(), - properties.CohesionDesignVariable); - - Assert.AreEqual(frictionAngleMean, properties.FrictionAngle.Mean, - properties.FrictionAngle.Mean.GetAccuracy()); - Assert.AreEqual(frictionAngleCoefficientOfVariation, properties.FrictionAngle.CoefficientOfVariation, - properties.FrictionAngle.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetFrictionAngle(properties).GetDesignValue(), - properties.FrictionAngleDesignVariable); - - Assert.AreEqual(shearStrengthRatioMean, properties.ShearStrengthRatio.Mean, - properties.ShearStrengthRatio.Mean.GetAccuracy()); - Assert.AreEqual(shearStrengthRatioCoefficientOfVariation, properties.ShearStrengthRatio.CoefficientOfVariation, - properties.ShearStrengthRatio.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetShearStrengthRatio(properties).GetDesignValue(), - properties.ShearStrengthRatioDesignVariable); - - Assert.AreEqual(strengthIncreaseExponentMean, properties.StrengthIncreaseExponent.Mean, - properties.StrengthIncreaseExponent.Mean.GetAccuracy()); - Assert.AreEqual(strengthIncreaseExponentCoefficientOfVariation, properties.StrengthIncreaseExponent.CoefficientOfVariation, - properties.StrengthIncreaseExponent.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetStrengthIncreaseExponent(properties).GetDesignValue(), - properties.StrengthIncreaseExponentDesignVariable); - - Assert.AreEqual(popMean, properties.Pop.Mean, - properties.Pop.Mean.GetAccuracy()); - Assert.AreEqual(popCoefficientOfVariation, properties.Pop.CoefficientOfVariation, - properties.Pop.CoefficientOfVariation.GetAccuracy()); - Assert.AreEqual(MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(properties).GetDesignValue(), - properties.PopDesignVariable); - } - private static MacroStabilityInwardsSoilLayer2D GetSoilLayer() { return new MacroStabilityInwardsSoilLayer2D(CreateRing(21), Enumerable.Empty()); Fisheye: Tag b1f91c40a335a9e2df70844ddee08b7dc3923259 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLineTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs =================================================================== diff -u -reb77464397a17cc0a006933b6d9bfeb5cfba3d66 -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs) (revision eb77464397a17cc0a006933b6d9bfeb5cfba3d66) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilUnderSurfaceLine/MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs (.../MacroStabilityInwardsSoilLayerUnderSurfaceLineTest.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -36,9 +36,8 @@ { // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( - null, Enumerable.Empty(), - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties())); + null, Enumerable.Empty(), + new MacroStabilityInwardsSoilLayerProperties()); // Assert var exception = Assert.Throws(test); @@ -50,8 +49,7 @@ { // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( - new Point2D[0], null, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties())); + new Point2D[0], null, new MacroStabilityInwardsSoilLayerProperties()); // Assert var exception = Assert.Throws(test); @@ -74,8 +72,7 @@ { // Call TestDelegate test = () => new MacroStabilityInwardsSoilLayerUnderSurfaceLine( - null, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties())); + null, new MacroStabilityInwardsSoilLayerProperties()); // Assert var exception = Assert.Throws(test); @@ -99,8 +96,7 @@ // Call var outerRing = new Point2D[0]; IEnumerable holes = Enumerable.Empty(); - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties()); + var properties = new MacroStabilityInwardsSoilLayerProperties(); // Setup var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, holes, properties); @@ -116,8 +112,7 @@ { // Call var outerRing = new Point2D[0]; - var properties = new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine( - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties()); + var properties = new MacroStabilityInwardsSoilLayerProperties(); // Setup var layer = new MacroStabilityInwardsSoilLayerUnderSurfaceLine(outerRing, properties); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj =================================================================== diff -u -ra1fa1538918813373bcc864f0bce092bf28fd0ce -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.Test.csproj) (revision a1fa1538918813373bcc864f0bce092bf28fd0ce) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.Test.csproj) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -59,7 +59,6 @@ - Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs =================================================================== diff -u -rde60841b8ffece957b147fc7a35a93d2c1918f5f -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs (.../UpliftVanSoilProfileConverterTest.cs) (revision de60841b8ffece957b147fc7a35a93d2c1918f5f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/Converters/UpliftVanSoilProfileConverterTest.cs (.../UpliftVanSoilProfileConverterTest.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; @@ -60,26 +61,49 @@ { CreateRing(11), CreateRing(22) - }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + }, new MacroStabilityInwardsSoilLayerProperties { UsePop = random.NextBoolean(), IsAquifer = random.NextBoolean(), MaterialName = "Test", - AbovePhreaticLevelMean = random.NextDouble(), - AbovePhreaticLevelCoefficientOfVariation = random.NextDouble(), - BelowPhreaticLevelMean = random.NextDouble(), - BelowPhreaticLevelCoefficientOfVariation = random.NextDouble(), - CohesionMean = random.NextDouble(), - CohesionCoefficientOfVariation = random.NextDouble(), - FrictionAngleMean = random.NextDouble(), - FrictionAngleCoefficientOfVariation = random.NextDouble(), - StrengthIncreaseExponentMean = random.NextDouble(), - StrengthIncreaseExponentCoefficientOfVariation = random.NextDouble(), - ShearStrengthRatioMean = random.NextDouble(), - ShearStrengthRatioCoefficientOfVariation = random.NextDouble(), - PopMean = random.NextDouble(), - PopCoefficientOfVariation = random.NextDouble() - })) + AbovePhreaticLevel = + { + Mean = (RoundedDouble) 10, + CoefficientOfVariation = (RoundedDouble) 0.3, + Shift = (RoundedDouble) 0.1 + }, + BelowPhreaticLevel = + { + Mean = (RoundedDouble) 5, + CoefficientOfVariation = (RoundedDouble) 0.8, + Shift = (RoundedDouble) 0.3 + }, + Cohesion = + { + Mean = random.NextRoundedDouble(), + CoefficientOfVariation = random.NextRoundedDouble() + }, + FrictionAngle = + { + Mean = random.NextRoundedDouble(), + CoefficientOfVariation = random.NextRoundedDouble() + }, + StrengthIncreaseExponent = + { + Mean = random.NextRoundedDouble(), + CoefficientOfVariation = random.NextRoundedDouble() + }, + ShearStrengthRatio = + { + Mean = random.NextRoundedDouble(), + CoefficientOfVariation = random.NextRoundedDouble() + }, + Pop = + { + Mean = random.NextRoundedDouble(), + CoefficientOfVariation = random.NextRoundedDouble() + } + }) }, new[] { new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine(new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine.ConstructionProperties @@ -105,10 +129,10 @@ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[] { new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][], - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + new MacroStabilityInwardsSoilLayerProperties { ShearStrengthModel = (MacroStabilityInwardsShearStrengthModel) 99 - })) + }) }, new[] { new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine(new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine.ConstructionProperties()) @@ -133,10 +157,10 @@ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[] { new MacroStabilityInwardsSoilLayerUnderSurfaceLine(CreateRing(21), new Point2D[0][], - new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties + new MacroStabilityInwardsSoilLayerProperties { ShearStrengthModel = originalShearStrengthModel - })) + }) }, new[] { new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine(new MacroStabilityInwardsPreconsolidationStressUnderSurfaceLine.ConstructionProperties()) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs =================================================================== diff -u -rde60841b8ffece957b147fc7a35a93d2c1918f5f -rb1f91c40a335a9e2df70844ddee08b7dc3923259 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs (.../UpliftVanSoilProfileHelper.cs) (revision de60841b8ffece957b147fc7a35a93d2c1918f5f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.TestUtil/UpliftVanSoilProfileHelper.cs (.../UpliftVanSoilProfileHelper.cs) (revision b1f91c40a335a9e2df70844ddee08b7dc3923259) @@ -23,6 +23,7 @@ using NUnit.Framework; using Ringtoets.MacroStabilityInwards.Data; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; +using Ringtoets.MacroStabilityInwards.Primitives; using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine; namespace Ringtoets.MacroStabilityInwards.Service.TestUtil @@ -71,7 +72,7 @@ Assert.AreEqual(expectedLayers[i].OuterRing, actualLayers[i].OuterRing); CollectionAssert.AreEqual(expectedLayers[i].Holes, actualLayers[i].Holes); - MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine expectedProperties = expectedLayers[i].Properties; + MacroStabilityInwardsSoilLayerProperties expectedProperties = expectedLayers[i].Properties; Assert.AreEqual(expectedProperties.MaterialName, actualLayers[i].MaterialName); Assert.AreEqual(expectedProperties.UsePop, actualLayers[i].UsePop); Assert.AreEqual(expectedProperties.IsAquifer, actualLayers[i].IsAquifer);