Index: DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs =================================================================== diff -u -r6788 -r6798 --- DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 6788) +++ DamClients/DamUI/trunk/src/Dam/Deltares.Dam.IntegrationTests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 6798) @@ -40,7 +40,7 @@ public void TestStabilityOutsideWith2DStixFiles() { string projectFilename = Path.Combine(Directory.GetCurrentDirectory(), @"TestData\StabilityOutside2DFromStixTest\BishopOutside.damx"); - List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 1); + List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, new List(), 1); Assert.That(allCalculationResults, Has.Count.EqualTo(1)); Assert.Multiple(() => @@ -100,23 +100,29 @@ [Test] public void TestStabilityOutsideWith1DProfiles() { + const string locationToCalculate = "RK212-50"; string projectFilename = Path.Combine(Directory.GetCurrentDirectory(), @"TestData\StabilityOutside1DProfileTest\Actualisatie.damx"); - List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, 59); + var locationsToCalculate = new List + { + locationToCalculate + }; + List allCalculationResults = ComputeStabilityOutsideProject(projectFilename, locationsToCalculate, 59); - Assert.That(allCalculationResults, Has.Count.EqualTo(100)); + // Only 1 location (locationToCalculate) is calculated and it has 36 profiles + Assert.That(allCalculationResults, Has.Count.EqualTo(36)); Assert.Multiple(() => { - Assert.That(allCalculationResults[1].LocationName, Is.EqualTo("RK210-560")); + Assert.That(allCalculationResults[1].LocationName, Is.EqualTo(locationToCalculate)); Assert.That(allCalculationResults[1].CalculationResult, Is.EqualTo(CalculationResult.Succeeded)); - Assert.That(allCalculationResults[1].X, Is.EqualTo(88218.047).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].Y, Is.EqualTo(448871.233).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].X, Is.EqualTo(88157.270).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].Y, Is.EqualTo(448925.910).Within(tolerance3Decimals)); Assert.That(allCalculationResults[1].AnalysisType, Is.EqualTo(AnalysisType.NoAdaption)); Assert.That(allCalculationResults[1].IsUplift, Is.EqualTo(false)); Assert.That(allCalculationResults[1].ProfileName, Is.EqualTo("Segment_1_1D2")); Assert.That(allCalculationResults[1].ProfileProbability, Is.EqualTo(2.43)); Assert.That(allCalculationResults[1].StabilityModel, Is.EqualTo(StabilityModelType.Bishop)); // In version 19.2.1, the safety factor was 1.079 - Assert.That(allCalculationResults[1].SafetyFactor, Is.EqualTo(1.129).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].SafetyFactor, Is.EqualTo(1.142).Within(tolerance3Decimals)); Assert.That(allCalculationResults[1].ShoulderHeight, Is.EqualTo(null)); Assert.That(allCalculationResults[1].ToeAtPolderX, Is.EqualTo(null)); Assert.That(allCalculationResults[1].ToeAtPolderZ, Is.EqualTo(null)); @@ -125,7 +131,7 @@ Assert.That(allCalculationResults[1].RiverLevelLow, Is.EqualTo(-2.520)); Assert.That(allCalculationResults[1].DikeTableHeight, Is.EqualTo(-2.000).Within(tolerance3Decimals)); Assert.That(allCalculationResults[1].SlopeDampingPiezometricHeightPolderSide, Is.EqualTo(0.000)); - Assert.That(allCalculationResults[1].DikeLength, Is.EqualTo(14.12).Within(tolerance3Decimals * 10)); + Assert.That(allCalculationResults[1].DikeLength, Is.EqualTo(10.73).Within(tolerance3Decimals * 10)); Assert.That(allCalculationResults[1].Pl3MinUplift, Is.EqualTo(null)); Assert.That(allCalculationResults[1].Pl3HeadAdjusted, Is.EqualTo(null)); @@ -138,9 +144,9 @@ Assert.That(allCalculationResults[1].Pl4LocationXMinUplift, Is.EqualTo(null)); Assert.That(allCalculationResults[1].Pl4LocationYMinUplift, Is.EqualTo(null)); - Assert.That(allCalculationResults[1].LocalPipingEntryPointX, Is.EqualTo(9.798).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].PipingEntryPointX, Is.EqualTo(88216.844).Within(tolerance3Decimals)); - Assert.That(allCalculationResults[1].PipingEntryPointY, Is.EqualTo(448870.287).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].LocalPipingEntryPointX, Is.EqualTo(9.581).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].PipingEntryPointX, Is.EqualTo(88158.879).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[1].PipingEntryPointY, Is.EqualTo(448927.141).Within(tolerance3Decimals)); Assert.That(allCalculationResults[1].LocalPipingExitPointX, Is.EqualTo(null)); Assert.That(allCalculationResults[1].PipingExitPointX, Is.EqualTo(null)); Assert.That(allCalculationResults[1].PipingExitPointY, Is.EqualTo(null)); @@ -155,15 +161,15 @@ // Check safety factors of few other soil profiles // In version 19.2.1, safety factors were: [4]=1.079, [8]=0.967, [10]=1.046, [11]=1.225 [12]=1.046 Assert.That(allCalculationResults[4].ProfileName, Is.EqualTo("Segment_1_1D5")); - Assert.That(allCalculationResults[4].SafetyFactor, Is.EqualTo(1.129).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[4].SafetyFactor, Is.EqualTo(1.142).Within(tolerance3Decimals)); Assert.That(allCalculationResults[8].ProfileName, Is.EqualTo("Segment_1_1D9")); - Assert.That(allCalculationResults[8].SafetyFactor, Is.EqualTo(1.049).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[8].SafetyFactor, Is.EqualTo(0.838).Within(tolerance3Decimals)); Assert.That(allCalculationResults[10].ProfileName, Is.EqualTo("Segment_1_1D11")); - Assert.That(allCalculationResults[10].SafetyFactor, Is.EqualTo(1.111).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[10].SafetyFactor, Is.EqualTo(1.000).Within(tolerance3Decimals)); Assert.That(allCalculationResults[11].ProfileName, Is.EqualTo("Segment_1_1D12")); - Assert.That(allCalculationResults[11].SafetyFactor, Is.EqualTo(1.253).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[11].SafetyFactor, Is.EqualTo(0.873).Within(tolerance3Decimals)); Assert.That(allCalculationResults[12].ProfileName, Is.EqualTo("Segment_1_1D13")); - Assert.That(allCalculationResults[12].SafetyFactor, Is.EqualTo(1.111).Within(tolerance3Decimals)); + Assert.That(allCalculationResults[12].SafetyFactor, Is.EqualTo(1.000).Within(tolerance3Decimals)); }); } @@ -173,9 +179,18 @@ /// /// /// - private static List ComputeStabilityOutsideProject(string projectFilename, int expectedLocations) + private static List ComputeStabilityOutsideProject(string projectFilename, List locationsToCalculate, + int expectedLocations) { - return ComputeHelper.ComputeStabilityProject(projectFilename, StabilityModelType.Bishop, false, expectedLocations, 1, out List _); + var computeStabilityProjectParameters = new ComputeStabilityProjectParameters + { + LocationNames = locationsToCalculate, + ModelType = StabilityModelType.Bishop, + IsStabilityInside = false, + ExpectedLocations = expectedLocations, + MaxCores = 1 + }; + return ComputeHelper.ComputeStabilityProject(projectFilename, computeStabilityProjectParameters, out List _); } } } \ No newline at end of file