Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs =================================================================== diff -u -r5290 -r5325 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5290) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5325) @@ -152,7 +152,7 @@ ThrowWhenPlLinesIsNull(plLines); ThrowWhenSoilProfileIsNull(soilProfile); - DetermineLayerBoundaryPoints(LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquiferCoordinates, out _); + DetermineAquiferLayerBoundaryPoints(LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquiferCoordinates, out _); if (bottomAquiferCoordinates == null) { throw new NoNullAllowedException(string.Format(Resources.NoBottomAquiferLayer, soilProfile.Name)); @@ -275,7 +275,7 @@ waternet.HeadLineList.Add(headLine); for (var i = 0; i < inBetweenAquiferCount; i++) { - DetermineLayerBoundaryPoints(LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] inBetweenAquiferUpperCoordinates, out Point2D[] inBetweenAquiferLowerCoordinates, i); + DetermineAquiferLayerBoundaryPoints(LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] inBetweenAquiferUpperCoordinates, out Point2D[] inBetweenAquiferLowerCoordinates, i); if (inBetweenAquiferUpperCoordinates.Any() && inBetweenAquiferLowerCoordinates.Any()) { @@ -357,14 +357,15 @@ /// - For BottomLayerInBetweenAquiferCluster, it will return the bottom boundary of the in-between aquifer (= waternet line for PL4) /// - For LayerType = HighestAquifer, it will return the top boundary of the highest aquifer (= waternet line for PL1 for "Hydrostatic" waternet) /// - For LayerType = LowestLayer, it will return the bottom boundary of the lowest layer (= waternet line for PL1 for "Full hydrostatic" waternet) + /// When the aquifer is not continuous, null top and bottom boundaries are returned /// /// The type of layer boundary. /// The soil profile 2D. /// All the points of the layer top boundary. /// All the points of the layer bottom boundary. /// In case of several in-between aquifers, the index of the in-between aquifer must be specified. /// All the points of the layer boundary. - internal static void DetermineLayerBoundaryPoints(LayerType layerType, SoilProfile2D soilProfile, out Point2D[] layerBoundaryTop, out Point2D[] layerBoundaryBottom, int indexInBetweenAquifer = -1) + internal static void DetermineAquiferLayerBoundaryPoints(LayerType layerType, SoilProfile2D soilProfile, out Point2D[] layerBoundaryTop, out Point2D[] layerBoundaryBottom, int indexInBetweenAquifer = -1) { double[] xCoordinates = DetermineAllXCoordinatesOfSoilProfile(soilProfile); var xCoordinatesAll = new List(); @@ -390,7 +391,7 @@ SoilProfile1D crossSection = soilProfile.GetSoilProfile1D(xCoordinate); // Determine if the cluster of layers is in range of the previous cluster of layers. - // If not, return empty coordinates, because the cluster of layer is interrupted. + // If not, return empty coordinates, because the cluster of layers is interrupted. double currentAquiferTop = GetLevel(layerType, BoundaryType.Top, crossSection, indexInBetweenAquifer); double currentAquiferBottom = GetLevel(layerType, BoundaryType.Bottom, crossSection, indexInBetweenAquifer); @@ -540,7 +541,7 @@ } case IntrusionVerticalWaterPressureType.HydroStatic: { - DetermineLayerBoundaryPoints(LayerType.HighestAquiferCluster, soilProfile2D, out Point2D[] highestAquiferCoordinates, out _); + DetermineAquiferLayerBoundaryPoints(LayerType.HighestAquiferCluster, soilProfile2D, out Point2D[] highestAquiferCoordinates, out _); return CreateWaternetLine(highestAquiferCoordinates); } case IntrusionVerticalWaterPressureType.Linear: @@ -550,7 +551,7 @@ } case IntrusionVerticalWaterPressureType.FullHydroStatic: { - DetermineLayerBoundaryPoints(LayerType.LowestLayer, soilProfile2D, out _, out Point2D[] lowestBoundaryCoordinates); + DetermineAquiferLayerBoundaryPoints(LayerType.LowestLayer, soilProfile2D, out _, out Point2D[] lowestBoundaryCoordinates); return CreateWaternetLine(lowestBoundaryCoordinates); } case null: Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile1DTests.cs =================================================================== diff -u -r5290 -r5325 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile1DTests.cs (.../SoilProfile1DTests.cs) (revision 5290) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile1DTests.cs (.../SoilProfile1DTests.cs) (revision 5325) @@ -38,7 +38,8 @@ [Test] public void GivenASoilProfile1D_WhenGettingTheAquifersPosition_ThenExpectedPositionsAreReturned() { - // 3 layers with aquifer, aquitard, aquifer => no in-between aquifer and bottom aquifer is layer 3 + // 3 layers with aquifer, aquitard, aquifer => no in-between aquifer, bottom aquifer is layer 3 and highest aquifer + // is also layer 3 because the other aquifer (layer 1) is the top layer so no relevant for the waternet. SoilProfile1D soilProfile1D = CreateProfileWith3Layers(true, false, true); Assert.Multiple(() => { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs =================================================================== diff -u -r5298 -r5325 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 5298) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 5325) @@ -610,8 +610,8 @@ SoilProfile2D soilProfile, IEnumerable expectedBottomAquiferCoordinates) { // Call - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquifer, out _); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.HighestAquiferCluster, soilProfile, out Point2D[] highestAquifer, out _); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquifer, out _); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.HighestAquiferCluster, soilProfile, out Point2D[] highestAquifer, out _); // Assert AssertGeometry(bottomAquifer, expectedBottomAquiferCoordinates); @@ -690,8 +690,8 @@ soilProfile.Geometry.Surfaces.Add(new GeometrySurface()); // Call - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquifer, out _); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.HighestAquiferCluster, soilProfile, out Point2D[] highestAquifer, out _); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.BottomAquiferCluster, soilProfile, out Point2D[] bottomAquifer, out _); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.HighestAquiferCluster, soilProfile, out Point2D[] highestAquifer, out _); // Assert var expectedBottomAquiferCoordinates = new[] @@ -747,7 +747,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() => @@ -808,7 +808,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() => @@ -900,7 +900,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() => @@ -992,7 +992,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() => @@ -1110,7 +1110,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() => @@ -1228,7 +1228,7 @@ // Call bool isInBetweenLayerPresent = PlLinesToWaternetConverter.AreInBetweenAquiferClustersPresent(soilProfile, out int count); - PlLinesToWaternetConverter.DetermineLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); + PlLinesToWaternetConverter.DetermineAquiferLayerBoundaryPoints(PlLinesToWaternetConverter.LayerType.InBetweenAquiferCluster, soilProfile, out Point2D[] topLevelInBetweenAquifer, out Point2D[] bottomLevelInBetweenAquifer, 0); // Assert Assert.Multiple(() =>