Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs =================================================================== diff -u -r4967 -r4970 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 4967) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 4970) @@ -88,7 +88,7 @@ if (headLine != null && !IsBelowSoilProfile(soilProfile1D, plLine)) { waternet.HeadLineList.Add(headLine); - if (soilProfile1D.BottomAquiferLayer != null && pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent) + if (soilProfile1D.BottomAquiferLayer != null && pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent && penetrationLength > 0) { double level = soilProfile1D.BottomAquiferLayer.TopLevel + penetrationLength; WaternetLine waternetLine = CreateWaternetLine(level, xLeft, xRight); @@ -156,7 +156,7 @@ var headLine = CreateLine(plLine, headLine2Name); waternet.HeadLineList.Add(headLine); - if (bottomAquiferCoordinates.Any() && pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent) + if (bottomAquiferCoordinates.Any() && pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent && penetrationLength > 0) { WaternetLine waternetLine = CreateWaternetLine(bottomAquiferCoordinates, penetrationLength); waternetLine.Name = waternetLine2Name; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs =================================================================== diff -u -r4967 -r4970 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 4967) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 4970) @@ -463,8 +463,9 @@ [TestCase(IntrusionVerticalWaterPressureType.Linear, 0, 3)] [TestCase(IntrusionVerticalWaterPressureType.HydroStatic, -9.999, 3)] [TestCase(IntrusionVerticalWaterPressureType.FullHydroStatic, -30.000, 1)] - [TestCase(IntrusionVerticalWaterPressureType.SemiTimeDependent, -9.999, 4)] - public void CreateWaternetBasedOnPlLines_ValidPLLinesAndSoilProfile2DWithContinuousInBetweenAquiferLayerConsistOfOnePart_ReturnsExpectedWaternet(IntrusionVerticalWaterPressureType? pressureType, double levelWaternetPl1, int waternetLineCount) + [TestCase(IntrusionVerticalWaterPressureType.SemiTimeDependent, -9.999, 4, penetrationLength)] + [TestCase(IntrusionVerticalWaterPressureType.SemiTimeDependent, -9.999, 3, 0)] + public void CreateWaternetBasedOnPlLines_ValidPLLinesAndSoilProfile2DWithContinuousInBetweenAquiferLayerConsistOfOnePart_ReturnsExpectedWaternet(IntrusionVerticalWaterPressureType? pressureType, double levelWaternetPl1, int waternetLineCount, double penetrationZone = double.NaN) { // Setup SoilLayer2D soilLayer = CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, false); @@ -489,7 +490,7 @@ PlLines plLines = CreateAllPlLines(); // Call - Waternet waternet = PlLinesToWaternetConverter.CreateWaternetBasedOnPlLines(plLines, soilProfile, penetrationLength, pressureType); + Waternet waternet = PlLinesToWaternetConverter.CreateWaternetBasedOnPlLines(plLines, soilProfile, penetrationZone, pressureType); // Assert AssertGeometry(plLines.Lines[PlLineType.Pl1].Points, waternet.PhreaticLine.Points); @@ -519,7 +520,7 @@ ]; WaternetLine pl2WaternetLine = waternet.WaternetLineList.Find(w => w.HeadLine.Name == "Head line 2 (PL 2)"); - if (pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent) + if (pressureType == IntrusionVerticalWaterPressureType.SemiTimeDependent && penetrationZone > 0) { Assert.That(pl2WaternetLine.HeadLine, Is.SameAs(waternet.HeadLineList[0])); GeometryPoint[] offSetAquiferCoordinates = expectedBottomAquiferCoordinates.Select(aquiferCoordinate => new GeometryPoint(aquiferCoordinate.X, aquiferCoordinate.Z + penetrationLength))