Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Deltares.DamEngine.Data.Tests.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Deltares.DamEngine.Data.Tests.csproj (.../Deltares.DamEngine.Data.Tests.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Deltares.DamEngine.Data.Tests.csproj (.../Deltares.DamEngine.Data.Tests.csproj) (revision 4185) @@ -1,25 +1,21 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - - - - - - - + + + + + + + + - - + + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs (.../LayerDetector.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs (.../LayerDetector.cs) (revision 4185) @@ -43,7 +43,6 @@ private readonly IList soilSurfaces; private double verticalXCoordinate; - private readonly Routines2D routines2D = new Routines2D(); /// /// Initializes a new instance of the class. @@ -155,7 +154,7 @@ var verticalEndPoint = new Point2D(verticalXCoordinate, minvalue); Point2D intersectionPoint; - LineIntersection intersectionResult = routines2D.DetermineIf2DLinesIntersectStrickly(verticalHeadPoint, + LineIntersection intersectionResult = Routines2D.DetermineIf2DLinesIntersectStrickly(verticalHeadPoint, verticalEndPoint, aHeadpoint, aEndPoint, out intersectionPoint); if (intersectionResult == LineIntersection.Intersects) @@ -165,8 +164,8 @@ else if (intersectionResult == LineIntersection.NoIntersection || intersectionResult == LineIntersection.Parallel) { const double cEpsilon = 1.0e-3; - if ((routines2D.DoesPointExistInLine(verticalHeadPoint, verticalEndPoint, - aHeadpoint, cEpsilon)) && (routines2D.DoesPointExistInLine(verticalHeadPoint, + if ((Routines2D.DoesPointExistInLine(verticalHeadPoint, verticalEndPoint, + aHeadpoint, cEpsilon)) && (Routines2D.DoesPointExistInLine(verticalHeadPoint, verticalEndPoint, aEndPoint, cEpsilon))) { AddPointToList(new LayerIntersectionPoint(aHeadpoint, aSurfaceRefKey)); @@ -235,7 +234,7 @@ }; // check where the mid point lies - PointInPolygon polygonResult = routines2D.CheckIfPointIsInPolygon(aPoint1.SurfaceRefKey.GeometrySurface.OuterLoop, + PointInPolygon polygonResult = Routines2D.CheckIfPointIsInPolygon(aPoint1.SurfaceRefKey.GeometrySurface.OuterLoop, midPoint.X, midPoint.Z); Point2D startPoint = aPoint1.IntersectionPoint; @@ -249,7 +248,7 @@ List innerLoopList = aPoint1.SurfaceRefKey.GeometrySurface.InnerLoops; foreach (GeometryLoop innerLoop in innerLoopList) { - PointInPolygon innerPolygonResult = routines2D.CheckIfPointIsInPolygon(innerLoop, midPoint.X, midPoint.Z); + PointInPolygon innerPolygonResult = Routines2D.CheckIfPointIsInPolygon(innerLoop, midPoint.X, midPoint.Z); if (innerPolygonResult != PointInPolygon.OutsidePolygon) { isPresentInInnerLoop = true; Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/LineHelper.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/LineHelper.cs (.../LineHelper.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/LineHelper.cs (.../LineHelper.cs) (revision 4185) @@ -28,27 +28,24 @@ /// /// Helper class for Line objects /// -public class LineHelper +public static class LineHelper { - - private readonly Routines2D routines2D = new Routines2D(); - /// /// Calculate intersection between two lines (strict interpolation) /// /// /// /// /// - public bool GetStrictIntersectionPoint(Line line1, Line line2, ref GeometryPoint intersectPoint) + public static bool GetStrictIntersectionPoint(Line line1, Line line2, ref GeometryPoint intersectPoint) { var point1 = new Point2D(line1.BeginPoint.X, line1.BeginPoint.Z); var point2 = new Point2D(line1.EndPoint.X, line1.EndPoint.Z); var point3 = new Point2D(line2.BeginPoint.X, line2.BeginPoint.Z); var point4 = new Point2D(line2.EndPoint.X, line2.EndPoint.Z); Point2D ip; - LineIntersection res = routines2D.DetermineIf2DLinesIntersectStrickly(point1, point2, point3, + LineIntersection res = Routines2D.DetermineIf2DLinesIntersectStrickly(point1, point2, point3, point4, out ip); if (ip != null) { @@ -69,7 +66,7 @@ /// Circle's radius /// Point collection which defines a line. Extrapolation is performed at the start and end points. /// Intersections of this line extrapolated to the negative and positive X with the circle. - public List ExtendedSurfaceIntersectionPointsWithCircle(double xMid, double zMid, double radius, IList pointss) + public static List ExtendedSurfaceIntersectionPointsWithCircle(double xMid, double zMid, double radius, IList pointss) { List points = pointss.Where(p => !double.IsNaN(p.X)).ToList(); if (points.Count >= 2) @@ -106,7 +103,7 @@ /// The radius. /// The points. /// - public List IntersectionPointsWithCircle(double xMid, double zMid, double radius, IList points) + public static List IntersectionPointsWithCircle(double xMid, double zMid, double radius, IList points) { var result = new List(); if (points.Count >= 2) @@ -134,7 +131,7 @@ return result; } - public GeometryPoint GetIntersectionPointWithExtrapolation(GeometryPoint p1, GeometryPoint p2, GeometryPoint p3, GeometryPoint p4) + public static GeometryPoint GetIntersectionPointWithExtrapolation(GeometryPoint p1, GeometryPoint p2, GeometryPoint p3, GeometryPoint p4) { return IntersectionPointWithExtrapolation(p1, p2, p3, p4); } @@ -147,9 +144,9 @@ /// The r. /// The line. /// - private List Intersect_Circle_line(double xm, double ym, double r, Line line) + private static List Intersect_Circle_line(double xm, double ym, double r, Line line) { - return routines2D.IntersectCircleline(xm, ym, r, line.BeginPoint.X, line.EndPoint.X, line.BeginPoint.Z, line.EndPoint.Z); + return Routines2D.IntersectCircleline(xm, ym, r, line.BeginPoint.X, line.EndPoint.X, line.BeginPoint.Z, line.EndPoint.Z); } /// @@ -160,7 +157,7 @@ /// /// /// Intersection point or null (parallel lines) - private GeometryPoint IntersectionPointWithExtrapolation(GeometryPoint p1, GeometryPoint p2, GeometryPoint p3, GeometryPoint p4) + private static GeometryPoint IntersectionPointWithExtrapolation(GeometryPoint p1, GeometryPoint p2, GeometryPoint p3, GeometryPoint p4) { GeometryPoint intersectPoint = null; @@ -169,7 +166,7 @@ var point3 = new Point2D(p3.X, p3.Z); var point4 = new Point2D(p4.X, p4.Z); - routines2D.DetermineIf2DLinesIntersectWithExtrapolation(point1, point2, point3, point4, out Point2D ip); + Routines2D.DetermineIf2DLinesIntersectWithExtrapolation(point1, point2, point3, point4, out Point2D ip); if (ip != null) { intersectPoint = new GeometryPoint(ip.X, ip.Z); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 4185) @@ -34,8 +34,6 @@ /// public class SurfaceLineShoulderAdapter : SurfaceLineAdapter { - private readonly LineHelper lineHelper = new LineHelper(); - /// /// Initializes a new instance of the class. /// @@ -125,7 +123,7 @@ GeometryPoint dikeBaseInside = hasShoulderInside ? surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside) : dikeToeAtPolder; // Determine intersectionpoint with slope for a horizontal shoulder GeometryPoint intersectionPointAtDike; - intersectionPointAtDike = lineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, + intersectionPointAtDike = LineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, new GeometryPoint(dikeToeAtPolder.X, shoulderHeight + dikeToeZ), new GeometryPoint(dikeToeAtPolder.X + 1, shoulderHeight + dikeToeZ)); var newTopShoulder = new GeometryPoint(intersectionPointAtDike.X + shoulderLength, shoulderHeight + dikeToeZ); @@ -135,7 +133,7 @@ // from the horizontal intersection point. This will result in the actual width of the shoulder being a bit // larger than the requested size but that can not be helped (classic chicken-egg problem) var pb = new GeometryPoint(newTopShoulder.X - 100, newTopShoulder.Z + (100 * Location.NewShoulderTopSlope)); - intersectionPointAtDike = lineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, pb, newTopShoulder); + intersectionPointAtDike = LineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, pb, newTopShoulder); if (intersectionPointAtDike.Z > MaxShoulderLevel) { throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError); Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs (.../MultiCoreMacroStabilityTests.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs (.../MultiCoreMacroStabilityTests.cs) (revision 4185) @@ -63,6 +63,7 @@ [TestCase("OperationalBishopGrid18Cores.xml")] public void OperationalBishopGridTestsWithXmlInputFile(string aFileName) { + //const string inputFilename = "InputForDebugging.xml"; // or put your own name here; string fullInputFilename = Path.Combine(mapTestFiles, aFileName); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; string inputString = File.ReadAllText(fullInputFilename); Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Deltares.DamEngine.TestHelpers.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Deltares.DamEngine.TestHelpers.csproj (.../Deltares.DamEngine.TestHelpers.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Deltares.DamEngine.TestHelpers.csproj (.../Deltares.DamEngine.TestHelpers.csproj) (revision 4185) @@ -1,20 +1,16 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - - - + + + + - - + + Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 4185) @@ -1,21 +1,17 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - + + - - - - + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Io/Deltares.DamEngine.Io.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Io/Deltares.DamEngine.Io.csproj (.../Deltares.DamEngine.Io.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Io/Deltares.DamEngine.Io.csproj (.../Deltares.DamEngine.Io.csproj) (revision 4185) @@ -1,15 +1,11 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - - + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/Deltares.DamEngine.Interface.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/Deltares.DamEngine.Interface.csproj (.../Deltares.DamEngine.Interface.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/Deltares.DamEngine.Interface.csproj (.../Deltares.DamEngine.Interface.csproj) (revision 4185) @@ -1,19 +1,15 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - + + - - - + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryCurve.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryCurve.cs (.../GeometryCurve.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryCurve.cs (.../GeometryCurve.cs) (revision 4185) @@ -49,8 +49,7 @@ { private Point2D endPoint; private Point2D headPoint; - private readonly Routines2D routines2D = new Routines2D(); - + /// /// Initializes a new instance of the class. /// @@ -199,7 +198,7 @@ public bool ContainsPoint(Point2D point, double tolerance = GeometryConstants.Accuracy * 0.5) { return HeadPoint != null && EndPoint != null && - routines2D.DoesPointExistInLine(HeadPoint, EndPoint, point, tolerance); + Routines2D.DoesPointExistInLine(HeadPoint, EndPoint, point, tolerance); } /// Index: DamEngine/trunk/src/Deltares.DamEngine.ConsoleRun/Deltares.DamEngine.ConsoleRun.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.ConsoleRun/Deltares.DamEngine.ConsoleRun.csproj (.../Deltares.DamEngine.ConsoleRun.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.ConsoleRun/Deltares.DamEngine.ConsoleRun.csproj (.../Deltares.DamEngine.ConsoleRun.csproj) (revision 4185) @@ -1,8 +1,4 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 4185) @@ -89,8 +89,7 @@ private bool isFrozen; private bool hasNaNx; private double frozenMaxZ = double.NaN; - private readonly Routines2D routines2D = new Routines2D(); - + // sortedPoints must never be used outside this class. Either the GPS concerned must have sorted points but then they already are // (eg. surfaceline, headline) or they may be unsorted in which case using the sorted list in other classes leads to errors (eg. // geometrysurfaces, waternetlines) @@ -702,7 +701,7 @@ double slopeBefore = (calcPoints[i].Z - calcPoints[i - 1].Z) / (calcPoints[i].X - calcPoints[i - 1].X); double slopeAfter = (calcPoints[i + 1].Z - calcPoints[i].Z) / (calcPoints[i + 1].X - calcPoints[i].X); - if (routines2D.AreEqual(slopeBefore, slopeAfter, slopeTolerance)) + if (Routines2D.AreEqual(slopeBefore, slopeAfter, slopeTolerance)) { calcPoints.RemoveAt(i); } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs (.../GeometryData.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs (.../GeometryData.cs) (revision 4185) @@ -38,8 +38,7 @@ private bool isRegeneratingGeometry; private bool updatingSurfaceLine; - private readonly Routines2D routines2D = new Routines2D(); - + /// /// Initializes a new instance of the class. /// @@ -728,12 +727,12 @@ /// Line 2 GeometryPoint 2 /// Intersection coordinates /// True if lines intersect each other - private bool CheckIfIntersectStricktly(Point2D beginPoint1, Point2D endPoint1, + private static bool CheckIfIntersectStricktly(Point2D beginPoint1, Point2D endPoint1, Point2D beginPoint2, Point2D endPoint2, ref Point2D intersect) { Point2D ip; - LineIntersection res = routines2D.DetermineIf2DLinesIntersectStrickly(beginPoint1, endPoint1, + LineIntersection res = Routines2D.DetermineIf2DLinesIntersectStrickly(beginPoint1, endPoint1, beginPoint2, endPoint2, out ip); if (ip != null) { @@ -753,7 +752,7 @@ /// Line 2 GeometryPoint 2 /// Intersection coordinates /// True if lines intersect each other - public bool CheckIfIntersect(double[] aL1P1, double[] aL1P2, double[] aL2P1, double[] aL2P2, + public static bool CheckIfIntersect(double[] aL1P1, double[] aL1P2, double[] aL2P1, double[] aL2P2, ref double[] aIntersect) { var p1 = new Point2D(aL1P1[0], aL1P1[1]); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 4185) @@ -44,7 +44,7 @@ private double? waterLevelRiverLow; private PlLine currentPl1Line; // is needed when calculating uplift reduction for PL3 and Pl4 - private readonly LineHelper lineHelper = new LineHelper(); + // Output /// @@ -1509,7 +1509,7 @@ new Point2D(SurfaceLine.Geometry.Points[indexatDitchPolder].X, SurfaceLine.Geometry.Points[indexatDitchPolder].Z)); var intersectDitchPolderPhreatic = new GeometryPoint(); - if (lineHelper.GetStrictIntersectionPoint(lineDitchPolderSide, phreaticPolderPartialLine, ref intersectDitchPolderPhreatic)) + if (LineHelper.GetStrictIntersectionPoint(lineDitchPolderSide, phreaticPolderPartialLine, ref intersectDitchPolderPhreatic)) { phreaticLine.Points.Add(new PlLinePoint(intersectDitchPolderPhreatic.X, intersectDitchPolderPhreatic.Z)); } @@ -1542,7 +1542,7 @@ new Point2D(SurfaceLine.Geometry.Points[surfacePointIndex + 1].X, SurfaceLine.Geometry.Points[surfacePointIndex + 1].Z)); var intersectDitchDikePhreatic = new GeometryPoint(); - if (lineHelper.GetStrictIntersectionPoint(lineDitchDikeSide, phreaticPolderPartialLine, ref intersectDitchDikePhreatic)) + if (LineHelper.GetStrictIntersectionPoint(lineDitchDikeSide, phreaticPolderPartialLine, ref intersectDitchDikePhreatic)) { phreaticLine.Points.Add(new PlLinePoint(intersectDitchDikePhreatic.X, intersectDitchDikePhreatic.Z)); } @@ -1577,7 +1577,7 @@ SurfaceLine.Geometry.Points[surfacePointIndex - 1].Z), new Point2D(SurfaceLine.Geometry.Points[surfacePointIndex].X, SurfaceLine.Geometry.Points[surfacePointIndex].Z)); var intersectPoint = new GeometryPoint(); - if (lineHelper.GetStrictIntersectionPoint(surfaceLineSegment, polderlevelLine, ref intersectPoint)) + if (LineHelper.GetStrictIntersectionPoint(surfaceLineSegment, polderlevelLine, ref intersectPoint)) { return new PlLinePoint(intersectPoint.X, intersectPoint.Z); } @@ -1620,7 +1620,7 @@ new Point2D(SurfaceLine.Geometry.Points[surfacePointIndex + 1].X, SurfaceLine.Geometry.Points[surfacePointIndex + 1].Z)); var intersectGeoPoint = new GeometryPoint(); var intersectPoint = new Point2D(); - if (lineHelper.GetStrictIntersectionPoint(phreaticLineSegment, surfaceLineSegment, ref intersectGeoPoint)) + if (LineHelper.GetStrictIntersectionPoint(phreaticLineSegment, surfaceLineSegment, ref intersectGeoPoint)) { intersectPoint.X = intersectGeoPoint.X; intersectPoint.Z = intersectGeoPoint.Z; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4185) @@ -1,8 +1,4 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 4185) @@ -1,11 +1,7 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + @@ -16,11 +12,11 @@ - - - - - - + + + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../SurfaceLine2Extensions.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../SurfaceLine2Extensions.cs) (revision 4185) @@ -33,8 +33,6 @@ /// public static class SurfaceLine2Extensions { - private static readonly LineHelper lineHelper = new LineHelper(); - /// /// Returns all that require to be sorted on X /// ascending. @@ -472,7 +470,7 @@ GeometryPoint geometryPoint2 = line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); GeometryPoint p2 = line.HasShoulderInside() ? line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside) : geometryPoint2; GeometryPoint geometryPoint3 = line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelOutside); - GeometryPoint withExtrapolation = lineHelper.GetIntersectionPointWithExtrapolation(geometryPoint1, p2, shoulderTopInside, new GeometryPoint(geometryPoint3.X, shoulderTopInside.Z)); + GeometryPoint withExtrapolation = LineHelper.GetIntersectionPointWithExtrapolation(geometryPoint1, p2, shoulderTopInside, new GeometryPoint(geometryPoint3.X, shoulderTopInside.Z)); return shoulderTopInside.X - withExtrapolation.X; } Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4185) @@ -26,7 +26,6 @@ using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlOutput; -using Deltares.DamEngine.TestHelpers; using NUnit.Framework; namespace Deltares.DamEngine.IntegrationTests.IntegrationTests; @@ -42,26 +41,20 @@ /// 2) Copy the file to src\Deltares.DamEngine.IntegrationTests\TestFiles\InputForDebugging.xml /// 3) Run the test in Debugging mode /// - [Test]//, Ignore("This test is only used for debugging XML files generated by Dam UI")] - [TestCase(12)] - [TestCase(16)] - public void DebugWithXmlInputFile(int maxCores) + [Test, Ignore("This test is only used for debugging XML files generated by Dam UI")] + public void DebugWithXmlInputFile() { const string inputFilename = "InputForDebugging.xml"; // or put your own name here; string fullInputFilename = Path.Combine(mapTestFiles, inputFilename); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; string inputString = File.ReadAllText(fullInputFilename); var engineInterface = new EngineInterface(inputString); Assert.IsNotNull(engineInterface.DamProjectData); - engineInterface.DamProjectData.MaxCalculationCores = maxCores; string result = engineInterface.Validate(); Assert.IsTrue(result == null, "Validation must succeed but does not, see output xml in debugger"); string outputString = engineInterface.Run(); - string outputName = "Output" + maxCores + ".xml"; - File.WriteAllText(outputName, outputString); + File.WriteAllText("Output.xml", outputString); Output output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - int errorCount = GeneralHelper.DetermineNumberOfCalculationErrors(engineInterface.DamProjectData.CalculationMessages); - Assert.AreEqual(0, errorCount, "There should be nor errors during the calculation."); if (engineInterface.DamProjectData.DamProjectType == DamProjectType.Design) { Assert.AreNotEqual(null, output.Results.CalculationResults); @@ -71,5 +64,4 @@ Assert.AreNotEqual(null, output.Results.OperationalOutputTimeSeries); } } - } \ No newline at end of file Index: DamEngine/trunk/src/DamEngine.sln =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/DamEngine.sln (.../DamEngine.sln) (revision 4184) +++ DamEngine/trunk/src/DamEngine.sln (.../DamEngine.sln) (revision 4185) @@ -39,75 +39,52 @@ GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 Release|x86 = Release|x86 - Debug anyCPU|Any CPU = Debug anyCPU|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {750464A3-CBFA-429F-920E-B430867F1120}.Debug|x86.ActiveCfg = Debug|x86 {750464A3-CBFA-429F-920E-B430867F1120}.Debug|x86.Build.0 = Debug|x86 {750464A3-CBFA-429F-920E-B430867F1120}.Release|x86.ActiveCfg = Release|x86 {750464A3-CBFA-429F-920E-B430867F1120}.Release|x86.Build.0 = Release|x86 - {750464A3-CBFA-429F-920E-B430867F1120}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {750464A3-CBFA-429F-920E-B430867F1120}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Debug|x86.ActiveCfg = Debug|x86 {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Debug|x86.Build.0 = Debug|x86 {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Release|x86.ActiveCfg = Release|x86 {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Release|x86.Build.0 = Release|x86 - {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {968516F9-1B92-4ADB-AE4A-CFF54EE43126}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Debug|x86.ActiveCfg = Debug|x86 {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Debug|x86.Build.0 = Debug|x86 {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Release|x86.ActiveCfg = Release|x86 {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Release|x86.Build.0 = Release|x86 - {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {E943B1D5-FAFA-4AFE-9071-F8B22CF612EA}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Debug|x86.ActiveCfg = Debug|x86 {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Debug|x86.Build.0 = Debug|x86 {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Release|x86.ActiveCfg = Release|x86 {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Release|x86.Build.0 = Release|x86 - {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {B7A49C1A-1C91-4D72-ABA9-9FBAC2509D8E}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Debug|x86.ActiveCfg = Debug|x86 {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Debug|x86.Build.0 = Debug|x86 {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Release|x86.ActiveCfg = Release|x86 {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Release|x86.Build.0 = Release|x86 - {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {9CB1ECCE-2F86-418D-BBDC-166BD1FB7F57}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {1560A423-F338-4DEC-8583-1DFF7077F104}.Debug|x86.ActiveCfg = Debug|x86 {1560A423-F338-4DEC-8583-1DFF7077F104}.Debug|x86.Build.0 = Debug|x86 {1560A423-F338-4DEC-8583-1DFF7077F104}.Release|x86.ActiveCfg = Release|x86 {1560A423-F338-4DEC-8583-1DFF7077F104}.Release|x86.Build.0 = Release|x86 - {1560A423-F338-4DEC-8583-1DFF7077F104}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {1560A423-F338-4DEC-8583-1DFF7077F104}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Debug|x86.ActiveCfg = Debug|x86 {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Debug|x86.Build.0 = Debug|x86 {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Release|x86.ActiveCfg = Release|x86 {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Release|x86.Build.0 = Release|x86 - {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {783E7BC6-CD3F-4851-B5EF-46DE954AACD1}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Debug|x86.ActiveCfg = Debug|x86 {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Debug|x86.Build.0 = Debug|x86 {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Release|x86.ActiveCfg = Release|x86 {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Release|x86.Build.0 = Release|x86 - {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {B8BD3348-EE6E-4BAA-BC0F-2554A916EBB6}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Debug|x86.ActiveCfg = Debug|x86 {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Debug|x86.Build.0 = Debug|x86 {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Release|x86.ActiveCfg = Release|x86 {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Release|x86.Build.0 = Release|x86 - {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {A41683F4-C3E0-4386-AEE7-FAACD535CF93}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Debug|x86.ActiveCfg = Debug|x86 {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Debug|x86.Build.0 = Debug|x86 {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Release|x86.ActiveCfg = Release|x86 {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Release|x86.Build.0 = Release|x86 - {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {75D4440A-4E1F-4B15-8754-20C11EF3A222}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Debug|x86.ActiveCfg = Debug|x86 {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Debug|x86.Build.0 = Debug|x86 {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Release|x86.ActiveCfg = Release|x86 {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Release|x86.Build.0 = Release|x86 - {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Debug anyCPU|Any CPU.ActiveCfg = Debug anyCPU|Any CPU - {5C949622-0C02-4EF9-B7BF-54C9F11662C0}.Debug anyCPU|Any CPU.Build.0 = Debug anyCPU|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 4185) @@ -1,11 +1,7 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + @@ -14,15 +10,15 @@ ..\..\lib\FailureMechanisms\WtiPipingMerged\Deltares.WTIPiping.Merged.dll - - + + - - - - - + + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs (.../Routines2D.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs (.../Routines2D.cs) (revision 4185) @@ -82,7 +82,7 @@ /// /// Static class Routines2D /// -public class Routines2D +public static class Routines2D { private const double CEpsilon = 1.0e-4; @@ -101,7 +101,7 @@ /// /// For connected parallel lines, the connection point will be returned as valid intersection point. /// - public LineIntersection DetermineIf2DLinesIntersectStrickly(Point2D point1, Point2D point2, Point2D point3, + public static LineIntersection DetermineIf2DLinesIntersectStrickly(Point2D point1, Point2D point2, Point2D point3, Point2D point4, out Point2D intersectionPoint) { return DetermineIf2DLinesIntersectStrickly(point1, point2, point3, point4, @@ -116,7 +116,7 @@ /// The point. /// The tolerance. /// - public bool DoesPointExistInLine(Point2D linePoint1, Point2D linePoint2, Point2D point, double tolerance) + public static bool DoesPointExistInLine(Point2D linePoint1, Point2D linePoint2, Point2D point, double tolerance) { // Function to find if lies on or close to a line (within a given tolerance) // Input - a line defined by lTwo points, a third point to test and tolerance aValue @@ -168,7 +168,7 @@ /// /// /// - public Clockwise IsClockWise(IEnumerable aPolygon) + public static Clockwise IsClockWise(IEnumerable aPolygon) { Point2D[] distinctPoints = aPolygon.Distinct().ToArray(); if (distinctPoints.Length < 3) @@ -227,7 +227,7 @@ /// The x. /// The z. /// - public PointInPolygon CheckIfPointIsInPolygon(GeometryLoop polygon, double x, double z) + public static PointInPolygon CheckIfPointIsInPolygon(GeometryLoop polygon, double x, double z) { // This is done by calculating and adding the angles from the point to all points // of the polygon (using the ArcTan2 function). If the sum of these angles is @@ -331,7 +331,7 @@ /// /// /// - public List IntersectCircleline(double aX, double aY, double aR, double aX1, double aX2, double aY1, double aY2) + public static List IntersectCircleline(double aX, double aY, double aR, double aX1, double aX2, double aY1, double aY2) { // Solve by filling in parametric equation of line : // X = x1 + u*(x2 - x1) @@ -413,7 +413,7 @@ /// /// /// - public double FindAngle(Point2D line1Point1, Point2D line1Point2, Point2D line2Point1, + public static double FindAngle(Point2D line1Point1, Point2D line1Point2, Point2D line2Point1, Point2D line2Point2) { double x1 = line1Point2.X - line1Point1.X; @@ -442,7 +442,7 @@ /// /// /// - public bool AreEqual(double x1, double x2, double tolerance) + public static bool AreEqual(double x1, double x2, double tolerance) { return (Math.Abs(x1 - x2) < tolerance); } @@ -456,7 +456,7 @@ /// a point4. /// a intersection point. /// - public LineIntersection DetermineIf2DLinesIntersectWithExtrapolation(Point2D aPoint1, Point2D aPoint2, Point2D aPoint3, Point2D aPoint4, out Point2D aIntersectionPoint) + public static LineIntersection DetermineIf2DLinesIntersectWithExtrapolation(Point2D aPoint1, Point2D aPoint2, Point2D aPoint3, Point2D aPoint4, out Point2D aIntersectionPoint) { LineConstant lLineConstant1 = CalculateNormalLineConstants(aPoint1, aPoint2); LineConstant lLineConstant2 = CalculateNormalLineConstants(aPoint3, aPoint4); @@ -475,7 +475,7 @@ /// /// /// - public LineIntersection DetermineIf2DLinesIntersectWithExtrapolation(LineConstant aLine1Constant, LineConstant aLine2Constant, out Point2D aIntersectionPoint) + public static LineIntersection DetermineIf2DLinesIntersectWithExtrapolation(LineConstant aLine1Constant, LineConstant aLine2Constant, out Point2D aIntersectionPoint) { aIntersectionPoint = new Point2D(0.0, 0.0); @@ -510,7 +510,7 @@ /// The point2 z. /// The tolerance. /// - public bool DetermineIfPointsCoincide(double point1X, double point1Z, double point2X, double point2Z, double tolerance) + public static bool DetermineIfPointsCoincide(double point1X, double point1Z, double point2X, double point2Z, double tolerance) { if ((Math.Abs(point1X - point2X)) < tolerance && Math.Abs(point1Z - point2Z) < tolerance) { @@ -520,7 +520,7 @@ return false; } - private void UndoAddIfNeeded(GeometryLoop polygon, bool needed) + private static void UndoAddIfNeeded(GeometryLoop polygon, bool needed) { if (needed) { @@ -536,7 +536,7 @@ /// X-coordinate of the second point /// Y-coordinate of the second point /// - private double CrossProduct(double pointAx, double pointAy, double pointBx, double pointBy) + private static double CrossProduct(double pointAx, double pointAy, double pointBx, double pointBy) { return pointAx * pointBy - pointBx * pointAy; } @@ -547,7 +547,7 @@ /// The point1. /// The point2. /// - private LineConstant CalculateNormalLineConstants(Point2D point1, Point2D point2) + private static LineConstant CalculateNormalLineConstants(Point2D point1, Point2D point2) { double point1X = point1.X; double point1Z = point1.Z; @@ -573,7 +573,7 @@ /// a line2 constant y. /// The tolerance. /// - private bool AreLinesParallel(double aLine1ConstantX, double aLine1ConstantY, double aLine2ConstantX, double aLine2ConstantY, double tolerance) + private static bool AreLinesParallel(double aLine1ConstantX, double aLine1ConstantY, double aLine2ConstantX, double aLine2ConstantY, double tolerance) { return Math.Abs(CrossProduct(aLine1ConstantX, aLine2ConstantX, aLine1ConstantY, aLine2ConstantY)) < tolerance; } @@ -586,7 +586,7 @@ /// X-coordinate of the second point /// Y-coordinate of the second point /// The distance between the given points. - private double Compute2DDistance(double aX1, double aY1, double aX2, double aY2) + private static double Compute2DDistance(double aX1, double aY1, double aX2, double aY2) { double lX = aX1 - aX2; double lY = aY1 - aY2; @@ -610,7 +610,7 @@ /// /// For connected parallel lines, the connection point will be returned as valid intersection point. /// - private LineIntersection DetermineIf2DLinesIntersectStrickly(Point2D point1, Point2D point2, Point2D point3, + private static LineIntersection DetermineIf2DLinesIntersectStrickly(Point2D point1, Point2D point2, Point2D point3, Point2D point4, out Point2D intersectionPoint, double tolerance) { double point1X = point1.X; @@ -674,7 +674,7 @@ /// The point4 z. /// The tolerance. /// - private bool DoLinesAtLeastPartialyOverlap(double point1X, double point1Z, double point2X, double point2Z, + private static bool DoLinesAtLeastPartialyOverlap(double point1X, double point1Z, double point2X, double point2Z, double point3X, double point3Z, double point4X, double point4Z, double tolerance) { bool result = AreLinesParallel(point1X, point1Z, point2X, point2Z, point3X, point3Z, point4X, point4Z, tolerance); @@ -730,7 +730,7 @@ /// /// True when parallel /// - private bool AreLinesParallel(double point1X, double point1Z, double point2X, double point2Z, + private static bool AreLinesParallel(double point1X, double point1Z, double point2X, double point2Z, double point3X, double point3Z, double point4X, double point4Z, double tolerance) { double aX = point2X - point1X; @@ -747,7 +747,7 @@ /// /// Normalizes this instance. /// - private void Normalize(ref double pointX, ref double pointY) + private static void Normalize(ref double pointX, ref double pointY) { double q = Math.Sqrt(pointX * pointX + pointY * pointY); Index: DamEngine/trunk/src/Deltares.DamEngine.Io.Tests/Deltares.DamEngine.Io.Tests.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Io.Tests/Deltares.DamEngine.Io.Tests.csproj (.../Deltares.DamEngine.Io.Tests.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Io.Tests/Deltares.DamEngine.Io.Tests.csproj (.../Deltares.DamEngine.Io.Tests.csproj) (revision 4185) @@ -1,18 +1,14 @@  - - Debug;Release;Debug anyCPU - x86;AnyCPU - - + - + - - + + - + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineHeightAdapter.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineHeightAdapter.cs (.../SurfaceLineHeightAdapter.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineHeightAdapter.cs (.../SurfaceLineHeightAdapter.cs) (revision 4185) @@ -30,8 +30,6 @@ /// public class SurfaceLineHeightAdapter : SurfaceLineAdapter { - private readonly LineHelper lineHelper = new LineHelper(); - /// /// Initializes a new instance of the class. /// @@ -71,7 +69,7 @@ X = pointAtTopRiver.X + 100, Z = pointAtTopRiver.Z + 100 * Location.NewDikeSlopeOutside }; - newPointAtTopRiver = lineHelper.GetIntersectionPointWithExtrapolation(pointAtTopRiver, newOutsideSlopePoint, + newPointAtTopRiver = LineHelper.GetIntersectionPointWithExtrapolation(pointAtTopRiver, newOutsideSlopePoint, new GeometryPoint(pointAtTopRiver.X, newDikeHeight), new GeometryPoint(pointAtTopPolder.X, newDikeHeight)); oldPointAtTopRiver = new GeometryPoint @@ -82,7 +80,7 @@ } else { - newPointAtTopRiver = lineHelper.GetIntersectionPointWithExtrapolation(startingPoint, pointAtTopRiver, + newPointAtTopRiver = LineHelper.GetIntersectionPointWithExtrapolation(startingPoint, pointAtTopRiver, new GeometryPoint(pointAtTopRiver.X, newDikeHeight), new GeometryPoint(pointAtTopPolder.X, newDikeHeight)); } @@ -176,7 +174,7 @@ Z = newPointAtTopPolder.Z - 100 * slopeTangent }; GeometryPoint dikeTopAtPolder = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder); - GeometryPoint ip = lineHelper.GetIntersectionPointWithExtrapolation(newPointAtTopPolder, newPoint, + GeometryPoint ip = LineHelper.GetIntersectionPointWithExtrapolation(newPointAtTopPolder, newPoint, surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver), dikeTopAtPolder); if (ip != null && ip.X <= dikeTopAtPolder.X) Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryLoop.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryLoop.cs (.../GeometryLoop.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryLoop.cs (.../GeometryLoop.cs) (revision 4185) @@ -30,8 +30,6 @@ /// public class GeometryLoop : GeometryPointString { - private readonly Routines2D routines2D = new Routines2D(); - /// /// List of points that describe the physical surface line or surface. /// @@ -122,7 +120,7 @@ public bool IsClockWise() { List polyGon = GetLocalPoint2DList(); - Clockwise isClockWise = routines2D.IsClockWise(polyGon); + Clockwise isClockWise = Routines2D.IsClockWise(polyGon); if (isClockWise == Clockwise.NotEnoughUniquePoints) { throw new NotEnoughUniquePointsException(); @@ -143,7 +141,7 @@ /// public bool IsPointInLoopArea(Point2D aPoint) { - return routines2D.CheckIfPointIsInPolygon(this, aPoint.X, aPoint.Z) != PointInPolygon.OutsidePolygon; + return Routines2D.CheckIfPointIsInPolygon(this, aPoint.X, aPoint.Z) != PointInPolygon.OutsidePolygon; } /// Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4185) @@ -320,9 +320,6 @@ PreserveNewest - - PreserveNewest - Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs (.../GeometryGenerator.cs) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs (.../GeometryGenerator.cs) (revision 4185) @@ -40,7 +40,7 @@ // private readonly List intersectedCurveList = new List(); private readonly List newlyDetectedSurfaceList = new List(); - private readonly Routines2D routines2D = new Routines2D(); + /// /// Regenerates the geometry. /// @@ -451,7 +451,7 @@ point4.X = attachedCurveList[index2].GetEndPoint().X; point4.Z = attachedCurveList[index2].GetEndPoint().Z; - double angle = routines2D.FindAngle(point1, point2, point3, point4); + double angle = Routines2D.FindAngle(point1, point2, point3, point4); if (angle < minAngle) { @@ -848,7 +848,7 @@ // check if it is an inner loop for (var innerIndex = 0; innerIndex < newPointCount; innerIndex++) { - PointInPolygon location = routines2D.CheckIfPointIsInPolygon(loop, newPolygon[innerIndex].X, newPolygon[innerIndex].Z); + PointInPolygon location = Routines2D.CheckIfPointIsInPolygon(loop, newPolygon[innerIndex].X, newPolygon[innerIndex].Z); if (location == PointInPolygon.InsidePolygon) { @@ -863,7 +863,7 @@ // check if it has an inner loop for (var innerIndex1 = 0; innerIndex1 < existingLoopPointCount; innerIndex1++) { - PointInPolygon location = routines2D.CheckIfPointIsInPolygon(newLoop, polygon[innerIndex1].X, polygon[innerIndex1].Z); + PointInPolygon location = Routines2D.CheckIfPointIsInPolygon(newLoop, polygon[innerIndex1].X, polygon[innerIndex1].Z); if (location == PointInPolygon.InsidePolygon) { Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputForDebugging.xml =================================================================== diff -u -r4184 -r4185 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputForDebugging.xml (.../InputForDebugging.xml) (revision 4184) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/InputForDebugging.xml (.../InputForDebugging.xml) (revision 4185) @@ -1,470 +1,1182 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file