Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorSingle.cs =================================================================== diff -u -r4732 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorSingle.cs (.../DesignCalculatorSingle.cs) (revision 4732) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorSingle.cs (.../DesignCalculatorSingle.cs) (revision 4898) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; @@ -76,6 +75,7 @@ // Perform calculation kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out locationCalculationMessages); } + bool hasError = locationCalculationMessages.Exists(message => message.MessageType == LogMessageType.Error); designScenario.CalculationResult = hasError ? CalculationResult.RunFailed : CalculationResult.Succeeded; // Process output Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r4768 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 4768) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 4898) @@ -91,7 +91,7 @@ Assert.That(output.Results.CalculationMessages[1].Message1, Is.EqualTo("SurfaceLine dijkring10_dwp09_0 does not fit within the boundaries of soil profile 10Y_090_STBI.stix")); } - + [Test, Category("Slow"), Ignore("This test is not yet implemented, waits on stix implementation")] [Category(Categories.WorkInProgress)] public void TestBishopNoAdaptionWith2DGeometriesBasedOnStixFiles() Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Translations.xml =================================================================== diff -u -r4772 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Translations.xml (.../Translations.xml) (revision 4772) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Translations.xml (.../Translations.xml) (revision 4898) @@ -22,7 +22,7 @@ All rights reserved. --> - + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs =================================================================== diff -u -r4896 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 4896) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverterTests.cs (.../PlLinesToWaternetConverterTests.cs) (revision 4898) @@ -36,12 +36,12 @@ { private const double precision3Decimals = 0.00051; private const double precision6Decimals = 0.00000051; - + private const double penetrationLength = 0.5; + private static readonly Random random = new(21); private static readonly double leftCoordinate = random.NextDouble(); private static readonly double rightCoordinate = leftCoordinate + 1; private static readonly double middleXCoordinate = 0.5 * (leftCoordinate + rightCoordinate); - private const double penetrationLength = 0.5; [Test] [TestCase(0)] @@ -301,7 +301,7 @@ SoilLayer2D soilLayerAquiferInBetweenRight = CreateRectangularSoilLayer2D(-10, -20, middleXCoordinate, rightCoordinate, true); SoilLayer2D soilLayerInBetween = CreateRectangularSoilLayer2D(-20, -25, leftCoordinate, rightCoordinate, false); SoilLayer2D soilLayerAquiferBottom = CreateRectangularSoilLayer2D(-25, -30, leftCoordinate, rightCoordinate, true); - + var soilProfile = new SoilProfile2D { Geometry = new GeometryData @@ -699,7 +699,7 @@ }; SoilLayer2D soilLayerAquiferInBetweenLeft = CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, middleXCoordinate, true); SoilLayer2D soilLayerAquiferInBetweenRight = CreateRectangularSoilLayer2D(-15, -17, middleXCoordinate, rightCoordinate, true); - + var bottomLeftInBetweenAquiferLayerLeft = new Point2D(leftCoordinate, -20); var bottomRightInBetweenAquiferLayerLeft = new Point2D(middleXCoordinate, -20); var bottomLeftInBetweenAquiferLayerRight = new Point2D(middleXCoordinate, -17); @@ -828,10 +828,10 @@ } } }; - + SoilLayer2D soilLayerAquiferInBetweenLeft = CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, middleXCoordinate, true); SoilLayer2D soilLayerAquiferInBetweenRight = CreateRectangularSoilLayer2D(-5, -21, middleXCoordinate, rightCoordinate, true); - + var bottomLeftInBetweenAquiferLayerLeft = new Point2D(leftCoordinate, -20); var bottomRightInBetweenAquiferLayerLeft = new Point2D(middleXCoordinate, -20); var bottomLeftInBetweenAquiferLayerRight = new Point2D(middleXCoordinate, -21); @@ -936,7 +936,7 @@ // Setup SoilLayer2D soilLayer = CreateRectangularSoilLayer2D(0, -10, leftCoordinate, rightCoordinate, false); SoilLayer2D soilLayerAquiferInBetweenLeft = CreateRectangularSoilLayer2D(-10, -20, leftCoordinate, middleXCoordinate, isLeftInBetweenLayerAquifer); - SoilLayer2D soilLayerAquiferInBetweenRight = CreateRectangularSoilLayer2D(-10, -20, middleXCoordinate, rightCoordinate, isRightInBetweenLayerAquifer); + SoilLayer2D soilLayerAquiferInBetweenRight = CreateRectangularSoilLayer2D(-10, -20, middleXCoordinate, rightCoordinate, isRightInBetweenLayerAquifer); SoilLayer2D soilLayerInBetween = CreateRectangularSoilLayer2D(-20, -25, leftCoordinate, rightCoordinate, false); SoilLayer2D soilLayerAquiferBottom = CreateRectangularSoilLayer2D(-25, -30, leftCoordinate, rightCoordinate, true); @@ -1290,7 +1290,7 @@ soilProfileFullAdjoin.Surfaces.Add(soilUpperLayer); soilProfileFullAdjoin.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileFullAdjoin.Surfaces.Add(soilBottomLayerAquiferPartRight); - + yield return new TestCaseData(soilProfileFullAdjoin, new[] { new GeometryPoint(leftCoordinate, -10), @@ -1323,7 +1323,7 @@ new GeometryPoint(leftCoordinate, -10), new GeometryPoint(rightCoordinate, -10) }).SetName("One aquifer bottom layer"); - + // TEST CASE 3: "Right aquifer only bottom in range" // // ------------------------------------------------------------- Level 0 m @@ -1345,15 +1345,15 @@ soilProfileRightSoilLayerBottomInRange.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightSoilLayerBottomInRange.Surfaces.Add(soilBottomLayerAquiferPartRight); soilProfileRightSoilLayerBottomInRange.Geometry.Surfaces.Add(new GeometrySurface()); - + yield return new TestCaseData(soilProfileRightSoilLayerBottomInRange, new[] { new GeometryPoint(leftCoordinate, -10), new GeometryPoint(middleXCoordinate, -10), new GeometryPoint(middleXCoordinate, -5), new GeometryPoint(rightCoordinate, -5) }).SetName("Right aquifer only bottom in range"); - + // TEST CASE 4: "Right aquifer only top in range" // // ------------------------------------------------------------- Level 0 m @@ -1377,15 +1377,15 @@ soilProfileRightSoilLayerTopInRange.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightSoilLayerTopInRange.Surfaces.Add(soilBottomLayerAquiferPartRight); soilProfileRightSoilLayerTopInRange.Geometry.Surfaces.Add(new GeometrySurface()); - + yield return new TestCaseData(soilProfileRightSoilLayerTopInRange, new[] { new GeometryPoint(leftCoordinate, -10), new GeometryPoint(middleXCoordinate, -10), new GeometryPoint(middleXCoordinate, -15), new GeometryPoint(rightCoordinate, -15) }).SetName("Right aquifer only top in range"); - + // TEST CASE 5: "Right aquifer fully envelopes left aquifer" // // ------------------------------------------------------------- Level 0 m @@ -1408,15 +1408,15 @@ soilProfileRightAquiferLayerFullyEnvelopsLeft.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightAquiferLayerFullyEnvelopsLeft.Surfaces.Add(soilBottomLayerAquiferPartRight); soilProfileRightAquiferLayerFullyEnvelopsLeft.Geometry.Surfaces.Add(new GeometrySurface()); - + yield return new TestCaseData(soilProfileRightAquiferLayerFullyEnvelopsLeft, new[] { new GeometryPoint(leftCoordinate, -10), new GeometryPoint(middleXCoordinate, -10), new GeometryPoint(middleXCoordinate, -5), new GeometryPoint(rightCoordinate, -5) }).SetName("Right aquifer fully envelopes left aquifer"); - + // TEST CASE 6: "Right aquifer fully enveloped by left aquifer" // // ------------------------------------------------------------- Level 0 m @@ -1440,7 +1440,7 @@ soilProfileRightAquiferLayerFullyEnvelopedByLeft.Surfaces.Add(soilBottomLayerAquiferPartLeft); soilProfileRightAquiferLayerFullyEnvelopedByLeft.Surfaces.Add(soilBottomLayerAquiferPartRight); soilProfileRightAquiferLayerFullyEnvelopedByLeft.Geometry.Surfaces.Add(new GeometrySurface()); - + yield return new TestCaseData(soilProfileRightAquiferLayerFullyEnvelopedByLeft, new[] { new GeometryPoint(leftCoordinate, -10), @@ -1450,7 +1450,7 @@ }).SetName("Right aquifer fully enveloped by left aquifer"); } - private static SoilLayer2D CreateSoilLayer2D(Point2D topLeftCoordinate, Point2D topRightCoordinate, + private static SoilLayer2D CreateSoilLayer2D(Point2D topLeftCoordinate, Point2D topRightCoordinate, Point2D bottomRightCoordinate, Point2D bottomLeftCoordinate, bool isAquifer) { return new SoilLayer2D @@ -1484,10 +1484,10 @@ private static SoilLayer2D CreateRectangularSoilLayer2D(double topCoord, double bottomCoord, double leftCoord, double rightCoord, bool isAquifer) { var topLeftPoint = new Point2D(leftCoord, topCoord); - var topRightPoint= new Point2D(rightCoord, topCoord); + var topRightPoint = new Point2D(rightCoord, topCoord); var bottomRightPoint = new Point2D(rightCoord, bottomCoord); var bottomLeftPoint = new Point2D(leftCoord, bottomCoord); - + return CreateSoilLayer2D(topLeftPoint, topRightPoint, bottomRightPoint, bottomLeftPoint, isAquifer); } @@ -1513,7 +1513,7 @@ }); } } - + private static PlLines CreateAllPlLines() { var plLines = new PlLines(); Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r4882 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4882) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4898) @@ -330,7 +330,7 @@ PreserveNewest - PreserveNewest + PreserveNewest Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs =================================================================== diff -u -r4897 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs (.../GeometryHelperTests.cs) (revision 4897) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/GeometryHelperTests.cs (.../GeometryHelperTests.cs) (revision 4898) @@ -55,7 +55,7 @@ // GeometryExporter.ExportToJsonFile(soilProfile2D.Geometry, visualizationFolder + "Geometry.json"); // Then - var geometryBounds = soilProfile2D.Geometry.GetGeometryBounds(); + GeometryBounds geometryBounds = soilProfile2D.Geometry.GetGeometryBounds(); Assert.That(geometryBounds.Left, Is.EqualTo(-2).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Left, Is.EqualTo(-2).Within(cTolerance)); // At first there are 3 surfaces, but after extending the right boundary, there are 6 surfaces @@ -100,7 +100,7 @@ // When & Then Assert.Throws(() => { GeometryHelper.ExtendGeometryRight(soilProfile2D.Geometry, 8); }); } - + [Test, Ignore("Work in progress")] public void GivenTwoLayerGeometryWhenCuttingLeftThenLeftBoundaryIsChanged() { @@ -117,10 +117,9 @@ GeometryExporter.ExportToJsonFile(soilProfile2D.Geometry, visualizationFolder + "Geometry.json"); // Then - var geometryBounds = soilProfile2D.Geometry.GetGeometryBounds(); + GeometryBounds geometryBounds = soilProfile2D.Geometry.GetGeometryBounds(); Assert.That(geometryBounds.Left, Is.EqualTo(2).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Left, Is.EqualTo(2).Within(cTolerance)); Assert.That(soilProfile2D.Geometry.Surfaces.Count, Is.EqualTo(3)); } - } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs =================================================================== diff -u -r4836 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4836) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/DebuggingTest.cs (.../DebuggingTest.cs) (revision 4898) @@ -46,7 +46,7 @@ string fullInputFilename = Path.Combine(mapTestFiles, inputFilename); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; string inputString = File.ReadAllText(fullInputFilename); - string outputName = "OutputForDebugging.xml"; + var outputName = "OutputForDebugging.xml"; var engineInterface = new EngineInterface(inputString); GeneralHelper.RunAfterInputValidation(engineInterface, true, outputName); int errorCount = GeneralHelper.DetermineNumberOfCalculationErrors(engineInterface.DamProjectData.CalculationMessages); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs =================================================================== diff -u -r4669 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs (.../FillMacroStabilityWrapperInputFromEngine.cs) (revision 4669) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs (.../FillMacroStabilityWrapperInputFromEngine.cs) (revision 4898) @@ -87,7 +87,7 @@ TransferStabilityModelProperties(mStabParameters, macroStabilityInput.StabilityModel); TransferSoils(damKernelInput.Location.SoilList, macroStabilityInput.StabilityModel.Soils, lastStage.FixedSoilStresses); - + lastStage.SoilProfile = new SoilProfile(); lastStage.PreconsolidationStresses = new List(); lastStage.WaterDefinition = WaterDefinition.WaterNet; @@ -172,7 +172,11 @@ Soil kernelSoil = ConversionHelper.ConvertToMacroStabilitySoil(damSoil); kernelSoils.Add(kernelSoil); soilsDictionary.Add(damSoil.Name, kernelSoil); - kernelFixedSoilStresses.Add(new FixedSoilStress{POP = damSoil.PoP, Soil = kernelSoil}); + kernelFixedSoilStresses.Add(new FixedSoilStress + { + POP = damSoil.PoP, + Soil = kernelSoil + }); } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs =================================================================== diff -u -r4729 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs (.../StabilityResultSlice.cs) (revision 4729) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Results/StabilityResultSlice.cs (.../StabilityResultSlice.cs) (revision 4898) @@ -208,7 +208,7 @@ /// The input shear stress /// public double ShearStressInput; - + /// /// The output shear stress /// @@ -238,7 +238,7 @@ /// The input su /// public double SuInput; - + /// /// The output su /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedInput.cs =================================================================== diff -u -r4718 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedInput.cs (.../WtiPipingSellmeijerRevisedInput.cs) (revision 4718) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedInput.cs (.../WtiPipingSellmeijerRevisedInput.cs) (revision 4898) @@ -34,6 +34,22 @@ private const double cIch = 0.3; /// + /// The whites drag coefficient as readonly. + /// + /// + /// The whites drag coefficient. + /// + public readonly double WhitesDragCoefficient = WTIPipingConstants.WhitesDragCoefficient; + + /// + /// The bedding angle as readonly. + /// + /// + /// The bedding angle. + /// + public readonly double BeddingAngle = WTIPipingConstants.BeddingAngleSellmeijerRevised; + + /// /// Gets or sets the model factor piping. /// /// @@ -89,22 +105,6 @@ public double BottomLevelAquitardAboveExitPointZ { get; set; } = double.NaN; /// - /// The whites drag coefficient as readonly. - /// - /// - /// The whites drag coefficient. - /// - public readonly double WhitesDragCoefficient = WTIPipingConstants.WhitesDragCoefficient; - - /// - /// The bedding angle as readonly. - /// - /// - /// The bedding angle. - /// - public readonly double BeddingAngle = WTIPipingConstants.BeddingAngleSellmeijerRevised; - - /// /// Gets or sets the gamma sub particles. /// /// Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj =================================================================== diff -u -r4796 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 4796) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 4898) @@ -11,4 +11,4 @@ <_Parameter1>Deltares.DamEngine.Interface.Tests - + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs =================================================================== diff -u -r4835 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs (.../Point2D.cs) (revision 4835) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Point2D.cs (.../Point2D.cs) (revision 4898) @@ -57,6 +57,8 @@ /// public double Z { get; set; } + public string Name { get; set; } + /// /// Determines whether the location of the given point and this one are the same. /// @@ -107,6 +109,4 @@ return String.Compare(ToString(), obj.ToString(), StringComparison.Ordinal); } - - public string Name { get; set; } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs =================================================================== diff -u -r4669 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs (.../FillEngineFromMacroStabilityWrapperInput.cs) (revision 4669) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs (.../FillEngineFromMacroStabilityWrapperInput.cs) (revision 4898) @@ -234,7 +234,7 @@ } } - private void TransferSoils(ICollection stabilityModelSoils, ICollection stabilityModelFixedSoilStresses) + private void TransferSoils(ICollection stabilityModelSoils, ICollection stabilityModelFixedSoilStresses) { SoilList = new SoilList(); foreach (MacroStability.CSharpWrapper.Input.Soil kernelSoil in stabilityModelSoils) Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r4687 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4687) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4898) @@ -847,7 +847,7 @@ layer.IsAquifer = inputLayer.IsAquifer; layer.WaterpressureInterpolationModel = ConversionHelper.ConvertToWaterpressureInterpolationModel( inputLayer.WaterpressureInterpolationModel); - + // Add OuterLoop SoilProfile2DLayer2DSurfaceOuterPoint[] outerLoop = inputLayer.Surface.OuterLoop; var isStartPoint = true; @@ -867,12 +867,14 @@ curve = new GeometryCurve(); curve.HeadPoint = point; } + isStartPoint = false; soilProfile2D.Geometry.Points.Add(point); layer.GeometrySurface.OuterLoop.CalcPoints.Add(point); } + soilProfile2D.Geometry.Loops.Add(layer.GeometrySurface.OuterLoop); - + // Add InnerLoop SoilProfile2DLayer2DSurfaceInnerPoint[] innerloop = inputLayer.Surface.Innerloop; if (innerloop != null) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs =================================================================== diff -u -r4835 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 4835) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 4898) @@ -386,7 +386,6 @@ try { - #if DEBUG foreach (MacroStabilityOutputItem stabilityOutputItem in macroStabilityOutput.StabilityOutputItems) { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs =================================================================== diff -u -r4896 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 4896) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 4898) @@ -35,7 +35,7 @@ public static class PlLinesToWaternetConverter { private const double epsilon = 1e-9; - + /// /// Converts the pl lines to a waternet. /// @@ -243,20 +243,20 @@ foreach (double xCoordinate in xCoordinatesAll) { SoilProfile1D crossSection = soilProfile.GetSoilProfile1D(xCoordinate); - // Determine if the aquifer layer is in range of the previous aquifer layer - // If not, return empty coordinates, because the aquifer layer is interrupted - SoilLayer1D currentAquifer = getSoilLayerFunc(crossSection); - if (previousAquiferLayer != null && currentAquifer != null - && !AreHorizontallyConnected(previousAquiferLayer, currentAquifer)) - { - return Enumerable.Empty(); - } + // Determine if the aquifer layer is in range of the previous aquifer layer + // If not, return empty coordinates, because the aquifer layer is interrupted + SoilLayer1D currentAquifer = getSoilLayerFunc(crossSection); + if (previousAquiferLayer != null && currentAquifer != null + && !AreHorizontallyConnected(previousAquiferLayer, currentAquifer)) + { + return Enumerable.Empty(); + } - if (currentAquifer != null) - { - previousAquiferLayer = currentAquifer; - coordinates.Add(new Point2D(xCoordinate, currentAquifer.TopLevel)); - } + if (currentAquifer != null) + { + previousAquiferLayer = currentAquifer; + coordinates.Add(new Point2D(xCoordinate, currentAquifer.TopLevel)); + } } // Perform a short validation that the coordinates are fully defined from the beginning to the end @@ -282,6 +282,7 @@ return Math.Abs(currentAquiferLeft.TopLevel - currentAquiferRight.TopLevel) > GeometryConstants.Accuracy; } } + return false; } Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs =================================================================== diff -u -r4897 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs (.../SoilProfile2DSurfaceLineHelperTests.cs) (revision 4897) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilProfile2DSurfaceLineHelperTests.cs (.../SoilProfile2DSurfaceLineHelperTests.cs) (revision 4898) @@ -33,6 +33,7 @@ { // For debugging purposes private const string visualizationFolder = @"D:\src\dam\DamTools\GeometryVisualizer\"; + [Test] [TestCase(PositionToSoilProfile2D.LeftOfSoilProfile, false)] [TestCase(PositionToSoilProfile2D.RightOfSoilProfile, false)] Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs =================================================================== diff -u -r4776 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4776) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4898) @@ -93,7 +93,7 @@ // reverse that input to the engine data var fillEngineFromMacroStabilityWrapperInput = new FillEngineFromMacroStabilityWrapperInput(); fillEngineFromMacroStabilityWrapperInput.FillDamProjectDataFromKernelModel(expectedMacrostabilityInput); - + // Then the data models are equal CompareStabilityModel(expectedParametersMStab, fillEngineFromMacroStabilityWrapperInput.FailureMechanismParametersMStab); CompareSoilModel(expectedSoilList, fillEngineFromMacroStabilityWrapperInput.SoilList); @@ -438,7 +438,7 @@ output.StabilityOutput.SafetyFactor = double.NaN; output.StabilityOutput.Messages = messagesOutput; } - + return output; } @@ -456,72 +456,72 @@ return dualSlidingCircleMinimumSafetyCurve; } - + private static List CreateSlices() + { + var slices = new List(); + for (var i = 1; i < 6; i++) { - var slices = new List(); - for (var i = 1; i < 6; i++) + var slice = new Slice { - var slice = new Slice - { - BottomLeftPoint = new MacroStability.CSharpWrapper.Point2D(-1 * i, 1 * i), - BottomRightPoint = new MacroStability.CSharpWrapper.Point2D(-2 * i, 2 * i), - TopLeftPoint = new MacroStability.CSharpWrapper.Point2D(-3 * i, 3 * i), - TopRightPoint = new MacroStability.CSharpWrapper.Point2D(-4 * i, 4 * i), - Name = "Slice" + i, - POP = 1.11 * i, - YieldStress = 2.22 * i, - OCR = 3.33 * i, - ResultantForce = 4.44 * i, - ResultantMoment = 5.55 * i, - ResultantAngle = 6.66 * i, - CohesionInput = 7.77 * i, - CohesionOutput = 8.88 * i, - FrictionAngleInput = 9.99 * i, - FrictionAngleOutput = 10.10 * i, - DilatancyInput = 11.11 * i, - SuInput = 12.12 * i, - SuOutput = 13.13 * i, - ShearStrengthModelType = ShearStrengthModelType.MohrCoulomb, - ShearStressInput = 14.14 * i, - ShearStressOutput = 15.15 * i, - Weight = 16.16 * i, - TotalPorePressure = 17.17 * i, - EffectiveStress = 18.18 * i, - HydrostaticPorePressure = 19.19 * i, - PiezometricPorePressure = 20.20 * i, - ExcessPorePressure = 21.21 * i, - DegreeOfConsolidationPorePressure = 22.22 * i, - PorePressureDueToDegreeOfConsolidationLoad = 23.23 * i, - LoadStress = 24.24 * i, - SoilStress = 25.25 * i, - TotalStress = 26.26 * i, - PorePressure = 27.27 * i, - VerticalPorePressure = 28.28 * i, - HorizontalPorePressure = 29.29 * i, - ExternalLoad = 30.30 * i, - NormalStress = 31.31 * i, - LeftForce = 32.32 * i, - LeftForceY = 33.33 * i, - LeftForceAngle = 34.34 * i, - RightForce = 35.35 * i, - RightForceY = 36.36 * i, - RightForceAngle = 37.37 * i, - HorizontalSoilQuakeStress = 38.38 * i, - VerticalSoilQuakeStress = 39.39 * i, - WaterQuakeStress = 40.40 * i, - RatioCuPc = 41.41 * i, - StrengthIncreaseExponent = 42.42 * i, - UpliftFactor = 43.43 * i, - UpliftReductionFactor = 44.44 * i, - ArcLength = 45.45 * i, - BottomAngle = 46.46 * i, - TopAngle = 47.47 * i, - Width = 48.48 * i - }; - slices.Add(slice); - } - - return slices; + BottomLeftPoint = new MacroStability.CSharpWrapper.Point2D(-1 * i, 1 * i), + BottomRightPoint = new MacroStability.CSharpWrapper.Point2D(-2 * i, 2 * i), + TopLeftPoint = new MacroStability.CSharpWrapper.Point2D(-3 * i, 3 * i), + TopRightPoint = new MacroStability.CSharpWrapper.Point2D(-4 * i, 4 * i), + Name = "Slice" + i, + POP = 1.11 * i, + YieldStress = 2.22 * i, + OCR = 3.33 * i, + ResultantForce = 4.44 * i, + ResultantMoment = 5.55 * i, + ResultantAngle = 6.66 * i, + CohesionInput = 7.77 * i, + CohesionOutput = 8.88 * i, + FrictionAngleInput = 9.99 * i, + FrictionAngleOutput = 10.10 * i, + DilatancyInput = 11.11 * i, + SuInput = 12.12 * i, + SuOutput = 13.13 * i, + ShearStrengthModelType = ShearStrengthModelType.MohrCoulomb, + ShearStressInput = 14.14 * i, + ShearStressOutput = 15.15 * i, + Weight = 16.16 * i, + TotalPorePressure = 17.17 * i, + EffectiveStress = 18.18 * i, + HydrostaticPorePressure = 19.19 * i, + PiezometricPorePressure = 20.20 * i, + ExcessPorePressure = 21.21 * i, + DegreeOfConsolidationPorePressure = 22.22 * i, + PorePressureDueToDegreeOfConsolidationLoad = 23.23 * i, + LoadStress = 24.24 * i, + SoilStress = 25.25 * i, + TotalStress = 26.26 * i, + PorePressure = 27.27 * i, + VerticalPorePressure = 28.28 * i, + HorizontalPorePressure = 29.29 * i, + ExternalLoad = 30.30 * i, + NormalStress = 31.31 * i, + LeftForce = 32.32 * i, + LeftForceY = 33.33 * i, + LeftForceAngle = 34.34 * i, + RightForce = 35.35 * i, + RightForceY = 36.36 * i, + RightForceAngle = 37.37 * i, + HorizontalSoilQuakeStress = 38.38 * i, + VerticalSoilQuakeStress = 39.39 * i, + WaterQuakeStress = 40.40 * i, + RatioCuPc = 41.41 * i, + StrengthIncreaseExponent = 42.42 * i, + UpliftFactor = 43.43 * i, + UpliftReductionFactor = 44.44 * i, + ArcLength = 45.45 * i, + BottomAngle = 46.46 * i, + TopAngle = 47.47 * i, + Width = 48.48 * i + }; + slices.Add(slice); } + + return slices; + } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs =================================================================== diff -u -r4768 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs (.../SoilProfile2DSurfaceLineHelper.cs) (revision 4768) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs (.../SoilProfile2DSurfaceLineHelper.cs) (revision 4898) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Linq; namespace Deltares.DamEngine.Data.Geotechnics; Index: DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilSurfaceProfileTests.cs =================================================================== diff -u -r4885 -r4898 --- DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilSurfaceProfileTests.cs (.../SoilSurfaceProfileTests.cs) (revision 4885) +++ DamEngine/trunk/src/Deltares.DamEngine.Data.Tests/Geotechnics/SoilSurfaceProfileTests.cs (.../SoilSurfaceProfileTests.cs) (revision 4898) @@ -34,7 +34,7 @@ { // For debugging purposes private const string visualizationFolder = @"D:\src\dam\DamTools\GeometryVisualizer\"; - + [Test, Ignore("Work in progress")] public void GivenProfile1DWithOneLayerAndSurfaceLineWhenConverToProfile2DThenCorrectSoilProfile2DIsCreated() { @@ -82,9 +82,9 @@ Assert.That(soilProfile2D.Geometry.Surfaces[1].OuterLoop.IsContinuous(), Is.True); Assert.That(soilProfile2D.Geometry.Surfaces[0].OuterLoop.IsClockWise(), Is.True); Assert.That(soilProfile2D.Geometry.Surfaces[1].OuterLoop.IsClockWise(), Is.True); - }); + }); } - + [Test] public void ConvertToSoilProfile2D_WithSurfaceLineFullyAboveSoilLayers_ReturnsExpectedSoilProfile2D() {