Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs =================================================================== diff -u -r7057 -r7059 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 7057) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 7059) @@ -621,9 +621,9 @@ var soil2 = new Soil("Soil2", 13, 14); var soil3 = new Soil("Soil3", 13.1, 14.1); - SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, -20, -50, 50, soilProfile2D, soil1); - SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(0, -10, -30, -10, soilProfile2D, soil2); - SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(0, -10, 10, 40, soilProfile2D, soil3); + SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, -20, -50, 50, soilProfile2D, soil1, false, false); + SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(0, -10, -30, -10, soilProfile2D, soil2, false, false); + SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(0, -10, 10, 40, soilProfile2D, soil3, false, false); soilProfile2D.Surfaces.Add(soilLayer1); soilProfile2D.Surfaces.Add(soilLayer2); @@ -666,9 +666,9 @@ var soil2 = new Soil("Soil2", 13, 14); var soil3 = new Soil("Soil3", 13.1, 14.1); - SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, -20, -50, 50, soilProfile2D, soil1); - SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(0, -10, -40, 0, soilProfile2D, soil2); - SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(0, -10, 0, 40, soilProfile2D, soil3); + SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, -20, -50, 50, soilProfile2D, soil1, false, false); + SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(0, -10, -40, 0, soilProfile2D, soil2, false, false); + SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(0, -10, 0, 40, soilProfile2D, soil3, false, false); soilProfile2D.Geometry.GetPointAtLocation(new Point2D(-40, 0)).X = -30; soilProfile2D.Geometry.GetPointAtLocation(new Point2D(40, 0)).X = 30; @@ -701,7 +701,7 @@ public static SoilProfile2D CreateSoilProfile2DWithSixSurfacesFormingTwoLayers(double xLeft = -50) { var soilProfile2D = new SoilProfile2D(); - var soil1 = new Soil("Soil1"); + var soil1 = new Soil("Soil1"); CreateRectangularSoilLayer2D(10, 0, xLeft, xLeft + 30, soilProfile2D, soil1); var soil2 = new Soil("Soil2"); CreatePentagonSoilLayer2D(new Point2D(xLeft + 30, 10), new Point2D(xLeft + 50, 10), new Point2D(xLeft + 50, 0), new Point2D(xLeft + 40, 0), new Point2D(xLeft + 30, 0), soilProfile2D, soil2); @@ -710,7 +710,7 @@ var soil4 = new Soil("Soil4"); CreatePentagonSoilLayer2D(new Point2D(xLeft, 0), new Point2D(xLeft + 30, 0), new Point2D(xLeft + 40, 0), new Point2D(xLeft + 40, -15), new Point2D(xLeft, -15), soilProfile2D, soil4); var soil5 = new Soil("Soil5"); - CreatePentagonSoilLayer2D(new Point2D(xLeft + 40, 0), new Point2D(xLeft + 50, 0), new Point2D(xLeft + 85, 0), new Point2D(xLeft + 85, -15), new Point2D(xLeft + 40, -15), soilProfile2D, soil5); + CreatePentagonSoilLayer2D(new Point2D(xLeft + 40, 0), new Point2D(xLeft + 50, 0), new Point2D(xLeft + 85, 0), new Point2D(xLeft + 85, -15), new Point2D(xLeft + 40, -15), soilProfile2D, soil5); var soil6 = new Soil("Soil6"); CreateRectangularSoilLayer2D(0, -15, xLeft + 85, xLeft + 110, soilProfile2D, soil6, true); @@ -964,13 +964,13 @@ } public static SoilLayer2D CreateRectangularSoilLayer2D(double topCoord, double bottomCoord, double leftCoord, - double rightCoord, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) + double rightCoord, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false, bool addLayerAsSurface = true) { var topLeftPoint = new Point2D(leftCoord, topCoord); var topRightPoint = new Point2D(rightCoord, topCoord); var bottomRightPoint = new Point2D(rightCoord, bottomCoord); var bottomLeftPoint = new Point2D(leftCoord, bottomCoord); - return CreatePolygonSoilLayer2D([topLeftPoint, topRightPoint, bottomRightPoint, bottomLeftPoint], soil, soilProfile2D, isAquifer); + return CreatePolygonSoilLayer2D([topLeftPoint, topRightPoint, bottomRightPoint, bottomLeftPoint], soil, soilProfile2D, isAquifer, addLayerAsSurface); } public static SoilLayer2D CreateTriangularSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) @@ -1009,7 +1009,7 @@ ], soil, soilProfile2D, isAquifer); } - public static SoilLayer2D CreatePolygonSoilLayer2D(List points, Soil soil, SoilProfile2D soilProfile2D, bool isAquifer = false) + public static SoilLayer2D CreatePolygonSoilLayer2D(List points, Soil soil, SoilProfile2D soilProfile2D, bool isAquifer = false, bool addLayerAsSurface = true) { var soilLayer2D = new SoilLayer2D { @@ -1043,10 +1043,13 @@ AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve); } - soilProfile2D.Surfaces.Add(soilLayer2D); - soilProfile2D.Geometry.Loops.Add(soilLayer2D.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer2D.GeometrySurface); - soilProfile2D.Geometry.Rebox(); + if (addLayerAsSurface) + { + soilProfile2D.Surfaces.Add(soilLayer2D); + soilProfile2D.Geometry.Loops.Add(soilLayer2D.GeometrySurface.OuterLoop); + soilProfile2D.Geometry.Surfaces.Add(soilLayer2D.GeometrySurface); + soilProfile2D.Geometry.Rebox(); + } } return soilLayer2D; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs =================================================================== diff -u -r7057 -r7059 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs (.../SoilProfile2DHelperTests.cs) (revision 7057) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs (.../SoilProfile2DHelperTests.cs) (revision 7059) @@ -854,9 +854,9 @@ Bottom = -20 } }; - SoilLayer2D soilUpperLayer = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, soilProfileFullAdjoin); - SoilLayer2D soilBottomLayerAquiferPartLeft = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, middleXCoordinate, soilProfileFullAdjoin, null, true); - SoilLayer2D soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, middleXCoordinate, rightCoordinate, soilProfileFullAdjoin, null, true); + SoilLayer2D soilUpperLayer = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, soilProfileFullAdjoin, null, false, false); + SoilLayer2D soilBottomLayerAquiferPartLeft = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, middleXCoordinate, soilProfileFullAdjoin, null, true, false); + SoilLayer2D soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, middleXCoordinate, rightCoordinate, soilProfileFullAdjoin, null, true, false); soilProfileFullAdjoin.Surfaces.Add(soilUpperLayer); soilProfileFullAdjoin.Surfaces.Add(soilBottomLayerAquiferPartLeft); @@ -886,7 +886,7 @@ Bottom = -20 } }; - SoilLayer2D soilBottomLayerAquifer = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, rightCoordinate, soilProfileOneBottomAquiferLayer, null, true); + SoilLayer2D soilBottomLayerAquifer = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, rightCoordinate, soilProfileOneBottomAquiferLayer, null, true, false); soilProfileOneBottomAquiferLayer.Surfaces.Add(soilUpperLayer); soilProfileOneBottomAquiferLayer.Surfaces.Add(soilBottomLayerAquifer); soilProfileOneBottomAquiferLayer.Geometry.Surfaces.Add(new GeometrySurface()); @@ -913,7 +913,7 @@ Bottom = -20 } }; - soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-5, -15, middleXCoordinate, rightCoordinate, soilProfileRightSoilLayerBottomInRange, null, true); + soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-5, -15, middleXCoordinate, rightCoordinate, soilProfileRightSoilLayerBottomInRange, null, true, false); soilProfileRightSoilLayerBottomInRange.Surfaces.Add(soilUpperLayer); soilProfileRightSoilLayerBottomInRange.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightSoilLayerBottomInRange.Surfaces.Add(soilBottomLayerAquiferPartRight); @@ -944,7 +944,7 @@ Bottom = -25 } }; - soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-15, -25, middleXCoordinate, rightCoordinate, soilProfileRightSoilLayerTopInRange, null, true); + soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-15, -25, middleXCoordinate, rightCoordinate, soilProfileRightSoilLayerTopInRange, null, true, false); soilProfileRightSoilLayerTopInRange.Surfaces.Add(soilUpperLayer); soilProfileRightSoilLayerTopInRange.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightSoilLayerTopInRange.Surfaces.Add(soilBottomLayerAquiferPartRight); @@ -975,7 +975,7 @@ Bottom = -25 } }; - soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-5, -25, middleXCoordinate, rightCoordinate, soilProfileRightAquiferLayerFullyEnvelopsLeft, null, true); + soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-5, -25, middleXCoordinate, rightCoordinate, soilProfileRightAquiferLayerFullyEnvelopsLeft, null, true, false); soilProfileRightAquiferLayerFullyEnvelopsLeft.Surfaces.Add(soilUpperLayer); soilProfileRightAquiferLayerFullyEnvelopsLeft.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightAquiferLayerFullyEnvelopsLeft.Surfaces.Add(soilBottomLayerAquiferPartRight); @@ -1007,7 +1007,7 @@ Bottom = -20 } }; - soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-15, -17, middleXCoordinate, rightCoordinate, soilProfileRightAquiferLayerFullyEnvelopedByLeft, null, true); + soilBottomLayerAquiferPartRight = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-15, -17, middleXCoordinate, rightCoordinate, soilProfileRightAquiferLayerFullyEnvelopedByLeft, null, true, false); soilProfileRightAquiferLayerFullyEnvelopedByLeft.Surfaces.Add(soilUpperLayer); soilProfileRightAquiferLayerFullyEnvelopedByLeft.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightAquiferLayerFullyEnvelopedByLeft.Surfaces.Add(soilBottomLayerAquiferPartRight); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs =================================================================== diff -u -r6917 -r7059 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 6917) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 7059) @@ -899,21 +899,21 @@ }; // Setup - SoilLayer2D aquitard1 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(20, 10, leftCoordinate, rightCoordinate, soilProfile2D); - SoilLayer2D aquifer2A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, leftCoordinate, xA, soilProfile2D, null, true); - SoilLayer2D aquifer2B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, xA, xB, soilProfile2D, null, true); - SoilLayer2D aquifer2C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, xB, rightCoordinate, soilProfile2D, null, true); - SoilLayer2D aquitard3 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, soilProfile2D); - SoilLayer2D aquifer4A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, xA, soilProfile2D, null, true); - SoilLayer2D aquifer4B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, xA, xB, soilProfile2D, null, true); - SoilLayer2D aquifer4C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, xB, rightCoordinate, soilProfile2D, null, true); - SoilLayer2D aquitard5 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-20, -25, leftCoordinate, rightCoordinate, soilProfile2D); - SoilLayer2D aquifer6A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, leftCoordinate, xA, soilProfile2D, null, true); - SoilLayer2D aquifer6B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, xA, xB, soilProfile2D, null, true); - SoilLayer2D aquifer6C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, xB, rightCoordinate, soilProfile2D, null, true); - SoilLayer2D aquifer7A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, leftCoordinate, xA, soilProfile2D, null, true); - SoilLayer2D aquifer7B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, xA, xB, soilProfile2D, null, true); - SoilLayer2D aquifer7C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, xB, rightCoordinate, soilProfile2D, null, true); + SoilLayer2D aquitard1 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(20, 10, leftCoordinate, rightCoordinate, soilProfile2D, null, false, false); + SoilLayer2D aquifer2A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, leftCoordinate, xA, soilProfile2D, null, true, false); + SoilLayer2D aquifer2B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, xA, xB, soilProfile2D, null, true, false); + SoilLayer2D aquifer2C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(10, 0, xB, rightCoordinate, soilProfile2D, null, true, false); + SoilLayer2D aquitard3 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, soilProfile2D, null, false, false); + SoilLayer2D aquifer4A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, xA, soilProfile2D, null, true, false); + SoilLayer2D aquifer4B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, xA, xB, soilProfile2D, null, true, false); + SoilLayer2D aquifer4C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-10, -20, xB, rightCoordinate, soilProfile2D, null, true, false); + SoilLayer2D aquitard5 = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-20, -25, leftCoordinate, rightCoordinate, soilProfile2D, null, false, false); + SoilLayer2D aquifer6A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, leftCoordinate, xA, soilProfile2D, null, true, false); + SoilLayer2D aquifer6B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, xA, xB, soilProfile2D, null, true, false); + SoilLayer2D aquifer6C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-25, -30, xB, rightCoordinate, soilProfile2D, null, true, false); + SoilLayer2D aquifer7A = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, leftCoordinate, xA, soilProfile2D, null, true, false); + SoilLayer2D aquifer7B = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, xA, xB, soilProfile2D, null, true, false); + SoilLayer2D aquifer7C = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(-30, -35, xB, rightCoordinate, soilProfile2D, null, true, false); soilProfile2D.Surfaces.Add(aquitard1); soilProfile2D.Surfaces.Add(aquifer2A);