Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.CalculatedInput/Converters/SoilProfileConverter.cs =================================================================== diff -u -r1a3f904157a3f86e702ea8086bee67e780da7856 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.CalculatedInput/Converters/SoilProfileConverter.cs (.../SoilProfileConverter.cs) (revision 1a3f904157a3f86e702ea8086bee67e780da7856) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.CalculatedInput/Converters/SoilProfileConverter.cs (.../SoilProfileConverter.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -78,8 +78,8 @@ return layers.Select(l => { IMacroStabilityInwardsSoilLayerData data = l.Data; + return new SoilLayer(RingToPoints(l.OuterRing), - l.Holes.Select(RingToPoints).ToArray(), new SoilLayer.ConstructionProperties { MaterialName = data.MaterialName, @@ -95,7 +95,8 @@ Pop = MacroStabilityInwardsSemiProbabilisticDesignVariableFactory.GetPop(data).GetDesignValue(), DilatancyType = DilatancyType.Zero, WaterPressureInterpolationModel = WaterPressureInterpolationModel.Automatic - }); + }, + ConvertLayers(l.NestedLayers)); }).ToArray(); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/Ringtoets.MacroStabilityInwards.Data.csproj (.../Ringtoets.MacroStabilityInwards.Data.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -77,6 +77,7 @@ + Fisheye: Tag bcc66e2160dd443e08145f036176875f0fc87b62 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilProfile2DLayersHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs (.../MacroStabilityInwardsStochasticSoilProfileProperties.cs) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs (.../MacroStabilityInwardsStochasticSoilProfileProperties.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -109,7 +109,7 @@ { IEnumerable layers = (data.SoilProfile as MacroStabilityInwardsSoilProfile2D)?.Layers; IEnumerable macroStabilityInwardsSoilLayers2D = layers != null - ? MacroStabilityInwardsSoilProfile2DLayerHelper.GetLayersRecursively(layers) + ? MacroStabilityInwardsSoilProfile2DLayersHelper.GetLayersRecursively(layers) : new List(); return macroStabilityInwardsSoilLayers2D?.Select(layer => new MacroStabilityInwardsSoilLayer2DTopLevelProperties(layer)).ToArray() ?? new MacroStabilityInwardsSoilLayer2DTopLevelProperties[0]; Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs (.../MacroStabilityInwardsInputView.cs) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsInputView.cs (.../MacroStabilityInwardsInputView.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -322,7 +322,7 @@ { IEnumerable layers = data?.InputParameters.SoilProfileUnderSurfaceLine?.Layers; return layers != null - ? MacroStabilityInwardsSoilProfile2DLayerHelper.GetLayersRecursively(layers) + ? MacroStabilityInwardsSoilProfile2DLayersHelper.GetLayersRecursively(layers) : new List(); } } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs =================================================================== diff -u -rcb6bb67915ea2869b2d7b705bdcee757dcdf2ce1 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs (.../MacroStabilityInwardsOutputChartControl.cs) (revision cb6bb67915ea2869b2d7b705bdcee757dcdf2ce1) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsOutputChartControl.cs (.../MacroStabilityInwardsOutputChartControl.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; @@ -269,7 +270,7 @@ { IEnumerable layers = data?.InputParameters.SoilProfileUnderSurfaceLine?.Layers; return layers != null - ? MacroStabilityInwardsSoilProfile2DLayerHelper.GetLayersRecursively(layers) + ? MacroStabilityInwardsSoilProfile2DLayersHelper.GetLayersRecursively(layers) : new List(); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs =================================================================== diff -u -r0c1db0b8d8ed69192d22aa164be95f2c6c21aaf2 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision 0c1db0b8d8ed69192d22aa164be95f2c6c21aaf2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Input/SoilLayer.cs (.../SoilLayer.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -33,29 +33,29 @@ /// /// Creates a new instance of . /// - /// The outer ring of the geometry of the soil layer. - /// The holes of the geometry of the soil layer. + /// The outer ring of the soil layer. + /// The nested layers of the soil layer. /// The object containing the values for - /// the properties of the new . - /// Thrown when - /// is null. - public SoilLayer(Point2D[] outerRing, IEnumerable holes, ConstructionProperties properties) + /// the soil data properties of the new . + /// Thrown when any input parameter is null. + public SoilLayer(Point2D[] outerRing, ConstructionProperties properties, IEnumerable nestedLayers) { if (outerRing == null) { throw new ArgumentNullException(nameof(outerRing)); } - if (holes == null) - { - throw new ArgumentNullException(nameof(holes)); - } + if (properties == null) { throw new ArgumentNullException(nameof(properties)); } + if (nestedLayers == null) + { + throw new ArgumentNullException(nameof(nestedLayers)); + } + OuterRing = outerRing; - Holes = holes; IsAquifer = properties.IsAquifer; UsePop = properties.UsePop; @@ -70,17 +70,19 @@ Pop = properties.Pop; DilatancyType = properties.DilatancyType; WaterPressureInterpolationModel = properties.WaterPressureInterpolationModel; + + NestedLayers = nestedLayers; } /// - /// Gets the outer ring of the geometry. + /// Gets the outer ring of the soil layer. /// public Point2D[] OuterRing { get; } /// - /// Gets the holes of the geometry. + /// Gets any nested layers of the soil layer. /// - public IEnumerable Holes { get; } + public IEnumerable NestedLayers { get; } /// /// Gets a value indicating whether the layer is an aquifer. Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs =================================================================== diff -u -r492ad9a8c707d3900471e7597d8490592d7867d8 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 492ad9a8c707d3900471e7597d8490592d7867d8) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -22,14 +22,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Deltares.WTIStability.Data.Geo; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Output; using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Output; using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernels; using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernels.UpliftVan; -using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan { @@ -110,22 +108,14 @@ private IUpliftVanKernel CreateUpliftVanKernel() { - Soil[] soils = SoilCreator.Create(input.SoilProfile); - Dictionary layersWithSoils = - input.SoilProfile.Layers - .Zip(soils, (layer, soil) => new - { - layer, - soil - }) - .ToDictionary(x => x.layer, x => x.soil); + LayerWithSoil[] layersWithSoils = LayerWithSoilCreator.Create(input.SoilProfile); IUpliftVanKernel upliftVanKernel = factory.CreateUpliftVanKernel(); upliftVanKernel.MoveGrid = input.MoveGrid; upliftVanKernel.MaximumSliceWidth = input.MaximumSliceWidth; - upliftVanKernel.SoilModel = SoilModelCreator.Create(soils); - upliftVanKernel.SoilProfile = SoilProfileCreator.Create(input.SoilProfile, layersWithSoils); + upliftVanKernel.SoilModel = SoilModelCreator.Create(layersWithSoils.Select(lws => lws.Soil).ToArray()); + upliftVanKernel.SoilProfile = SoilProfileCreator.Create(input.SoilProfile.PreconsolidationStresses, layersWithSoils); upliftVanKernel.LocationExtreme = UpliftVanStabilityLocationCreator.CreateExtreme(input); upliftVanKernel.LocationDaily = UpliftVanStabilityLocationCreator.CreateDaily(input); upliftVanKernel.SurfaceLine = SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs =================================================================== diff -u -recb90789988e5dd12d9eeeb7e016b57551121089 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs (.../WaternetCalculator.cs) (revision ecb90789988e5dd12d9eeeb7e016b57551121089) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Calculators/Waternet/WaternetCalculator.cs (.../WaternetCalculator.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -20,16 +20,13 @@ // All rights reserved. using System; -using System.Collections.Generic; using System.Linq; -using Deltares.WTIStability.Data.Geo; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Waternet.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Waternet.Output; using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Output; using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernels; using Ringtoets.MacroStabilityInwards.KernelWrapper.Kernels.Waternet; -using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Waternet { @@ -105,18 +102,10 @@ private void SetInputOnKernel(IWaternetKernel waternetKernel) { - Soil[] soils = SoilCreator.Create(Input.SoilProfile); - Dictionary layersWithSoils = - Input.SoilProfile.Layers - .Zip(soils, (layer, soil) => new - { - layer, - soil - }) - .ToDictionary(x => x.layer, x => x.soil); + LayerWithSoil[] layersWithSoils = LayerWithSoilCreator.Create(Input.SoilProfile); - waternetKernel.SoilModel = SoilModelCreator.Create(soils); - waternetKernel.SoilProfile = SoilProfileCreator.Create(Input.SoilProfile, layersWithSoils); + waternetKernel.SoilModel = SoilModelCreator.Create(layersWithSoils.Select(lws => lws.Soil).ToArray()); + waternetKernel.SoilProfile = SoilProfileCreator.Create(Input.SoilProfile.PreconsolidationStresses, layersWithSoils); waternetKernel.Location = WaternetStabilityLocationCreator.Create(Input); waternetKernel.SurfaceLine = SurfaceLineCreator.Create(Input.SurfaceLine, Input.LandwardDirection); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoil.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoil.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoil.cs (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -0,0 +1,75 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Deltares.WTIStability.Data.Geo; +using Point2D = Core.Common.Base.Geometry.Point2D; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input +{ + /// + /// Container for all layer related data that is required for performing calculations. + /// + internal class LayerWithSoil + { + /// + /// Creates a new instance of . + /// + /// The outer ring of the layer. + /// The inner rings of the layer. + /// The soil of the layer. + /// A value indicating whether the layer is an aquifer. + /// The water pressure interpolation model of the layer. + internal LayerWithSoil(Point2D[] outerRing, IEnumerable innerRings, Soil soil, bool isAquifer, WaterpressureInterpolationModel waterPressureInterpolationModel) + { + OuterRing = outerRing; + InnerRings = innerRings; + Soil = soil; + IsAquifer = isAquifer; + WaterPressureInterpolationModel = waterPressureInterpolationModel; + } + + /// + /// Gets the outer ring of the layer. + /// + public Point2D[] OuterRing { get; } + + /// + /// Gets the inner rings of the layer. + /// + public IEnumerable InnerRings { get; } + + /// + /// Gets the soil of the layer. + /// + public Soil Soil { get; } + + /// + /// Gets a value indicating whether the layer is an aquifer. + /// + public bool IsAquifer { get; } + + /// + /// Gets the water pressure interpolation model of the layer. + /// + public WaterpressureInterpolationModel WaterPressureInterpolationModel { get; } + } +} Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoilCreator.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoilCreator.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/LayerWithSoilCreator.cs (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -0,0 +1,208 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using Deltares.WTIStability.Data.Geo; +using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; +using DilatancyType = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.DilatancyType; +using Point2D = Core.Common.Base.Geometry.Point2D; +using ShearStrengthModel = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.ShearStrengthModel; +using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; +using SoilProfile = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilProfile; +using WtiStabilitySoil = Deltares.WTIStability.Data.Geo.Soil; +using WtiStabilityDilatancyType = Deltares.WTIStability.Data.Geo.DilatancyType; +using WtiStabilityShearStrengthModel = Deltares.WTIStability.Data.Geo.ShearStrengthModel; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input +{ + /// + /// Creates instances which are (indirectly) required in a calculation. + /// + internal static class LayerWithSoilCreator + { + /// + /// Creates objects based on . + /// + /// The to create objects for. + /// An of . + /// Thrown when is null. + /// Thrown when , + /// or is an invalid value. + /// Thrown when , + /// or is a valid value but unsupported. + public static LayerWithSoil[] Create(SoilProfile soilProfile) + { + if (soilProfile == null) + { + throw new ArgumentNullException(nameof(soilProfile)); + } + + return GetLayersWithSoilRecursively(soilProfile.Layers).ToArray(); + } + + /// + /// Gets recursively. + /// + /// The soil layers to obtain the objects from. + /// An of . + /// Thrown when , + /// or is an invalid value. + /// Thrown when , + /// or is a valid value but unsupported. + private static IEnumerable GetLayersWithSoilRecursively(IEnumerable soilLayers) + { + var layersWithSoil = new List(); + + foreach (SoilLayer layer in soilLayers) + { + layersWithSoil.Add(new LayerWithSoil(layer.OuterRing, + GetInnerLoopsRecursively(layer), + new WtiStabilitySoil(layer.MaterialName) + { + UsePop = layer.UsePop, + ShearStrengthModel = ConvertShearStrengthModel(layer.ShearStrengthModel), + AbovePhreaticLevel = layer.AbovePhreaticLevel, + BelowPhreaticLevel = layer.BelowPhreaticLevel, + Cohesion = layer.Cohesion, + FrictionAngle = layer.FrictionAngle, + RatioCuPc = layer.ShearStrengthRatio, + StrengthIncreaseExponent = layer.StrengthIncreaseExponent, + PoP = layer.Pop, + DilatancyType = ConvertDilatancyType(layer.DilatancyType) + }, + layer.IsAquifer, + ConvertWaterPressureInterpolationModel(layer.WaterPressureInterpolationModel))); + + layersWithSoil.AddRange(GetLayersWithSoilRecursively(layer.NestedLayers)); + } + + return layersWithSoil; + } + + private static IEnumerable GetInnerLoopsRecursively(SoilLayer layer) + { + var innerLoops = new List(); + + foreach (SoilLayer nestedLayer in layer.NestedLayers) + { + innerLoops.Add(nestedLayer.OuterRing); + + innerLoops.AddRange(GetInnerLoopsRecursively(nestedLayer)); + } + + return innerLoops; + } + + /// + /// Converts a into a . + /// + /// The to convert. + /// A based on . + /// Thrown when + /// is an invalid value. + /// Thrown when + /// is a valid value but unsupported. + private static WtiStabilityShearStrengthModel ConvertShearStrengthModel(ShearStrengthModel shearStrengthModel) + { + if (!Enum.IsDefined(typeof(ShearStrengthModel), shearStrengthModel)) + { + throw new InvalidEnumArgumentException(nameof(shearStrengthModel), + (int) shearStrengthModel, + typeof(ShearStrengthModel)); + } + + switch (shearStrengthModel) + { + case ShearStrengthModel.SuCalculated: + return WtiStabilityShearStrengthModel.CuCalculated; + case ShearStrengthModel.CPhi: + return WtiStabilityShearStrengthModel.CPhi; + case ShearStrengthModel.CPhiOrSuCalculated: + return WtiStabilityShearStrengthModel.CPhiOrCuCalculated; + default: + throw new NotSupportedException(); + } + } + + /// + /// Converts a into a . + /// + /// The to convert. + /// A based on . + /// Thrown when + /// is an invalid value. + /// Thrown when + /// is a valid value but unsupported. + private static WtiStabilityDilatancyType ConvertDilatancyType(DilatancyType dilatancyType) + { + if (!Enum.IsDefined(typeof(DilatancyType), dilatancyType)) + { + throw new InvalidEnumArgumentException(nameof(dilatancyType), + (int) dilatancyType, + typeof(DilatancyType)); + } + + switch (dilatancyType) + { + case DilatancyType.Phi: + return WtiStabilityDilatancyType.Phi; + case DilatancyType.Zero: + return WtiStabilityDilatancyType.Zero; + case DilatancyType.MinusPhi: + return WtiStabilityDilatancyType.MinusPhi; + default: + throw new NotSupportedException(); + } + } + + /// + /// Converts a into a . + /// + /// The to convert. + /// A based on . + /// Thrown when + /// is an invalid value. + /// Thrown when + /// is a valid value but unsupported. + private static WaterpressureInterpolationModel ConvertWaterPressureInterpolationModel(WaterPressureInterpolationModel waterPressureInterpolationModel) + { + if (!Enum.IsDefined(typeof(WaterPressureInterpolationModel), waterPressureInterpolationModel)) + { + throw new InvalidEnumArgumentException(nameof(waterPressureInterpolationModel), + (int) waterPressureInterpolationModel, + typeof(WaterPressureInterpolationModel)); + } + + switch (waterPressureInterpolationModel) + { + case WaterPressureInterpolationModel.Automatic: + return WaterpressureInterpolationModel.Automatic; + case WaterPressureInterpolationModel.Hydrostatic: + return WaterpressureInterpolationModel.Hydrostatic; + default: + throw new NotSupportedException(); + } + } + } +} \ No newline at end of file Fisheye: Tag 66894d34e58e0db658fa3183df8792ed244ccda3 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs =================================================================== diff -u -ra7891cb561f68e0f39c8ae2ba8aa3c67f071ac31 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision a7891cb561f68e0f39c8ae2ba8aa3c67f071ac31) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/Input/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -21,14 +21,11 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using Deltares.WTIStability.Data.Geo; using Deltares.WTIStability.Data.Standard; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; using Point2D = Core.Common.Base.Geometry.Point2D; -using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; -using SoilProfile = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilProfile; using WtiStabilityPoint2D = Deltares.WTIStability.Data.Geo.Point2D; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input @@ -39,43 +36,40 @@ internal static class SoilProfileCreator { /// - /// Creates a with the given - /// which can be used in a calculation. + /// Creates a based on and + /// . /// - /// The soil profile to create the for. - /// The data to use in the . - /// A new with the . + /// The preconsolidation stresses to use in the . + /// The layer data to use in the . + /// A new . /// Thrown when any parameter is null. - /// Thrown when - /// is an invalid value. - /// Thrown when - /// is a valid value but unsupported. - public static SoilProfile2D Create(SoilProfile soilProfile, - IDictionary layersWithSoils) + public static SoilProfile2D Create(IEnumerable preconsolidationStresses, + IEnumerable layersWithSoil) { - if (soilProfile == null) + if (preconsolidationStresses == null) { - throw new ArgumentNullException(nameof(soilProfile)); + throw new ArgumentNullException(nameof(preconsolidationStresses)); } - if (layersWithSoils == null) + if (layersWithSoil == null) { - throw new ArgumentNullException(nameof(layersWithSoils)); + throw new ArgumentNullException(nameof(layersWithSoil)); } var profile = new SoilProfile2D(); - profile.PreconsolidationStresses.AddRange(CreatePreconsolidationStresses(soilProfile)); + profile.PreconsolidationStresses.AddRange(CreatePreconsolidationStresses(preconsolidationStresses)); var alreadyCreatedPoints = new List(); var alreadyCreatedCurves = new List(); + var alreadyCreatedLoops = new List(); - foreach (KeyValuePair layerWithSoil in layersWithSoils) + foreach (LayerWithSoil layerWithSoil in layersWithSoil) { profile.Surfaces.Add(new SoilLayer2D { - IsAquifer = layerWithSoil.Key.IsAquifer, - Soil = layerWithSoil.Value, - GeometrySurface = CreateGeometrySurface(layerWithSoil.Key, alreadyCreatedPoints, alreadyCreatedCurves), - WaterpressureInterpolationModel = ConvertWaterPressureInterpolationModel(layerWithSoil.Key.WaterPressureInterpolationModel) + IsAquifer = layerWithSoil.IsAquifer, + Soil = layerWithSoil.Soil, + GeometrySurface = CreateGeometrySurface(layerWithSoil, alreadyCreatedPoints, alreadyCreatedCurves, alreadyCreatedLoops), + WaterpressureInterpolationModel = layerWithSoil.WaterPressureInterpolationModel }); } @@ -84,34 +78,42 @@ return profile; } - private static IEnumerable CreatePreconsolidationStresses(SoilProfile soilProfile) + private static IEnumerable CreatePreconsolidationStresses(IEnumerable preconsolidationStresses) { - return soilProfile.PreconsolidationStresses.Select(preconsolidationStress => new PreConsolidationStress + return preconsolidationStresses.Select(preconsolidationStress => new PreConsolidationStress { StressValue = preconsolidationStress.Stress, X = preconsolidationStress.Coordinate.X, Z = preconsolidationStress.Coordinate.Y }).ToArray(); } - private static GeometrySurface CreateGeometrySurface(SoilLayer layer, List alreadyCreatedPoints, List alreadyCreatedCurves) + private static GeometrySurface CreateGeometrySurface(LayerWithSoil layer, List alreadyCreatedPoints, List alreadyCreatedCurves, List alreadyCreatedLoops) { var surface = new GeometrySurface { - OuterLoop = CreateGeometryLoop(layer.OuterRing, alreadyCreatedPoints, alreadyCreatedCurves) + OuterLoop = CreateGeometryLoop(layer.OuterRing, alreadyCreatedPoints, alreadyCreatedCurves, alreadyCreatedLoops) }; - surface.InnerLoops.AddRange(layer.Holes.Select(h => CreateGeometryLoop(h, alreadyCreatedPoints, alreadyCreatedCurves)).ToArray()); + surface.InnerLoops.AddRange(layer.InnerRings.Select(ir => CreateGeometryLoop(ir, alreadyCreatedPoints, alreadyCreatedCurves, alreadyCreatedLoops)).ToArray()); return surface; } - private static GeometryLoop CreateGeometryLoop(Point2D[] points, List alreadyCreatedPoints, List alreadyCreatedCurves) + private static GeometryLoop CreateGeometryLoop(Point2D[] points, List alreadyCreatedPoints, List alreadyCreatedCurves, List alreadyCreatedLoops) { - var loop = new GeometryLoop(); + GeometryLoop loop = alreadyCreatedLoops.FirstOrDefault(l => l.CurveList.Select(cl => cl.HeadPoint.X).SequenceEqual(points.Select(p => p.X)) + && l.CurveList.Select(cl => cl.HeadPoint.Z).SequenceEqual(points.Select(p => p.Y))); - loop.CurveList.AddRange(CreateGeometryCurves(points, alreadyCreatedPoints, alreadyCreatedCurves)); + if (loop == null) + { + loop = new GeometryLoop(); + loop.CurveList.AddRange(CreateGeometryCurves(points, alreadyCreatedPoints, alreadyCreatedCurves)); + + alreadyCreatedLoops.Add(loop); + } + return loop; } @@ -172,10 +174,7 @@ geometryData.Surfaces.AddRange(profile.Surfaces .Select(s => s.GeometrySurface)); geometryData.Loops.AddRange(geometryData.Surfaces - .SelectMany(gs => new[] - { - gs.OuterLoop - }.Concat(gs.InnerLoops))); + .Select(gs => gs.OuterLoop)); geometryData.Curves.AddRange(geometryData.Loops .SelectMany(l => l.CurveList) .Distinct()); @@ -190,34 +189,5 @@ return geometryData; } - - /// - /// Converts a into a . - /// - /// The to convert. - /// A based on . - /// Thrown when - /// is an invalid value. - /// Thrown when - /// is a valid value but unsupported. - private static WaterpressureInterpolationModel ConvertWaterPressureInterpolationModel(WaterPressureInterpolationModel waterPressureInterpolationModel) - { - if (!Enum.IsDefined(typeof(WaterPressureInterpolationModel), waterPressureInterpolationModel)) - { - throw new InvalidEnumArgumentException(nameof(waterPressureInterpolationModel), - (int) waterPressureInterpolationModel, - typeof(WaterPressureInterpolationModel)); - } - - switch (waterPressureInterpolationModel) - { - case WaterPressureInterpolationModel.Automatic: - return WaterpressureInterpolationModel.Automatic; - case WaterPressureInterpolationModel.Hydrostatic: - return WaterpressureInterpolationModel.Hydrostatic; - default: - throw new NotSupportedException(); - } - } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj =================================================================== diff -u -raad9abc76e5028fd9a5913176d08723e668ada4b -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision aad9abc76e5028fd9a5913176d08723e668ada4b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -67,6 +67,8 @@ + + @@ -78,7 +80,6 @@ - Fisheye: Tag 66894d34e58e0db658fa3183df8792ed244ccda3 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile2DLayerHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/Ringtoets.MacroStabilityInwards.Primitives.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -55,7 +55,6 @@ - Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs =================================================================== diff -u -ra07b01c421d15a0a1e4933e3967ac1f25d30eccc -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision a07b01c421d15a0a1e4933e3967ac1f25d30eccc) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.Test/Converters/SoilProfileConverterTest.cs (.../SoilProfileConverterTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.ComponentModel; using System.Linq; using Core.Common.Base.Data; @@ -55,57 +56,19 @@ // Setup var random = new Random(22); - var soilLayer = new MacroStabilityInwardsSoilLayer2D(CreateRing(21), - new[] - { - CreateRing(11), - CreateRing(22) - }) + MacroStabilityInwardsSoilLayer2D soilLayer1 = CreateRandomSoilLayer(22, new[] { - Data = + CreateRandomSoilLayer(23, Enumerable.Empty()), + CreateRandomSoilLayer(24, Enumerable.Empty()) + }); + + MacroStabilityInwardsSoilLayer2D soilLayer2 = CreateRandomSoilLayer(25, new[] + { + CreateRandomSoilLayer(26, new[] { - UsePop = random.NextBoolean(), - IsAquifer = random.NextBoolean(), - MaterialName = "Test", - 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() - } - } - }; + CreateRandomSoilLayer(27, Enumerable.Empty()) + }) + }); var preconsolidationStress = new MacroStabilityInwardsPreconsolidationStress(new Point2D(random.NextDouble(), random.NextDouble()), new VariationCoefficientLogNormalDistribution @@ -117,7 +80,8 @@ var profile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine( new[] { - soilLayer + soilLayer1, + soilLayer2 }, new[] { @@ -180,6 +144,63 @@ Assert.AreEqual(expectedShearStrengthModel, soilProfile.Layers.First().ShearStrengthModel); } + private static MacroStabilityInwardsSoilLayer2D CreateRandomSoilLayer(int seed, IEnumerable nestedLayers) + { + return new MacroStabilityInwardsSoilLayer2D(CreateRing(seed), + Enumerable.Empty(), + CreateRandomSoilLayerData(seed), + nestedLayers); + } + + private static MacroStabilityInwardsSoilLayerData CreateRandomSoilLayerData(int seed) + { + var random = new Random(seed); + + return new MacroStabilityInwardsSoilLayerData + { + UsePop = random.NextBoolean(), + IsAquifer = random.NextBoolean(), + MaterialName = "Test", + AbovePhreaticLevel = + { + Mean = random.NextRoundedDouble(1, 10), + CoefficientOfVariation = random.NextRoundedDouble(0, 1), + Shift = random.NextRoundedDouble(0, 1) + }, + BelowPhreaticLevel = + { + Mean = random.NextRoundedDouble(1, 10), + CoefficientOfVariation = random.NextRoundedDouble(0, 1), + Shift = random.NextRoundedDouble(0, 1) + }, + 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() + } + }; + } + private static Ring CreateRing(int seed) { var random = new Random(seed); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.TestUtil/CalculatorInputAssert.cs =================================================================== diff -u -r7585d2fd78627d94d55ffa16423af90a91e4efd4 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.TestUtil/CalculatorInputAssert.cs (.../CalculatorInputAssert.cs) (revision 7585d2fd78627d94d55ffa16423af90a91e4efd4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.CalculatedInput.TestUtil/CalculatorInputAssert.cs (.../CalculatorInputAssert.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -113,8 +113,9 @@ for (var i = 0; i < original.Length; i++) { CollectionAssert.AreEqual(original[i].OuterRing.Points, actual[i].OuterRing); - CollectionAssert.AreEqual(original[i].Holes.Select(h => h.Points), actual[i].Holes); + AssertLayers(original[i].NestedLayers.ToArray(), actual[i].NestedLayers.ToArray()); + IMacroStabilityInwardsSoilLayerData expectedData = original[i].Data; Assert.AreEqual(expectedData.MaterialName, actual[i].MaterialName); Assert.AreEqual(expectedData.UsePop, actual[i].UsePop); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/Ringtoets.MacroStabilityInwards.Data.Test.csproj (.../Ringtoets.MacroStabilityInwards.Data.Test.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -87,6 +87,7 @@ + Fisheye: Tag bcc66e2160dd443e08145f036176875f0fc87b62 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/SoilProfile/MacroStabilityInwardsSoilProfile2DLayersHelperTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.TestUtil/MacroStabilityInwardsViewChartDataAssert.cs =================================================================== diff -u -r9de18fdb8dc733977bbb44f41cf08567b5fcbeb3 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.TestUtil/MacroStabilityInwardsViewChartDataAssert.cs (.../MacroStabilityInwardsViewChartDataAssert.cs) (revision 9de18fdb8dc733977bbb44f41cf08567b5fcbeb3) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.TestUtil/MacroStabilityInwardsViewChartDataAssert.cs (.../MacroStabilityInwardsViewChartDataAssert.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -24,6 +24,7 @@ using Core.Components.Chart.Data; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.Data; +using Ringtoets.MacroStabilityInwards.Data.SoilProfile; using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Forms.TestUtil @@ -69,7 +70,7 @@ var soilProfileChartData = (ChartDataCollection) actual; IMacroStabilityInwardsSoilLayer2D[] layers = soilProfileUnderSurface?.Layers != null - ? MacroStabilityInwardsSoilProfile2DLayerHelper.GetLayersRecursively(soilProfileUnderSurface.Layers).ToArray() + ? MacroStabilityInwardsSoilProfile2DLayersHelper.GetLayersRecursively(soilProfileUnderSurface.Layers).ToArray() : new IMacroStabilityInwardsSoilLayer2D[0]; int expectedLayerCount = layers.Length; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs =================================================================== diff -u -r2f475a02ae31bb68d351db98e3e7e82cb7456291 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs (.../SoilLayerTest.cs) (revision 2f475a02ae31bb68d351db98e3e7e82cb7456291) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilLayerTest.cs (.../SoilLayerTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -20,81 +20,70 @@ // All rights reserved. using System; +using System.Linq; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; -using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Calculators.Input { [TestFixture] public class SoilLayerTest { [Test] - public void Constructor_ConstructionPropertiesNull_ThrowsArgumentNullException() + public void Constructor_OuterRingNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new SoilLayer(new Point2D[0], new Point2D[0][], null); + TestDelegate call = () => new SoilLayer(null, new SoilLayer.ConstructionProperties(), Enumerable.Empty()); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("properties", exception.ParamName); + Assert.AreEqual("outerRing", exception.ParamName); } [Test] - public void Constructor_OuterRingNull_ThrowsArgumentNullException() + public void Constructor_ConstructionPropertiesNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new SoilLayer(null, new Point2D[0][], new SoilLayer.ConstructionProperties()); + TestDelegate call = () => new SoilLayer(new Point2D[0], null, Enumerable.Empty()); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("outerRing", exception.ParamName); + Assert.AreEqual("properties", exception.ParamName); } [Test] - public void Constructor_HolesNull_ThrowsArgumentNullException() + public void Constructor_NestedLayersNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new SoilLayer(new Point2D[0], null, new SoilLayer.ConstructionProperties()); + TestDelegate call = () => new SoilLayer(new Point2D[0], new SoilLayer.ConstructionProperties(), null); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("holes", exception.ParamName); + Assert.AreEqual("nestedLayers", exception.ParamName); } [Test] public void Constructor_WithAllParameters_ExpectedValues() { // Setup - var outerRing = new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - }; - var holes = new[] - { - new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - } - }; + var outerRing = new Point2D[0]; + var nestedLayers = new SoilLayer[0]; // Call - var layer = new SoilLayer(outerRing, holes, new SoilLayer.ConstructionProperties()); + var layer = new SoilLayer(outerRing, new SoilLayer.ConstructionProperties(), nestedLayers); // Assert Assert.AreSame(outerRing, layer.OuterRing); - CollectionAssert.AreEqual(holes, layer.Holes); + Assert.AreSame(nestedLayers, layer.NestedLayers); } [Test] public void Constructor_EmptyConstructionProperties_ExpectedValues() { // Call - var layer = new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties()); + var layer = new SoilLayer(new Point2D[0], new SoilLayer.ConstructionProperties(), Enumerable.Empty()); // Assert Assert.IsFalse(layer.IsAquifer); @@ -132,22 +121,24 @@ var waterPressureInterpolationModel = random.NextEnumValue(); // Call - var layer = new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties - { - MaterialName = materialName, - IsAquifer = isAquifer, - UsePop = usePop, - ShearStrengthModel = shearStrengthModel, - AbovePhreaticLevel = abovePhreaticLevel, - BelowPhreaticLevel = belowPhreaticLevel, - Cohesion = cohesion, - FrictionAngle = frictionAngle, - ShearStrengthRatio = shearStrengthRatio, - StrengthIncreaseExponent = strengthIncreaseExponent, - Pop = pop, - DilatancyType = dilatancyType, - WaterPressureInterpolationModel = waterPressureInterpolationModel - }); + var layer = new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + MaterialName = materialName, + IsAquifer = isAquifer, + UsePop = usePop, + ShearStrengthModel = shearStrengthModel, + AbovePhreaticLevel = abovePhreaticLevel, + BelowPhreaticLevel = belowPhreaticLevel, + Cohesion = cohesion, + FrictionAngle = frictionAngle, + ShearStrengthRatio = shearStrengthRatio, + StrengthIncreaseExponent = strengthIncreaseExponent, + Pop = pop, + DilatancyType = dilatancyType, + WaterPressureInterpolationModel = waterPressureInterpolationModel + }, + Enumerable.Empty()); // Assert Assert.AreEqual(materialName, layer.MaterialName); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs =================================================================== diff -u -rf2838b78c54529e9b15208b44de854f7760e350f -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs (.../SoilProfileTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Input/SoilProfileTest.cs (.../SoilProfileTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -20,10 +20,10 @@ // All rights reserved. using System; +using System.Linq; using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; -using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Calculators.Input { @@ -58,7 +58,7 @@ // Setup var layers = new[] { - new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties()) + new SoilLayer(new Point2D[0], new SoilLayer.ConstructionProperties(), Enumerable.Empty()) }; var preconsolidationStresses = new[] { Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs =================================================================== diff -u -rb351ccdb9efb3be5a6c899c77598eadd4ff76563 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision b351ccdb9efb3be5a6c899c77598eadd4ff76563) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/UpliftVan/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -134,18 +134,10 @@ Assert.AreEqual(input.MoveGrid, upliftVanKernel.MoveGrid); Assert.AreEqual(input.MaximumSliceWidth, upliftVanKernel.MaximumSliceWidth); - Soil[] soils = SoilCreator.Create(input.SoilProfile); - Dictionary layersWithSoils = - input.SoilProfile.Layers - .Zip(soils, (layer, soil) => new - { - layer, - soil - }) - .ToDictionary(x => x.layer, x => x.soil); + LayerWithSoil[] layersWithSoils = LayerWithSoilCreator.Create(input.SoilProfile); - KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(soils), upliftVanKernel.SoilModel); - KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile, layersWithSoils), upliftVanKernel.SoilProfile); + KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(layersWithSoils.Select(lws => lws.Soil).ToArray()), upliftVanKernel.SoilModel); + KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile.PreconsolidationStresses, layersWithSoils), upliftVanKernel.SoilProfile); KernelInputAssert.AssertStabilityLocations(UpliftVanStabilityLocationCreator.CreateExtreme(input), upliftVanKernel.LocationExtreme); KernelInputAssert.AssertStabilityLocations(UpliftVanStabilityLocationCreator.CreateDaily(input), upliftVanKernel.LocationDaily); KernelInputAssert.AssertSurfaceLines(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection), upliftVanKernel.SurfaceLine); @@ -377,35 +369,35 @@ surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()), + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), new SoilLayer.ConstructionProperties { IsAquifer = true - }), + }, + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()), + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()) + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()) }, new[] { new PreconsolidationStress(new Point2D(0, 0), 1.1) Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetDailyCalculatorTest.cs =================================================================== diff -u -r4061c28197adfa0f3dc171c74fbe300ecb3a89c4 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetDailyCalculatorTest.cs (.../WaternetDailyCalculatorTest.cs) (revision 4061c28197adfa0f3dc171c74fbe300ecb3a89c4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetDailyCalculatorTest.cs (.../WaternetDailyCalculatorTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using System.Linq; using Deltares.WTIStability.Data.Geo; using NUnit.Framework; @@ -32,7 +31,6 @@ using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.Waternet; -using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; using WtiStabilityWaternet = Deltares.WTIStability.Data.Geo.Waternet; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Calculators.Waternet @@ -72,18 +70,10 @@ new WaternetDailyCalculator(input, testMacroStabilityInwardsKernelFactory).Calculate(); // Assert - Soil[] soils = SoilCreator.Create(input.SoilProfile); - Dictionary layersWithSoils = - input.SoilProfile.Layers - .Zip(soils, (layer, soil) => new - { - layer, - soil - }) - .ToDictionary(x => x.layer, x => x.soil); + LayerWithSoil[] layersWithSoils = LayerWithSoilCreator.Create(input.SoilProfile); - KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(soils), waternetKernel.SoilModel); - KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile, layersWithSoils), waternetKernel.SoilProfile); + KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(layersWithSoils.Select(lws => lws.Soil).ToArray()), waternetKernel.SoilModel); + KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile.PreconsolidationStresses, layersWithSoils), waternetKernel.SoilProfile); KernelInputAssert.AssertStabilityLocations(WaternetStabilityLocationCreator.Create(input), waternetKernel.Location); KernelInputAssert.AssertSurfaceLines(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection), waternetKernel.SurfaceLine); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs =================================================================== diff -u -r4061c28197adfa0f3dc171c74fbe300ecb3a89c4 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs (.../WaternetExtremeCalculatorTest.cs) (revision 4061c28197adfa0f3dc171c74fbe300ecb3a89c4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Calculators/Waternet/WaternetExtremeCalculatorTest.cs (.../WaternetExtremeCalculatorTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -72,18 +72,10 @@ new WaternetExtremeCalculator(input, testMacroStabilityInwardsKernelFactory).Calculate(); // Assert - Soil[] soils = SoilCreator.Create(input.SoilProfile); - Dictionary layersWithSoils = - input.SoilProfile.Layers - .Zip(soils, (layer, soil) => new - { - layer, - soil - }) - .ToDictionary(x => x.layer, x => x.soil); + LayerWithSoil[] layersWithSoils = LayerWithSoilCreator.Create(input.SoilProfile); - KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(soils), waternetKernel.SoilModel); - KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile, layersWithSoils), waternetKernel.SoilProfile); + KernelInputAssert.AssertSoilModels(SoilModelCreator.Create(layersWithSoils.Select(lws => lws.Soil).ToArray()), waternetKernel.SoilModel); + KernelInputAssert.AssertSoilProfiles(SoilProfileCreator.Create(input.SoilProfile.PreconsolidationStresses, layersWithSoils), waternetKernel.SoilProfile); KernelInputAssert.AssertStabilityLocations(WaternetStabilityLocationCreator.Create(input), waternetKernel.Location); KernelInputAssert.AssertSurfaceLines(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection), waternetKernel.SurfaceLine); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilCreatorTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilCreatorTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilCreatorTest.cs (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -0,0 +1,310 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using System.Linq; +using Core.Common.TestUtil; +using Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; +using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input; +using DilatancyType = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.DilatancyType; +using Point2D = Core.Common.Base.Geometry.Point2D; +using ShearStrengthModel = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.ShearStrengthModel; +using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; +using SoilProfile = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilProfile; +using WtiStabilityDilatancyType = Deltares.WTIStability.Data.Geo.DilatancyType; +using WtiStabilityShearStrengthModel = Deltares.WTIStability.Data.Geo.ShearStrengthModel; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Creators.Input +{ + [TestFixture] + public class LayerWithSoilCreatorTest + { + [Test] + public void Create_SoilProfileNull_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => LayerWithSoilCreator.Create(null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("soilProfile", paramName); + } + + [Test] + public void Create_SoilProfile_ExpectedLayersWithSoil() + { + // Setup + var outerRing1 = new Point2D[0]; + var outerRing2 = new Point2D[0]; + var outerRing3 = new Point2D[0]; + var outerRing4 = new Point2D[0]; + var outerRing5 = new Point2D[0]; + var outerRing6 = new Point2D[0]; + var soilProfile = new SoilProfile + ( + new[] + { + new SoilLayer(outerRing1, CreateRandomConstructionProperties(21, "Material 1"), new[] + { + new SoilLayer(outerRing2, CreateRandomConstructionProperties(22, "Material 2"), new[] + { + new SoilLayer(outerRing3, CreateRandomConstructionProperties(22, "Material 3"), Enumerable.Empty()) + }), + new SoilLayer(outerRing4, CreateRandomConstructionProperties(23, "Material 4"), Enumerable.Empty()) + }), + new SoilLayer(outerRing5, CreateRandomConstructionProperties(24, "Material 5"), new[] + { + new SoilLayer(outerRing6, CreateRandomConstructionProperties(25, "Material 6"), Enumerable.Empty()) + }) + }, Enumerable.Empty() + ); + + // Call + LayerWithSoil[] layersWithSoil = LayerWithSoilCreator.Create(soilProfile); + + // Assert + SoilLayer layer1 = soilProfile.Layers.ElementAt(0); + SoilLayer layer2 = layer1.NestedLayers.ElementAt(0); + SoilLayer layer3 = layer2.NestedLayers.ElementAt(0); + SoilLayer layer4 = layer1.NestedLayers.ElementAt(1); + SoilLayer layer5 = soilProfile.Layers.ElementAt(1); + SoilLayer layer6 = layer5.NestedLayers.ElementAt(0); + + Assert.AreEqual(6, layersWithSoil.Length); + Assert.AreEqual(outerRing1, layersWithSoil[0].OuterRing); + CollectionAssert.AreEqual(new[] + { + outerRing2, + outerRing3, + outerRing4 + }, layersWithSoil[0].InnerRings); + AssertSoilLayerProperties(layer1, layersWithSoil[0]); + + Assert.AreEqual(outerRing2, layersWithSoil[1].OuterRing); + CollectionAssert.AreEqual(new[] + { + outerRing3 + }, layersWithSoil[1].InnerRings); + AssertSoilLayerProperties(layer2, layersWithSoil[1]); + + Assert.AreEqual(outerRing3, layersWithSoil[2].OuterRing); + CollectionAssert.IsEmpty(layersWithSoil[2].InnerRings); + AssertSoilLayerProperties(layer3, layersWithSoil[2]); + + Assert.AreEqual(outerRing4, layersWithSoil[3].OuterRing); + CollectionAssert.IsEmpty(layersWithSoil[3].InnerRings); + AssertSoilLayerProperties(layer4, layersWithSoil[3]); + + Assert.AreEqual(outerRing5, layersWithSoil[4].OuterRing); + CollectionAssert.AreEqual(new[] + { + outerRing6 + }, layersWithSoil[4].InnerRings); + AssertSoilLayerProperties(layer5, layersWithSoil[4]); + + Assert.AreEqual(outerRing6, layersWithSoil[5].OuterRing); + CollectionAssert.IsEmpty(layersWithSoil[5].InnerRings); + AssertSoilLayerProperties(layer6, layersWithSoil[5]); + } + + [Test] + public void Create_InvalidShearStrengthModel_ThrowInvalidEnumArgumentException() + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + ShearStrengthModel = (ShearStrengthModel) 99 + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + TestDelegate test = () => LayerWithSoilCreator.Create(profile); + + // Assert + string message = $"The value of argument 'shearStrengthModel' ({99}) is invalid for Enum type '{typeof(ShearStrengthModel).Name}'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, message); + } + + [Test] + public void Create_InvalidDilatancyType_ThrowInvalidEnumArgumentException() + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + DilatancyType = (DilatancyType) 99 + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + TestDelegate test = () => LayerWithSoilCreator.Create(profile); + + // Assert + string message = $"The value of argument 'dilatancyType' ({99}) is invalid for Enum type '{typeof(DilatancyType).Name}'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, message); + } + + [Test] + public void Create_InvalidWaterPressureInterpolationModel_ThrowInvalidEnumArgumentException() + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + WaterPressureInterpolationModel = (WaterPressureInterpolationModel) 99 + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + TestDelegate test = () => LayerWithSoilCreator.Create(profile); + + // Assert + string message = $"The value of argument 'waterPressureInterpolationModel' ({99}) is invalid for Enum type '{typeof(WaterPressureInterpolationModel).Name}'."; + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, message); + } + + [TestCase(ShearStrengthModel.CPhi, WtiStabilityShearStrengthModel.CPhi)] + [TestCase(ShearStrengthModel.CPhiOrSuCalculated, WtiStabilityShearStrengthModel.CPhiOrCuCalculated)] + [TestCase(ShearStrengthModel.SuCalculated, WtiStabilityShearStrengthModel.CuCalculated)] + public void Create_ValidShearStrengthModel_ExpectedShearStrengthModel(ShearStrengthModel shearStrengthModel, WtiStabilityShearStrengthModel expectedShearStrengthModel) + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + ShearStrengthModel = shearStrengthModel + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + LayerWithSoil[] layersWithSoil = LayerWithSoilCreator.Create(profile); + + // Assert + Assert.AreEqual(expectedShearStrengthModel, layersWithSoil[0].Soil.ShearStrengthModel); + } + + [TestCase(DilatancyType.MinusPhi, WtiStabilityDilatancyType.MinusPhi)] + [TestCase(DilatancyType.Phi, WtiStabilityDilatancyType.Phi)] + [TestCase(DilatancyType.Zero, WtiStabilityDilatancyType.Zero)] + public void Create_ValidDilatancyType_ExpectedDilatancyType(DilatancyType dilatancyType, WtiStabilityDilatancyType expectedDilatancyType) + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + DilatancyType = dilatancyType + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + LayerWithSoil[] layersWithSoil = LayerWithSoilCreator.Create(profile); + + // Assert + Assert.AreEqual(expectedDilatancyType, layersWithSoil[0].Soil.DilatancyType); + } + + [TestCase(WaterPressureInterpolationModel.Automatic, WaterpressureInterpolationModel.Automatic)] + [TestCase(WaterPressureInterpolationModel.Hydrostatic, WaterpressureInterpolationModel.Hydrostatic)] + public void Create_ValidWaterPressureInterpolationModel_ExpectedWaterPressureInterpolationModel(WaterPressureInterpolationModel waterPressureInterpolationModel, WaterpressureInterpolationModel expectedWaterPressureInterpolationModel) + { + // Setup + var profile = new SoilProfile(new[] + { + new SoilLayer(new Point2D[0], + new SoilLayer.ConstructionProperties + { + WaterPressureInterpolationModel = waterPressureInterpolationModel + }, + Enumerable.Empty()) + }, Enumerable.Empty()); + + // Call + LayerWithSoil[] layersWithSoil = LayerWithSoilCreator.Create(profile); + + // Assert + Assert.AreEqual(expectedWaterPressureInterpolationModel, layersWithSoil[0].WaterPressureInterpolationModel); + } + + private static void AssertSoilLayerProperties(SoilLayer soilLayer, LayerWithSoil layerWithSoil) + { + Assert.AreEqual(soilLayer.IsAquifer, layerWithSoil.IsAquifer); + Assert.AreEqual(WaterpressureInterpolationModel.Hydrostatic, layerWithSoil.WaterPressureInterpolationModel); + + Assert.IsNotNull(layerWithSoil.Soil); + Assert.AreEqual(soilLayer.UsePop, layerWithSoil.Soil.UsePop); + Assert.AreEqual(WtiStabilityShearStrengthModel.CuCalculated, layerWithSoil.Soil.ShearStrengthModel); + Assert.AreEqual(soilLayer.MaterialName, layerWithSoil.Soil.Name); + Assert.AreEqual(soilLayer.AbovePhreaticLevel, layerWithSoil.Soil.AbovePhreaticLevel); + Assert.AreEqual(soilLayer.BelowPhreaticLevel, layerWithSoil.Soil.BelowPhreaticLevel); + Assert.AreEqual(soilLayer.Cohesion, layerWithSoil.Soil.Cohesion); + Assert.AreEqual(soilLayer.FrictionAngle, layerWithSoil.Soil.FrictionAngle); + Assert.AreEqual(soilLayer.ShearStrengthRatio, layerWithSoil.Soil.RatioCuPc); + Assert.AreEqual(soilLayer.StrengthIncreaseExponent, layerWithSoil.Soil.StrengthIncreaseExponent); + Assert.AreEqual(soilLayer.Pop, layerWithSoil.Soil.PoP); + Assert.AreEqual(WtiStabilityDilatancyType.MinusPhi, layerWithSoil.Soil.DilatancyType); + + Assert.IsNaN(layerWithSoil.Soil.Ocr); // OCR is only used as output + Assert.IsNaN(layerWithSoil.Soil.CuBottom); // Only for CuMeasured + Assert.IsNaN(layerWithSoil.Soil.CuTop); // Only for CuMeasured + } + + private static SoilLayer.ConstructionProperties CreateRandomConstructionProperties(int seed, string materialName) + { + var random = new Random(seed); + + return new SoilLayer.ConstructionProperties + { + UsePop = random.NextBoolean(), + IsAquifer = random.NextBoolean(), + ShearStrengthModel = ShearStrengthModel.SuCalculated, + MaterialName = materialName, + AbovePhreaticLevel = random.NextDouble(), + BelowPhreaticLevel = random.NextDouble(), + Cohesion = random.NextDouble(), + FrictionAngle = random.NextDouble(), + ShearStrengthRatio = random.NextDouble(), + StrengthIncreaseExponent = random.NextDouble(), + Pop = random.NextDouble(), + DilatancyType = DilatancyType.MinusPhi, + WaterPressureInterpolationModel = WaterPressureInterpolationModel.Hydrostatic + }; + } + } +} \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilTest.cs =================================================================== diff -u --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilTest.cs (revision 0) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/LayerWithSoilTest.cs (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -0,0 +1,56 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Common.TestUtil; +using Deltares.WTIStability.Data.Geo; +using NUnit.Framework; +using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input; +using Point2D = Core.Common.Base.Geometry.Point2D; + +namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Creators.Input +{ + [TestFixture] + public class LayerWithSoilTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + var random = new Random(21); + var outerRing = new Point2D[0]; + var innerRings = new Point2D[0][]; + var soil = new Soil("Soil"); + bool isAquifer = random.NextBoolean(); + var waterPressureInterpolationModel = random.NextEnumValue(); + + // Call + var layerWithSoil = new LayerWithSoil(outerRing, innerRings, soil, isAquifer, waterPressureInterpolationModel); + + // Assert + Assert.AreSame(outerRing, layerWithSoil.OuterRing); + Assert.AreSame(innerRings, layerWithSoil.InnerRings); + Assert.AreSame(soil, layerWithSoil.Soil); + Assert.AreEqual(isAquifer, layerWithSoil.IsAquifer); + Assert.AreEqual(waterPressureInterpolationModel, layerWithSoil.WaterPressureInterpolationModel); + } + } +} \ No newline at end of file Fisheye: Tag 66894d34e58e0db658fa3183df8792ed244ccda3 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs =================================================================== diff -u -r4a53a1399a74800550fc84ca9c4e67ba61037704 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision 4a53a1399a74800550fc84ca9c4e67ba61037704) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/Input/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -20,8 +20,6 @@ // All rights reserved. using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using Core.Common.Base.Data; using Core.Common.TestUtil; @@ -31,8 +29,6 @@ using Ringtoets.MacroStabilityInwards.KernelWrapper.Creators.Input; using Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Kernels.UpliftVan.Input; using Point2D = Core.Common.Base.Geometry.Point2D; -using SoilLayer = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilLayer; -using SoilProfile = Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input.SoilProfile; using WtiStabilityPoint2D = Deltares.WTIStability.Data.Geo.Point2D; namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test.Creators.Input @@ -41,62 +37,28 @@ public class SoilProfileCreatorTest { [Test] - public void Create_SoilProfileNull_ThrowsArgumentNullException() + public void Create_PreconsolidationStressesNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => SoilProfileCreator.Create(null, new Dictionary()); + TestDelegate call = () => SoilProfileCreator.Create(null, Enumerable.Empty()); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("soilProfile", exception.ParamName); + Assert.AreEqual("preconsolidationStresses", exception.ParamName); } [Test] public void Create_SoilDictionaryNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => SoilProfileCreator.Create(new SoilProfile(Enumerable.Empty(), - Enumerable.Empty()), + TestDelegate call = () => SoilProfileCreator.Create(Enumerable.Empty(), null); // Assert var exception = Assert.Throws(call); - Assert.AreEqual("layersWithSoils", exception.ParamName); + Assert.AreEqual("layersWithSoil", exception.ParamName); } - [Test] - public void Create_InvalidWaterPressureInterpolationModel_ThrowInvalidEnumArgumentException() - { - // Setup - var layer = new SoilLayer( - new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - }, Enumerable.Empty(), - new SoilLayer.ConstructionProperties - { - WaterPressureInterpolationModel = (WaterPressureInterpolationModel) 99 - }); - - var soilProfile = new SoilProfile(new[] - { - layer - }, Enumerable.Empty()); - - // Call - TestDelegate test = () => SoilProfileCreator.Create(soilProfile, new Dictionary - { - { - layer, new Soil() - } - }); - - // Assert - string message = $"The value of argument 'waterPressureInterpolationModel' ({99}) is invalid for Enum type '{typeof(WaterPressureInterpolationModel).Name}'."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, message); - } - /// /// The soil profile used in this tests contains two layers (outer rings) and two holes (inner rings): /// @@ -114,10 +76,9 @@ /// 0 # # # # # # # # # # # /// /// 0 1 2 3 4 5 6 7 8 9 10 - /// > - [TestCase(WaterPressureInterpolationModel.Automatic, WaterpressureInterpolationModel.Automatic)] - [TestCase(WaterPressureInterpolationModel.Hydrostatic, WaterpressureInterpolationModel.Hydrostatic)] - public void Create_WithAllData_ReturnSoilProfile2D(WaterPressureInterpolationModel waterPressureInterpolationModel, WaterpressureInterpolationModel waterpressureInterpolationModel) + /// + [Test] + public void Create_WithAllData_ReturnSoilProfile2D() { // Setup var random = new Random(11); @@ -157,57 +118,71 @@ new Point2D(8, 7) }; - var layer1 = new SoilLayer( - layer1Points, Enumerable.Empty(), - new SoilLayer.ConstructionProperties - { - MaterialName = "Clay", - IsAquifer = false, - WaterPressureInterpolationModel = waterPressureInterpolationModel - }); - - var layer2 = new SoilLayer( - layer2Points, new[] - { - layer2Hole1Points, - layer2Hole2Points - }, - new SoilLayer.ConstructionProperties - { - MaterialName = "Sand", - IsAquifer = true, - WaterPressureInterpolationModel = waterPressureInterpolationModel - }); - var soil1 = new Soil { - Name = layer1.MaterialName + Name = "Clay" }; var soil2 = new Soil { - Name = layer2.MaterialName + Name = "Sand" }; - var soilProfile = new SoilProfile(new[] + var soil3 = new Soil { - layer1, - layer2 - }, new[] + Name = "Nested clay" + }; + + var soil4 = new Soil { - new PreconsolidationStress(new Point2D(preconsolidationStressXCoordinate, preconsolidationStressZCoordinate), preconsolidationStressDesignValue) - }); + Name = "Nested sand" + }; + var layerWithSoil1 = new LayerWithSoil( + layer1Points, + new Point2D[0][], + soil1, + false, + WaterpressureInterpolationModel.Automatic); + + var layerWithSoil2 = new LayerWithSoil( + layer2Points, + new[] + { + layer2Hole1Points, + layer2Hole2Points + }, + soil2, + true, + WaterpressureInterpolationModel.Hydrostatic); + + var layerWithSoil3 = new LayerWithSoil( + layer2Hole1Points, + new Point2D[0][], + soil3, + false, + WaterpressureInterpolationModel.Automatic); + + var layerWithSoil4 = new LayerWithSoil( + layer2Hole2Points, + new Point2D[0][], + soil4, + true, + WaterpressureInterpolationModel.Hydrostatic); + // Call - SoilProfile2D profile = SoilProfileCreator.Create(soilProfile, new Dictionary - { + SoilProfile2D profile = SoilProfileCreator.Create( + new[] { - layer1, soil1 + new PreconsolidationStress(new Point2D(preconsolidationStressXCoordinate, preconsolidationStressZCoordinate), preconsolidationStressDesignValue) }, + new[] { - layer2, soil2 - } - }); + layerWithSoil1, + layerWithSoil2, + layerWithSoil3, + layerWithSoil4 + }); // Assert Assert.AreEqual(1, profile.PreconsolidationStresses.Count); @@ -218,18 +193,32 @@ Assert.AreEqual(preconsolidationStressXCoordinate, preconsolidationStress.X); Assert.AreEqual(preconsolidationStressZCoordinate, preconsolidationStress.Z); - Assert.AreEqual(2, profile.Surfaces.Count); + Assert.AreEqual(4, profile.Surfaces.Count); + SoilLayer2D surface1 = profile.Surfaces.ElementAt(0); Assert.AreSame(soil1, surface1.Soil); - Assert.AreEqual(layer1.MaterialName, surface1.Name); - Assert.AreEqual(layer1.IsAquifer, surface1.IsAquifer); - Assert.AreEqual(waterpressureInterpolationModel, surface1.WaterpressureInterpolationModel); + Assert.AreEqual(soil1.Name, surface1.Name); + Assert.AreEqual(layerWithSoil1.IsAquifer, surface1.IsAquifer); + Assert.AreEqual(layerWithSoil1.WaterPressureInterpolationModel, surface1.WaterpressureInterpolationModel); + SoilLayer2D surface2 = profile.Surfaces.ElementAt(1); Assert.AreSame(soil2, surface2.Soil); - Assert.AreEqual(layer2.MaterialName, surface2.Name); - Assert.AreEqual(layer2.IsAquifer, surface2.IsAquifer); - Assert.AreEqual(waterpressureInterpolationModel, surface2.WaterpressureInterpolationModel); + Assert.AreEqual(soil2.Name, surface2.Name); + Assert.AreEqual(layerWithSoil2.IsAquifer, surface2.IsAquifer); + Assert.AreEqual(layerWithSoil2.WaterPressureInterpolationModel, surface2.WaterpressureInterpolationModel); + SoilLayer2D surface3 = profile.Surfaces.ElementAt(2); + Assert.AreSame(soil3, surface3.Soil); + Assert.AreEqual(soil3.Name, surface3.Name); + Assert.AreEqual(layerWithSoil3.IsAquifer, surface3.IsAquifer); + Assert.AreEqual(layerWithSoil3.WaterPressureInterpolationModel, surface3.WaterpressureInterpolationModel); + + SoilLayer2D surface4 = profile.Surfaces.ElementAt(3); + Assert.AreSame(soil4, surface4.Soil); + Assert.AreEqual(soil4.Name, surface4.Name); + Assert.AreEqual(layerWithSoil4.IsAquifer, surface4.IsAquifer); + Assert.AreEqual(layerWithSoil4.WaterPressureInterpolationModel, surface4.WaterpressureInterpolationModel); + var outerLoopPoint1 = new WtiStabilityPoint2D(0, 0); var outerLoopPoint2 = new WtiStabilityPoint2D(0, 3); var outerLoopPoint3 = new WtiStabilityPoint2D(10, 3); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj =================================================================== diff -u -r72b12726b73e7e011bed836163635b64220c23f1 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 72b12726b73e7e011bed836163635b64220c23f1) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -85,6 +85,8 @@ + + @@ -93,7 +95,6 @@ - Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs =================================================================== diff -u -rf2838b78c54529e9b15208b44de854f7760e350f -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs (.../TestSoilProfileTest.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Input/TestSoilProfileTest.cs (.../TestSoilProfileTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -40,7 +40,7 @@ Assert.AreEqual(1, profile.Layers.Count()); SoilLayer layer = profile.Layers.First(); CollectionAssert.IsEmpty(layer.OuterRing); - CollectionAssert.IsEmpty(layer.Holes); + CollectionAssert.IsEmpty(layer.NestedLayers); CollectionAssert.IsEmpty(profile.PreconsolidationStresses); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Input/WaternetCalculatorInputTestFactoryTest.cs =================================================================== diff -u -r7869115120e7341826283ec22afdf03634d13775 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Input/WaternetCalculatorInputTestFactoryTest.cs (.../WaternetCalculatorInputTestFactoryTest.cs) (revision 7869115120e7341826283ec22afdf03634d13775) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Calculators/Waternet/Input/WaternetCalculatorInputTestFactoryTest.cs (.../WaternetCalculatorInputTestFactoryTest.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -106,7 +106,7 @@ surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, layer.OuterRing); - CollectionAssert.IsEmpty(layer.Holes); + CollectionAssert.IsEmpty(layer.NestedLayers); } CollectionAssert.AreEqual(new[] Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs =================================================================== diff -u -rf2838b78c54529e9b15208b44de854f7760e350f -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs (.../TestSoilProfile.cs) (revision f2838b78c54529e9b15208b44de854f7760e350f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Input/TestSoilProfile.cs (.../TestSoilProfile.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Linq; using Core.Common.Base.Geometry; using Ringtoets.MacroStabilityInwards.KernelWrapper.Calculators.Input; @@ -34,7 +35,7 @@ /// public TestSoilProfile() : base(new[] { - new SoilLayer(new Point2D[0], new Point2D[0][], new SoilLayer.ConstructionProperties()) + new SoilLayer(new Point2D[0], new SoilLayer.ConstructionProperties(), Enumerable.Empty()) }, new PreconsolidationStress[0]) {} } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Waternet/Input/WaternetCalculatorInputTestFactory.cs =================================================================== diff -u -r38b96b5fe034945cfa33600ec134e21507b40922 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Waternet/Input/WaternetCalculatorInputTestFactory.cs (.../WaternetCalculatorInputTestFactory.cs) (revision 38b96b5fe034945cfa33600ec134e21507b40922) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Calculators/Waternet/Input/WaternetCalculatorInputTestFactory.cs (.../WaternetCalculatorInputTestFactory.cs) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -93,35 +93,35 @@ surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()), + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), new SoilLayer.ConstructionProperties { IsAquifer = true - }), + }, + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()), + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()), new SoilLayer( new[] { surfaceLine.LocalGeometry.First(), surfaceLine.LocalGeometry.Last() }, - Enumerable.Empty(), - new SoilLayer.ConstructionProperties()) + new SoilLayer.ConstructionProperties(), + Enumerable.Empty()) }, new[] { new PreconsolidationStress(new Point2D(0, 0), 1.1) Fisheye: Tag 66894d34e58e0db658fa3183df8792ed244ccda3 refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/MacroStabilityInwardsSoilProfile2DLayerHelperTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj =================================================================== diff -u -rbcc66e2160dd443e08145f036176875f0fc87b62 -r66894d34e58e0db658fa3183df8792ed244ccda3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.Test.csproj) (revision bcc66e2160dd443e08145f036176875f0fc87b62) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Primitives.Test/Ringtoets.MacroStabilityInwards.Primitives.Test.csproj (.../Ringtoets.MacroStabilityInwards.Primitives.Test.csproj) (revision 66894d34e58e0db658fa3183df8792ed244ccda3) @@ -55,7 +55,6 @@ -