Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs =================================================================== diff -u -r7050 -r7057 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 7050) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 7057) @@ -457,7 +457,7 @@ soilProfile.BottomLevel = -10.0; return soilProfile; } - + /// /// Create two layer soil profile with pleistocene sand layer (no intermediate layer) /// @@ -502,7 +502,7 @@ return soilProfile; } - + /// /// Create a soil layer with the given top level and soil name /// @@ -700,48 +700,58 @@ /// public static SoilProfile2D CreateSoilProfile2DWithSixSurfacesFormingTwoLayers(double xLeft = -50) { - var soilProfile2D = new SoilProfile2D - { - Geometry = new GeometryData - { - Left = xLeft, - Right = xLeft + 110, - Bottom = -15 - } - }; - var soil1 = new Soil("Soil1"); - SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, 0, xLeft, xLeft + 30, soilProfile2D, soil1); + var soilProfile2D = new SoilProfile2D(); + var soil1 = new Soil("Soil1"); + CreateRectangularSoilLayer2D(10, 0, xLeft, xLeft + 30, soilProfile2D, soil1); var soil2 = new Soil("Soil2"); - SoilLayer2D soilLayer2 = 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); + 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); var soil3 = new Soil("Soil3"); - SoilLayer2D soilLayer3 = CreatePentagonSoilLayer2D(new Point2D(xLeft + 50, 10), new Point2D(xLeft + 110, 10), new Point2D(xLeft + 110, 0), new Point2D(xLeft + 85, 0), new Point2D(xLeft + 50, 0), soilProfile2D, soil3); + CreatePentagonSoilLayer2D(new Point2D(xLeft + 50, 10), new Point2D(xLeft + 110, 10), new Point2D(xLeft + 110, 0), new Point2D(xLeft + 85, 0), new Point2D(xLeft + 50, 0), soilProfile2D, soil3); var soil4 = new Soil("Soil4"); - SoilLayer2D soilLayer4 = 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); + 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"); - SoilLayer2D soilLayer5 = 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"); - SoilLayer2D soilLayer6 = CreateRectangularSoilLayer2D(0, -15, xLeft + 85, xLeft + 110, soilProfile2D, soil6, true); + CreateRectangularSoilLayer2D(0, -15, xLeft + 85, xLeft + 110, soilProfile2D, soil6, true); - soilProfile2D.Surfaces.Add(soilLayer1); - soilProfile2D.Surfaces.Add(soilLayer2); - soilProfile2D.Surfaces.Add(soilLayer3); - soilProfile2D.Surfaces.Add(soilLayer4); - soilProfile2D.Surfaces.Add(soilLayer5); - soilProfile2D.Surfaces.Add(soilLayer6); + return soilProfile2D; + } - soilProfile2D.Geometry.Loops.Add(soilLayer1.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer1.GeometrySurface); - soilProfile2D.Geometry.Loops.Add(soilLayer2.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer2.GeometrySurface); - soilProfile2D.Geometry.Loops.Add(soilLayer3.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer3.GeometrySurface); - soilProfile2D.Geometry.Loops.Add(soilLayer4.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer4.GeometrySurface); - soilProfile2D.Geometry.Loops.Add(soilLayer5.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer5.GeometrySurface); - soilProfile2D.Geometry.Loops.Add(soilLayer6.GeometrySurface.OuterLoop); - soilProfile2D.Geometry.Surfaces.Add(soilLayer6.GeometrySurface); + /// + /// w1 = width of the lowest slope + /// w2 = width of the highest slope + /// + /// X=-10 X=0 X=w1 X=w1+w2 X=10 + /// _____________________________ Level -4.05 + /// / | + /// / surface 1 | + /// / | + /// /-------------------------------| Level -4.15 + /// / | + /// / | + /// / surface 2 | + /// |----------------/ | Level -4.25 + /// | | + /// |----------------------------------------------------| Level -5.00 + /// + /// + public static SoilProfile2D CreateSoilProfile2DWithSteepOrShallowSlopeInTwoParts(double widthLowestSlope, double widthHighestSlope) + { + var soilProfile2D = new SoilProfile2D(); + var point1 = new Point2D(-10, -4.25); + var point2 = new Point2D(0, -4.25); + var point3 = new Point2D(widthLowestSlope, -4.15); + var point4 = new Point2D(widthLowestSlope + widthHighestSlope, -4.05); + var point5 = new Point2D(10, -4.05); + var point6 = new Point2D(10, -4.15); + var point7 = new Point2D(10, -5); + var point8 = new Point2D(-10, -5); + var soil1 = new Soil("Surface 1"); + CreatePolygonSoilLayer2D([point3, point4, point5, point6], soil1, soilProfile2D); + var soil2 = new Soil("Surface 2"); + CreatePolygonSoilLayer2D([point1, point2, point3, point6, point7, point8], soil2, soilProfile2D); + return soilProfile2D; } @@ -807,6 +817,30 @@ return soilProfile2D; } + /// + /// -50 0 50 + /// |---------------------------------| Level 10 m + /// | surface 1 | + /// |_________________________________| Level 0 m + /// | surface 2 | + /// |-----------------|---------------| Level -10 m + /// | surface 3 | + /// |_________________________________| Level -20 m + /// + public static SoilProfile2D CreateSoilProfile2DWithHole() + { + var soilProfile2D = new SoilProfile2D(); + var soil1 = new Soil("Soil 1"); + var soil2 = new Soil("Soil 2"); + var soil3 = new Soil("Soil 3"); + + CreateRectangularSoilLayer2D(10, 0, -50, 50, soilProfile2D, soil1); + CreateRectangularSoilLayer2D(0, -10, -50, 0, soilProfile2D, soil2); + CreateRectangularSoilLayer2D(-10, -20, -50, 50, soilProfile2D, soil3); + + return soilProfile2D; + } + public static SoilProfile1D CreateSoilProfile1DWithTwoClustersOfInBetweenAquifers(out SurfaceLine2 surfaceLine) { const double topLevel = 1.212; @@ -895,7 +929,7 @@ return soilProfile1D; } - + /// /// /------\ /// / \ @@ -917,11 +951,11 @@ public static SoilProfile2D CreateSoilProfile2DWithNonHorizontalBottomAquitard(out SurfaceLine2 surfaceLine) { const double almostEqual = 1e-09; - + surfaceLine = FactoryForSurfaceLines.CreateSurfaceLineDike(10); SoilProfile1D soilProfile1D = CreateClaySandClaySandClaySandProfile(10, 6, 2, -2, -4, -6); soilProfile1D.BottomLevel = -10; - SoilProfile2D soilProfile2D = FactoryForSoilProfiles.CreateSoilProfile2DBasedOnSoilProfile1D(soilProfile1D, surfaceLine); + SoilProfile2D soilProfile2D = CreateSoilProfile2DBasedOnSoilProfile1D(soilProfile1D, surfaceLine); Point2D point1 = soilProfile2D.Geometry.Points.First(p => Math.Abs(p.X - 34.5) < almostEqual && Math.Abs(p.Z + 4) < almostEqual); point1.Z = -3; Point2D point2 = soilProfile2D.Geometry.Points.First(p => Math.Abs(p.X - 40.5) < almostEqual && Math.Abs(p.Z + 4) < almostEqual); @@ -936,116 +970,46 @@ var topRightPoint = new Point2D(rightCoord, topCoord); var bottomRightPoint = new Point2D(rightCoord, bottomCoord); var bottomLeftPoint = new Point2D(leftCoord, bottomCoord); - var curve1 = new GeometryCurve(topLeftPoint, topRightPoint); - var curve2 = new GeometryCurve(topRightPoint, bottomRightPoint); - var curve3 = new GeometryCurve(bottomRightPoint, bottomLeftPoint); - var curve4 = new GeometryCurve(bottomLeftPoint, topLeftPoint); - - if (soilProfile2D != null) - { - AddPointIfNotYetPresentInGeometry(soilProfile2D, topLeftPoint); - AddPointIfNotYetPresentInGeometry(soilProfile2D, topRightPoint); - AddPointIfNotYetPresentInGeometry(soilProfile2D, bottomRightPoint); - AddPointIfNotYetPresentInGeometry(soilProfile2D, bottomLeftPoint); - AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve1); - AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve2); - AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve3); - AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve4); - } - - var soilLayer2D = new SoilLayer2D - { - GeometrySurface = new GeometrySurface - { - OuterLoop = new GeometryLoop - { - CurveList = - { - curve1, - curve2, - curve3, - curve4 - } - } - }, - Soil = soil, - IsAquifer = isAquifer - }; - return soilLayer2D; + return CreatePolygonSoilLayer2D([topLeftPoint, topRightPoint, bottomRightPoint, bottomLeftPoint], soil, soilProfile2D, isAquifer); } public static SoilLayer2D CreateTriangularSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) { - return CreatePolygoneSoilLayer2D([ - ..new[] - { - point1, - point2, - point3 - } + return CreatePolygonSoilLayer2D([ + point1, point2, point3 ], soil, soilProfile2D, isAquifer); } public static SoilLayer2D CreateQuadrilateralSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, Point2D point4, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) { - return CreatePolygoneSoilLayer2D([ - ..new[] - { - point1, - point2, - point3, - point4 - } + return CreatePolygonSoilLayer2D([ + point1, point2, point3, point4 ], soil, soilProfile2D, isAquifer); } public static SoilLayer2D CreatePentagonSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, Point2D point4, Point2D point5, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) { - return CreatePolygoneSoilLayer2D([ - ..new[] - { - point1, - point2, - point3, - point4, - point5 - } + return CreatePolygonSoilLayer2D([ + point1, point2, point3, point4, point5 ], soil, soilProfile2D, isAquifer); } public static SoilLayer2D CreateHexagonSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, Point2D point4, Point2D point5, Point2D point6, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) { - return CreatePolygoneSoilLayer2D([ - ..new[] - { - point1, - point2, - point3, - point4, - point5, - point6 - } + return CreatePolygonSoilLayer2D([ + point1, point2, point3, point4, point5, point6 ], soil, soilProfile2D, isAquifer); } public static SoilLayer2D CreateHeptagonSoilLayer2D(Point2D point1, Point2D point2, Point2D point3, Point2D point4, Point2D point5, Point2D point6, Point2D point7, SoilProfile2D soilProfile2D, Soil soil = null, bool isAquifer = false) { - return CreatePolygoneSoilLayer2D([ - ..new[] - { - point1, - point2, - point3, - point4, - point5, - point6, - point7 - } + return CreatePolygonSoilLayer2D([ + point1, point2, point3, point4, point5, point6, point7 ], soil, soilProfile2D, isAquifer); } - public static SoilLayer2D CreatePolygoneSoilLayer2D(List points, Soil soil, SoilProfile2D soilProfile2D, bool isAquifer = false) + public static SoilLayer2D CreatePolygonSoilLayer2D(List points, Soil soil, SoilProfile2D soilProfile2D, bool isAquifer = false) { var soilLayer2D = new SoilLayer2D { @@ -1078,6 +1042,11 @@ { AddCurveIfNotYetPresentInGeometry(soilProfile2D, curve); } + + 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.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r7054 -r7057 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 7054) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 7057) @@ -146,6 +146,9 @@ Always + + Always + Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs =================================================================== diff -u -r7049 -r7057 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs (.../SoilProfile2DSurfaceLineHelperTests.cs) (revision 7049) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs (.../SoilProfile2DSurfaceLineHelperTests.cs) (revision 7057) @@ -128,7 +128,7 @@ GivenZigZagSurfaceLine = FactoryForSurfaceLines.CreateSurfaceLineInZigZag(-50, 13), ExpectedSurfaceCount = 9, // 3 extra surfaces created: 1 below the "zigzag" surface line + 2 on the left side (between Z=60 and 70) - ExpectedFilling1 = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + ExpectedFilling1 = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ new Point2D(-50, 13), new Point2D(-30, 15), new Point2D(10, 11), new Point2D(50, 15), new Point2D(70, 13), new Point2D(70, 10), new Point2D(60, 10), new Point2D(0, 10), new Point2D(-20, 10), new Point2D(-50, 10) ], soilFilling, newSoilProfile2D), ExpectedFilling2 = null, @@ -501,7 +501,7 @@ 7 => FactoryForSoilProfiles.CreatePentagonSoilLayer2D(new Point2D(-10, 0), new Point2D(0, 0), new Point2D(35, 0), new Point2D(35, -15), new Point2D(-10, -15), newSoilProfile2D, soil5), _ => null }; - SoilLayer2D expectedSurfaceFilling = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D expectedSurfaceFilling = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ new Point2D(-50, 11), surfaceLine.CharacteristicPoints[1].Point, surfaceLine.CharacteristicPoints[2].Point, surfaceLine.CharacteristicPoints[3].Point, new Point2D(xEndSurfaceLine, 11), new Point2D(xEndSurfaceLine, 10), new Point2D(0, 10), new Point2D(-20, 10), new Point2D(-50, 10) ], defaultSoil, newSoilProfile2D); CheckSoilProfileContainsSoilLayer(newSoilProfile2D, expectedSurface1); @@ -520,6 +520,57 @@ } /// + /// This test reflects the problem found in MWDAM-3279 when creating a new soil profile with a surface line very close to the + /// original surface line from the soil profile. + /// + [Test] + [TestCase(1, 2, 2)] + [TestCase(0.1, 0.2, 2)] + [TestCase(0.01, 0.02, 2)] + [TestCase(0.007, 0.008, 1)] + [TestCase(0.001, 0.002, 1)] + public void GivenSoilProfile2DWithSteepOrShallowSlopeInTwoPartsAndSurfaceLineCrossingTheSlope_WhenCombiningWithSurfaceLine_ThenExpectedNewSoilProfile2DCreated(double widthLowestSlope, double widthHighestSlope,int expectedLayerCount) + { + // Given + SoilProfile2D soilProfile2D = FactoryForSoilProfiles.CreateSoilProfile2DWithSteepOrShallowSlopeInTwoParts(widthLowestSlope, widthHighestSlope); + var defaultSoil = new Soil("Filling material"); + GeometryPointString originalSurfaceLine = soilProfile2D.Geometry.SurfaceLine; + var surfaceLine = new SurfaceLine2(); + surfaceLine.Geometry.Points.Add(originalSurfaceLine.Points[0]); + surfaceLine.Geometry.Points.Add(originalSurfaceLine.Points[1]); + surfaceLine.Geometry.Points.Add(originalSurfaceLine.Points[3]); + surfaceLine.Geometry.Points.Add(originalSurfaceLine.Points[4]); + + // When + SoilProfile2D newSoilProfile2D = SoilProfile2DSurfaceLineHelper.CombineSurfaceLineWithSoilProfile2D( + surfaceLine.Geometry, soilProfile2D, defaultSoil); + + // Then + Assert.That(newSoilProfile2D, Is.Not.Null); + Assert.That(newSoilProfile2D.Surfaces, Has.Count.EqualTo(expectedLayerCount)); + var lineNewSurfaceLine = new Line(surfaceLine.Geometry.Points[1], surfaceLine.Geometry.Points[2]); + var lineSurfaceSeparation = new Line(new Point2D(widthLowestSlope, -4.15), new Point2D(10, -4.15)); + var intersectionPoint = new Point2D(); + Assert.That(LineHelper.DetermineStrictIntersectionPoint(lineNewSurfaceLine, lineSurfaceSeparation, ref intersectionPoint), Is.True); + + if (expectedLayerCount == 2) + { + var soil1 = new Soil("Surface 1"); + var soil2 = new Soil("Surface 2"); + SoilLayer2D expectedSurface1 = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([intersectionPoint, new Point2D(widthLowestSlope + widthHighestSlope, -4.05), new Point2D(10, -4.05), new Point2D(10, -4.15)], soil1, null); + SoilLayer2D expectedSurface2 = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([new Point2D(-10, -4.25), new Point2D(0, -4.25), intersectionPoint, new Point2D(10, -4.15), new Point2D(10, -5), new Point2D(-10, -5)], soil2, null); + CheckSoilProfileContainsSoilLayer(newSoilProfile2D, expectedSurface1); + CheckSoilProfileContainsSoilLayer(newSoilProfile2D, expectedSurface2); + } + + if (expectedLayerCount == 1) + { + // When the surface line is too close to the original surface line, the top surface is not generated. + CheckSoilProfileContainsSoilLayer(newSoilProfile2D, soilProfile2D.Surfaces[1]); + } + } + + /// /// Test case class for GivenSoilProfile2DWhenCombiningWithSurfaceLineThenCorrectNewSoilProfile2DIsCreated() /// public class TestCaseSurfaceLine Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs =================================================================== diff -u -r7055 -r7057 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 7055) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 7057) @@ -60,6 +60,18 @@ const string xmlInput = @"TestFiles\InputFileMWDAM-3266.xml"; TestGeometryAndResult(calcDir, xmlInput, location, segment, surfaceCount, curveCount, pointCount, surfaceLinePointCount, safetyFactor); } + + [Test, Category(Categories.WorkInProgress)] + [TestCase("DWP-SC0035+50m_88111_3", "Schermer_sectie_3",24, 248, 227, 177, 999)] + [TestCase("DWP-SC0200+50m_88111_11", "Schermer_sectie_11",15, 191, 177, 84, 0.831)] + [TestCase("DWP_SC0234_88111_13", "Schermer_sectie_13",20, 187, 169, 2, 999)] + [TestCase("DWP_SC0264+50m_88111_14", "Schermer_sectie_14",15, 206, 192, 20, 1.031)] + public void TestGeometryAndResultForIssueMWDAM_3279(string location, string segment, int surfaceCount, int curveCount, int pointCount, int surfaceLinePointCount, double safetyFactor) + { + const string calcDir = "TestGeometryAndResultForIssueMWDAM_3279"; + const string xmlInput = @"TestFiles\InputFileMWDAM-3279.xml"; + TestGeometryAndResult(calcDir, xmlInput, location, segment, surfaceCount, curveCount, pointCount, surfaceLinePointCount, safetyFactor); + } private static void TestGeometryAndResult(string calcDirectory, string xmlInput, string location, string segment, int surfaceCount, int curveCount, int pointCount, int surfaceLinePointCount, double safetyFactor) { Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputFileMWDAM-3279.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputFileMWDAM-3279.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputFileMWDAM-3279.xml (revision 7057) @@ -0,0 +1,2309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs =================================================================== diff -u -r6404 -r7057 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs (.../SoilProfile2DHelperTests.cs) (revision 6404) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/SoilProfile2DHelperTests.cs (.../SoilProfile2DHelperTests.cs) (revision 7057) @@ -95,7 +95,7 @@ } }; SoilLayer2D soilUpperLayer = FactoryForSoilProfiles.CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, soilProfile); - SoilLayer2D soilLayerAquitard2 = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayerAquitard2 = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { new Point2D(leftCoordinate, -10), @@ -109,7 +109,7 @@ } ], null, soilProfile); SoilLayer2D soilLayerAquifer1 = FactoryForSoilProfiles.CreatePentagonSoilLayer2D(pointA, pointB, pointC, pointD, pointX, null, null, true); - SoilLayer2D soilLayerAquifer2 = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayerAquifer2 = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { new Point2D(leftCoordinate, -20), @@ -415,7 +415,7 @@ var bottomIntermediateUpperUpperLayer = new Point2D(middleXCoordinate, -5); var bottomIntermediateLowerUpperLayer = new Point2D(middleXCoordinate, -10); var bottomLeftUpperLayer = new Point2D(leftCoordinate, -10); - SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { topLeftUpperLayer, @@ -506,7 +506,7 @@ var bottomIntermediateLowerUpperLayer = new Point2D(middleXCoordinate, -15); var bottomIntermediateUpperUpperLayer = new Point2D(middleXCoordinate, -10); var bottomLeftUpperLayer = new Point2D(leftCoordinate, -10); - SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { topLeftUpperLayer, @@ -526,7 +526,7 @@ var bottomRightInBetweenAquiferLayerRight = new Point2D(rightCoordinate, -17); var bottomRightInBetweenLayer = new Point2D(rightCoordinate, -25); var bottomLeftInBetweenLayer = new Point2D(leftCoordinate, -25); - SoilLayer2D soilLayerInBetween = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayerInBetween = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { bottomLeftInBetweenAquiferLayerLeft, @@ -614,7 +614,7 @@ var bottomIntermediateLowerUpperLayer = new Point2D(middleXCoordinate, -5); var bottomIntermediateUpperUpperLayer = new Point2D(middleXCoordinate, -10); var bottomLeftUpperLayer = new Point2D(leftCoordinate, -10); - SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayer = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { topLeftUpperLayer, @@ -635,7 +635,7 @@ var bottomRightInBetweenAquiferLayerRight = new Point2D(rightCoordinate, -21); var bottomRightInBetweenLayer = new Point2D(rightCoordinate, -25); var bottomLeftInBetweenLayer = new Point2D(leftCoordinate, -25); - SoilLayer2D soilLayerInBetween = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayerInBetween = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { bottomLeftInBetweenAquiferLayerLeft, @@ -722,7 +722,7 @@ // Setup SoilLayer2D soilLayerTop = FactoryForSoilProfiles.CreateHexagonSoilLayer2D(new Point2D(leftCoordinate, 0), pointE, pointF, pointD, pointB, new Point2D(leftCoordinate, -10), soilProfile); - SoilLayer2D soilLayerInBetweenAquifer = FactoryForSoilProfiles.CreatePolygoneSoilLayer2D([ + SoilLayer2D soilLayerInBetweenAquifer = FactoryForSoilProfiles.CreatePolygonSoilLayer2D([ ..new[] { new Point2D(leftCoordinate, -10),