Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs =================================================================== diff -u -r4053 -r4132 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs (.../MultiCoreMacroStabilityTests.cs) (revision 4053) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MultiCoreMacroStabilityTests.cs (.../MultiCoreMacroStabilityTests.cs) (revision 4132) @@ -22,9 +22,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Linq; using System.Text; +using System.Threading; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; @@ -35,140 +37,118 @@ namespace Deltares.DamEngine.IntegrationTests.IntegrationTests; [TestFixture] -[Ignore("Test disabled due to removal of the old MacroStability kernel wrapper implementation and because it uses sti files")] public class MultiCoreMacroStabilityTests { - private const double tolerance = 0.0005; + private const string mapTestFiles = @"TestFiles\"; + const string testWorkingFolder = @"MultiCore\"; - [Test, Category("MultiCore")] - [TestCase(MStabModelType.Bishop, AnalysisType.NoAdaption)] - [TestCase(MStabModelType.UpliftVan, AnalysisType.NoAdaption)] - [TestCase(MStabModelType.BishopUpliftVan, AnalysisType.NoAdaption)] - [TestCase(MStabModelType.Bishop, AnalysisType.AdaptGeometry)] - [TestCase(MStabModelType.UpliftVan, AnalysisType.AdaptGeometry)] - public void CanPerformRunMacroStabilityTutorialDesignMultiCore(MStabModelType mStabModelType, AnalysisType analysisType) + [SetUp] + public void Setup()// Fixture() { - // Based on ".data\DamEngineTestProjects\DAM Tutorial Design\DAM Tutorial Design.damx" - // with Dam Classic rev.1059 - // Select locations DWP_1 to DWP_12 - const int multiCoreCount = 4; - const string fileName = @"TestFiles\MacroStabilityTutorialDesignInputFileMultipleLocations.xml"; - const string fileNameOutputPrefix = @"TestFiles\MacroStabilityTutorialDesignMultipleLocations"; - string inputString = File.ReadAllText(fileName); - inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used - inputString = XmlAdapter.ChangeValueInXml(inputString, "MapForSoilgeometries2D", @"TestFiles\DAM Tutorial Design.geometries2D.0\"); - inputString = XmlAdapter.ChangeValueInXml(inputString, "SoilDatabaseName", @"TestFiles\DAM Tutorial Design0.soilmaterials.mdb"); - inputString = XmlAdapter.ChangeValueInXml(inputString, "StabilityModelType", mStabModelType.ToString()); - inputString = XmlAdapter.ChangeValueInXml(inputString, "AnalysisType", analysisType.ToString()); + RemoveTestWorkingDirectory(testWorkingFolder); // to be sure no test directory exist from previous tests + } - // Calculate one core - string calcDir = $"TestStabInwards_{mStabModelType.ToString()}_{analysisType.ToString()}_{1}Core"; - string outputFilename = DetermineOutputFilename(fileNameOutputPrefix, mStabModelType.ToString(), analysisType.ToString(), 1); - string outputString; - EngineInterface engineInterface; - // Following line to force 1-core calculation to be performed always. - // Outcomment it to prevent 1-core calculation to be performed if it as already done in a previous run, to speed up the test. - if (File.Exists(outputFilename)) - { - File.Delete(outputFilename); - } + [TearDown] + public void TearDown()//Fixture() + { + RemoveTestWorkingDirectory(testWorkingFolder); // to be sure no test directory exist after the tests + } - if (File.Exists(outputFilename)) + [Test] + [TestCase("OperationalBishopGrid1Core.xml")] + [TestCase("OperationalBishopGrid2Cores.xml")] + [TestCase("OperationalBishopGrid4Cores.xml")] + [TestCase("OperationalBishopGrid8Cores.xml")] + [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); + var engineInterface = new EngineInterface(inputString); + Assert.IsNotNull(engineInterface.DamProjectData); + engineInterface.DamProjectData.ProjectPath = @"MultiCore\"; + string result = engineInterface.Validate(); + Assert.IsTrue(result == null, "Validation must succeed but does not, see output xml in debugger"); + string outputString = engineInterface.Run(); + File.WriteAllText("Output.xml", outputString); + Output output = DamXmlSerialization.LoadOutputFromXmlString(outputString); + if (engineInterface.DamProjectData.DamProjectType == DamProjectType.Design) { - // This is to speed up local testing; after the first run the file will be read from disk. - // If something in the calculation results changes, the file has to be deleted (see line above) - // It will then be generated again in the else block of this statement - outputString = File.ReadAllText(outputFilename); - Debug.WriteLine("Skipping single core calculation Macrostability; results are read from file"); + Assert.AreNotEqual(null, output.Results.CalculationResults); } else { - inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used - if (Directory.Exists(calcDir)) + Assert.AreEqual(8, output.Results.OperationalOutputTimeSeries.Length); + int numberOfResults = 0; + int numberOfRealResults = 0; + foreach (TimeSerie resultSerie in output.Results.OperationalOutputTimeSeries) { - Directory.Delete(calcDir, true); // delete previous results + numberOfResults += resultSerie.Entries.TimeSerieEntry.Length; + foreach (TimeSerieEntriesTimeSerieEntry timeSerieEntriesTimeSerieEntry in resultSerie.Entries.TimeSerieEntry) + { + if (!Double.IsNaN(timeSerieEntriesTimeSerieEntry.Value)) + { + numberOfRealResults++; + } + } } - - Directory.CreateDirectory(calcDir); - Debug.WriteLine("Perform single core calculation Macrostability"); - engineInterface = new EngineInterface(inputString); - Assert.IsNotNull(engineInterface.DamProjectData); - outputString = engineInterface.Run(); - Assert.IsNotNull(outputString); - File.WriteAllText(outputFilename, outputString, Encoding.Unicode); + Assert.AreEqual(16, numberOfResults); + Assert.AreEqual(16, numberOfRealResults); } + } - Output outputOneCore = DamXmlSerialization.LoadOutputFromXmlString(outputString); - - // Calculate multicore - calcDir = $"TestStabInwards_{mStabModelType.ToString()}_{analysisType.ToString()}_{multiCoreCount}Core"; - outputFilename = DetermineOutputFilename(fileNameOutputPrefix, mStabModelType.ToString(), analysisType.ToString(), multiCoreCount); - // Following line to force multicore calculation to be performed always. - // Outcomment it to prevent multicore calculation to be performed if it as already done in a previous run, to speed up the test. - if (File.Exists(outputFilename)) + [Test]//, Ignore("This test is only used for debugging XML files generated by Dam UI")] + [TestCase("DesignBishopGrid1Core.xml")] + [TestCase("DesignBishopGrid2Cores.xml")] + [TestCase("DesignBishopGrid4Cores.xml")] + [TestCase("DesignBishopGrid8Cores.xml")] + [TestCase("DesignBishopGrid18Cores.xml")] + public void DebugDesignWithXmlInputFile(string aFileName) + { + string fullInputFilename = Path.Combine(mapTestFiles, aFileName); + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + string inputString = File.ReadAllText(fullInputFilename); + var engineInterface = new EngineInterface(inputString); + Assert.IsNotNull(engineInterface.DamProjectData); + engineInterface.DamProjectData.ProjectPath = @"MultiCore\"; + string result = engineInterface.Validate(); + Assert.IsTrue(result == null, "Validation must succeed but does not, see output xml in debugger"); + string outputString = engineInterface.Run(); + File.WriteAllText("Output.xml", outputString); + Output output = DamXmlSerialization.LoadOutputFromXmlString(outputString); + if (engineInterface.DamProjectData.DamProjectType == DamProjectType.Design) { - File.Delete(outputFilename); + Assert.AreNotEqual(null, output.Results.CalculationResults); } - - if (File.Exists(outputFilename)) - { - // This is to speed up local testing; after the first run the file will be read from disk. - // If something in the calculation results changes, the file has to be deleted (see line above) - // It will then be generated again in the else block of this statement - outputString = File.ReadAllText(outputFilename); - Debug.WriteLine("Skipping multicore calculation Macrostability; results are read from file"); - } else { - inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used - inputString = XmlAdapter.ChangeValueInXml(inputString, "MaxCalculationCores", multiCoreCount.ToString()); - if (Directory.Exists(calcDir)) + Assert.AreEqual(8, output.Results.OperationalOutputTimeSeries.Length); + int numberOfResults = 0; + int numberOfRealResults = 0; + foreach (TimeSerie resultSerie in output.Results.OperationalOutputTimeSeries) { - Directory.Delete(calcDir, true); // delete previous results - } - - Directory.CreateDirectory(calcDir); - Debug.WriteLine("Perform multicore calculation with {0} cores Macrostability", multiCoreCount); - engineInterface = new EngineInterface(inputString); - Assert.IsNotNull(engineInterface.DamProjectData); - outputString = engineInterface.Run(); - Assert.IsNotNull(outputString); - File.WriteAllText(outputFilename, outputString, Encoding.Unicode); - } - - Output outputMultiCore = DamXmlSerialization.LoadOutputFromXmlString(outputString); - - // Compare the results - var differences = new List(); - var differencesStringBuilder = new StringBuilder(); - foreach (DesignResult oneCoreResult in outputOneCore.Results.CalculationResults) - { - DesignResult multiCoreResult = outputMultiCore.Results.CalculationResults.FirstOrDefault(x => - x.LocationName.Equals(oneCoreResult.LocationName) && - x.ProfileName.Equals(oneCoreResult.ProfileName) && - x.StabilityDesignResults.StabilityModelType == oneCoreResult.StabilityDesignResults.StabilityModelType); - if (multiCoreResult == null) - { - string diffString = $"No multicore result in location '{oneCoreResult.LocationName}', soilprofile '{oneCoreResult.ProfileName}'"; - differencesStringBuilder.AppendLine(diffString); - differences.Add(diffString); - } - else - { - if (Math.Abs(oneCoreResult.StabilityDesignResults.SafetyFactor - multiCoreResult.StabilityDesignResults.SafetyFactor) > tolerance) + numberOfResults += resultSerie.Entries.TimeSerieEntry.Length; + foreach (TimeSerieEntriesTimeSerieEntry timeSerieEntriesTimeSerieEntry in resultSerie.Entries.TimeSerieEntry) { - string diffString = $"Different result in location '{oneCoreResult.LocationName}', soilprofile '{oneCoreResult.ProfileName}': 1 core = {oneCoreResult.StabilityDesignResults.SafetyFactor}, multicore = {multiCoreResult.StabilityDesignResults.SafetyFactor}"; - differencesStringBuilder.AppendLine(diffString); - differences.Add(diffString); + if (!Double.IsNaN(timeSerieEntriesTimeSerieEntry.Value)) + { + numberOfRealResults++; + } } } + Assert.AreEqual(16, numberOfResults); + Assert.AreEqual(16, numberOfRealResults); } - - Assert.IsTrue(differences.Count == 0, "Differences found" + Environment.NewLine + differencesStringBuilder); } - private string DetermineOutputFilename(string prefix, string modelType, string analysisType, int coreCount, string extension = ".xml") + private static void RemoveTestWorkingDirectory(string testWorkingFolder) { - return $"{prefix}_{modelType}_{analysisType}_{coreCount}core_OutputFile{extension}"; + if (Directory.Exists(testWorkingFolder)) + { + const bool recursive = true; + Directory.Delete(testWorkingFolder, recursive); + } } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r4076 -r4132 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4076) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 4132) @@ -35,6 +35,21 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -80,6 +95,21 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid1Core.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid1Core.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid1Core.xml (revision 4132) @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs =================================================================== diff -u -r4053 -r4132 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 4053) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 4132) @@ -188,7 +188,7 @@ /// /// The date time. /// - public static string DateToTimeStamp(DateTime dateTime) + public string DateToTimeStamp(DateTime dateTime) { // Following 2 lines is an example how to handle customization of this format. // TNO at the last moment decided they did not need this change so we change it back to @@ -291,6 +291,7 @@ out CalculationResult calculationResult, List calculationMessages) { + // Perform validation var designResults = new List(); var locationCalculationMessages = new List(); @@ -327,7 +328,10 @@ calculationResult = CalculationResult.Succeeded; kernelWrapper.PostProcess(damKernelInput, kernelDataOutput, null, resultMessage, out designResults); - timeSerieEntry.Value = designResults[0].SafetyFactor.Value; + if (designResults.Count > 0) + { + timeSerieEntry.Value = designResults[0].SafetyFactor.Value; + } } catch (Exception exception) { @@ -485,7 +489,7 @@ /// /// The sensor. /// if set to true [has series by sensor ID]. - private static void ThrowIfSensorNotExists(Sensor sensor, bool hasSeriesBySensorID) + private void ThrowIfSensorNotExists(Sensor sensor, bool hasSeriesBySensorID) { if (!hasSeriesBySensorID) { @@ -503,7 +507,7 @@ /// The first series entries. /// The time series. /// if set to true [has first series entries]. - private static void ThrowIfTimeEntryCountDontMatch(HashSet firstSeriesEntries, TimeSerie timeSeries, + private void ThrowIfTimeEntryCountDontMatch(HashSet firstSeriesEntries, TimeSerie timeSeries, bool hasFirstSeriesEntries) { if (hasFirstSeriesEntries) @@ -534,7 +538,7 @@ } } - private static void ThrowIfTimeEntriesKeysDontMatch(DateTime key, HashSet firstSeriesEntries) + private void ThrowIfTimeEntriesKeysDontMatch(DateTime key, HashSet firstSeriesEntries) { // TODO log info if (!firstSeriesEntries.Contains(key)) Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid1Core.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid1Core.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid1Core.xml (revision 4132) @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid2Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid2Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid2Cores.xml (revision 4132) @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid18Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid18Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid18Cores.xml (revision 4132) @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid8Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid8Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid8Cores.xml (revision 4132) @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid2Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid2Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid2Cores.xml (revision 4132) @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid4Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid4Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid4Cores.xml (revision 4132) @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs =================================================================== diff -u -r4052 -r4132 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs (.../Routines2D.cs) (revision 4052) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Routines2D.cs (.../Routines2D.cs) (revision 4132) @@ -251,8 +251,7 @@ } } - int polygonPoints = polygon.CalcPoints.Count; - if (polygonPoints > 2) + if (polygon.CalcPoints.Count > 2) { double deltaX = polygon[0].X - x; double deltaZ = polygon[0].Z - z; @@ -268,7 +267,7 @@ double som = 0; var index = 1; - while (index < polygonPoints) + while (index < polygon.CalcPoints.Count) { deltaX = polygon[index].X - x; deltaZ = polygon[index].Z - z; Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid8Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid8Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/OperationalBishopGrid8Cores.xml (revision 4132) @@ -0,0 +1,682 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid4Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid4Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid4Cores.xml (revision 4132) @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid18Cores.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid18Cores.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/DesignBishopGrid18Cores.xml (revision 4132) @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file