Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/CalculationScenarioConversionExtensionsTest.cs
===================================================================
diff -u -rfafb2af7750af9da6d84479074522c8035fccd49 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/CalculationScenarioConversionExtensionsTest.cs (.../CalculationScenarioConversionExtensionsTest.cs) (revision fafb2af7750af9da6d84479074522c8035fccd49)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/CalculationScenarioConversionExtensionsTest.cs (.../CalculationScenarioConversionExtensionsTest.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -65,6 +65,7 @@
// Assert
Assert.AreEqual(contribution * 100, configuration.Contribution);
Assert.AreEqual(relevant, configuration.IsRelevant);
+ mocks.VerifyAll();
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensions.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensions.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensions.cs (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -0,0 +1,57 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Ringtoets.MacroStabilityInwards.Data;
+
+namespace Ringtoets.MacroStabilityInwards.IO.Configurations.Helpers
+{
+ ///
+ /// Extension methods for converting to .
+ ///
+ public static class MacroStabilityInwardsGridConversionExtensions
+ {
+ ///
+ /// Configure a new with
+ /// values taken from .
+ ///
+ /// The grid to take the values from.
+ /// A new .
+ /// Thrown when is null.
+ public static MacroStabilityInwardsGridConfiguration ToMacroStabilityInwardsGridConfiguration(this MacroStabilityInwardsGrid macroStabilityInwardsGrid)
+ {
+ if (macroStabilityInwardsGrid == null)
+ {
+ throw new ArgumentNullException(nameof(macroStabilityInwardsGrid));
+ }
+
+ return new MacroStabilityInwardsGridConfiguration
+ {
+ XLeft = macroStabilityInwardsGrid.XLeft,
+ XRight = macroStabilityInwardsGrid.XRight,
+ ZTop = macroStabilityInwardsGrid.ZTop,
+ ZBottom = macroStabilityInwardsGrid.ZBottom,
+ NumberOfHorizontalPoints = macroStabilityInwardsGrid.NumberOfHorizontalPoints,
+ NumberOfVerticalPoints = macroStabilityInwardsGrid.NumberOfVerticalPoints
+ };
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfiguration.cs
===================================================================
diff -u -r53786a32ca0132c5f6fb3281544b97fe8475d3fa -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfiguration.cs (.../MacroStabilityInwardsCalculationConfiguration.cs) (revision 53786a32ca0132c5f6fb3281544b97fe8475d3fa)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfiguration.cs (.../MacroStabilityInwardsCalculationConfiguration.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -92,6 +92,16 @@
public double? MaximumSliceWidth { get; set; }
///
+ /// Gets or sets the left grid.
+ ///
+ public MacroStabilityInwardsGridConfiguration LeftGrid { get; set; }
+
+ ///
+ /// Gets or sets the right grid.
+ ///
+ public MacroStabilityInwardsGridConfiguration RightGrid { get; set; }
+
+ ///
/// Gets or sets the name for the calculation.
///
/// Thrown when is null.
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationExporter.cs
===================================================================
diff -u -r53786a32ca0132c5f6fb3281544b97fe8475d3fa -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationExporter.cs (.../MacroStabilityInwardsCalculationConfigurationExporter.cs) (revision 53786a32ca0132c5f6fb3281544b97fe8475d3fa)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationExporter.cs (.../MacroStabilityInwardsCalculationConfigurationExporter.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -63,7 +63,9 @@
Scenario = calculation.ToScenarioConfiguration(),
SlipPlaneMinimumDepth = input.SlipPlaneMinimumDepth,
SlipPlaneMinimumLength = input.SlipPlaneMinimumLength,
- MaximumSliceWidth = input.MaximumSliceWidth
+ MaximumSliceWidth = input.MaximumSliceWidth,
+ LeftGrid = input.LeftGrid.ToMacroStabilityInwardsGridConfiguration(),
+ RightGrid = input.RightGrid.ToMacroStabilityInwardsGridConfiguration()
};
if (input.HydraulicBoundaryLocation != null)
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationWriter.cs
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationWriter.cs (.../MacroStabilityInwardsCalculationConfigurationWriter.cs) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationWriter.cs (.../MacroStabilityInwardsCalculationConfigurationWriter.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -57,6 +57,68 @@
}
///
+ /// Writes a grid configuration.
+ ///
+ /// The writer to use for writing.
+ /// The name of the location of the grid.
+ /// The configuration for the grid that can be null.
+ /// Thrown when or
+ /// is null.
+ /// Thrown when the
+ /// is closed.
+ private static void WriteGridWhenAvailable(XmlWriter writer, string gridLocationName, MacroStabilityInwardsGridConfiguration configuration)
+ {
+ if (writer == null)
+ {
+ throw new ArgumentNullException(nameof(writer));
+ }
+ if (gridLocationName == null)
+ {
+ throw new ArgumentNullException(nameof(gridLocationName));
+ }
+
+ if (configuration == null)
+ {
+ return;
+ }
+
+ writer.WriteStartElement(gridLocationName);
+
+ if (configuration.XLeft.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridXLeft,
+ XmlConvert.ToString(configuration.XLeft.Value));
+ }
+ if (configuration.XRight.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridXRight,
+ XmlConvert.ToString(configuration.XRight.Value));
+ }
+ if (configuration.ZTop.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridZTop,
+ XmlConvert.ToString(configuration.ZTop.Value));
+ }
+ if (configuration.ZBottom.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridZBottom,
+ XmlConvert.ToString(configuration.ZBottom.Value));
+ }
+ if (configuration.NumberOfVerticalPoints.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridNumberOfVerticalPoints,
+ XmlConvert.ToString(configuration.NumberOfVerticalPoints.Value));
+ }
+ if (configuration.NumberOfHorizontalPoints.HasValue)
+ {
+ writer.WriteElementString(MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.GridNumberOfHorizontalPoints,
+ XmlConvert.ToString(configuration.NumberOfHorizontalPoints.Value));
+ }
+
+ writer.WriteEndElement();
+ }
+
+ ///
/// Writes the elements of the in XML format to file.
///
/// The writer to use for writing.
@@ -81,10 +143,9 @@
MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.StochasticSoilProfileElement,
configuration.StochasticSoilProfileName);
- WriteDikeSoilScenarioWhenAvailable(
- writer,
- MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.DikeSoilScenarioElement,
- configuration.DikeSoilScenario);
+ WriteDikeSoilScenarioWhenAvailable(writer,
+ MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.DikeSoilScenarioElement,
+ configuration.DikeSoilScenario);
WriteElementWhenContentAvailable(writer,
MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.SlipPlaneMinimumDepthElement,
@@ -96,6 +157,13 @@
MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.MaximumSliceWidthElement,
configuration.MaximumSliceWidth);
+ WriteGridWhenAvailable(writer,
+ MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.LeftGridElement,
+ configuration.LeftGrid);
+ WriteGridWhenAvailable(writer,
+ MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.RightGridElement,
+ configuration.RightGrid);
+
WriteScenarioWhenAvailable(writer, configuration.Scenario);
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj
===================================================================
diff -u -r6ea49410690a01c9d6882053913633f0b0de4bb8 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj (.../Ringtoets.MacroStabilityInwards.IO.csproj) (revision 6ea49410690a01c9d6882053913633f0b0de4bb8)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.IO/Ringtoets.MacroStabilityInwards.IO.csproj (.../Ringtoets.MacroStabilityInwards.IO.csproj) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -41,6 +41,7 @@
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsTestDataGeneratorTest.cs
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsTestDataGeneratorTest.cs (.../MacroStabilityInwardsTestDataGeneratorTest.cs) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil.Test/MacroStabilityInwardsTestDataGeneratorTest.cs (.../MacroStabilityInwardsTestDataGeneratorTest.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -164,6 +164,16 @@
Assert.IsNaN(input.SlipPlaneMinimumDepth);
Assert.IsNaN(input.SlipPlaneMinimumLength);
Assert.IsNaN(input.MaximumSliceWidth);
+
+ Assert.IsNaN(input.LeftGrid.XLeft);
+ Assert.IsNaN(input.LeftGrid.XRight);
+ Assert.IsNaN(input.LeftGrid.ZTop);
+ Assert.IsNaN(input.LeftGrid.ZBottom);
+
+ Assert.IsNaN(input.RightGrid.XLeft);
+ Assert.IsNaN(input.RightGrid.XRight);
+ Assert.IsNaN(input.RightGrid.ZTop);
+ Assert.IsNaN(input.RightGrid.ZBottom);
}
[Test]
@@ -183,9 +193,20 @@
Assert.AreEqual("PK001_0001", input.SurfaceLine.Name);
Assert.AreEqual("PK001_0001_Macrostabiliteit", input.StochasticSoilModel.Name);
Assert.AreEqual("W1-6_0_1D1", input.StochasticSoilProfile.SoilProfile.Name);
+
Assert.AreEqual(double.NegativeInfinity, input.SlipPlaneMinimumDepth);
Assert.AreEqual(double.PositiveInfinity, input.SlipPlaneMinimumLength);
Assert.AreEqual(double.NegativeInfinity, input.MaximumSliceWidth);
+
+ Assert.AreEqual(double.NegativeInfinity, input.LeftGrid.XLeft);
+ Assert.AreEqual(double.PositiveInfinity, input.LeftGrid.XRight);
+ Assert.AreEqual(double.PositiveInfinity, input.LeftGrid.ZTop);
+ Assert.AreEqual(double.NegativeInfinity, input.LeftGrid.ZBottom);
+
+ Assert.AreEqual(double.NegativeInfinity, input.RightGrid.XLeft);
+ Assert.AreEqual(double.PositiveInfinity, input.RightGrid.XRight);
+ Assert.AreEqual(double.PositiveInfinity, input.RightGrid.ZTop);
+ Assert.AreEqual(double.NegativeInfinity, input.RightGrid.ZBottom);
}
private static void AssertCalculation(MacroStabilityInwardsCalculationScenario calculation,
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.TestUtil/MacroStabilityInwardsTestDataGenerator.cs (.../MacroStabilityInwardsTestDataGenerator.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -177,6 +177,16 @@
input.SlipPlaneMinimumLength = RoundedDouble.NaN;
input.MaximumSliceWidth = RoundedDouble.NaN;
+ input.LeftGrid.XLeft = RoundedDouble.NaN;
+ input.LeftGrid.XRight = RoundedDouble.NaN;
+ input.LeftGrid.ZTop = RoundedDouble.NaN;
+ input.LeftGrid.ZBottom = RoundedDouble.NaN;
+
+ input.RightGrid.XLeft = RoundedDouble.NaN;
+ input.RightGrid.XRight = RoundedDouble.NaN;
+ input.RightGrid.ZTop = RoundedDouble.NaN;
+ input.RightGrid.ZBottom = RoundedDouble.NaN;
+
return calculation;
}
@@ -204,6 +214,16 @@
input.SlipPlaneMinimumLength = (RoundedDouble) double.PositiveInfinity;
input.MaximumSliceWidth = (RoundedDouble) double.NegativeInfinity;
+ input.LeftGrid.XLeft = (RoundedDouble) double.NegativeInfinity;
+ input.LeftGrid.XRight = (RoundedDouble) double.PositiveInfinity;
+ input.LeftGrid.ZTop = (RoundedDouble) double.PositiveInfinity;
+ input.LeftGrid.ZBottom = (RoundedDouble) double.NegativeInfinity;
+
+ input.RightGrid.XLeft = (RoundedDouble) double.NegativeInfinity;
+ input.RightGrid.XRight = (RoundedDouble) double.PositiveInfinity;
+ input.RightGrid.ZTop = (RoundedDouble) double.PositiveInfinity;
+ input.RightGrid.ZBottom = (RoundedDouble) double.NegativeInfinity;
+
return calculation;
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensionsTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensionsTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/Helpers/MacroStabilityInwardsGridConversionExtensionsTest.cs (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -0,0 +1,73 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.Common.Data.TestUtil;
+using Ringtoets.MacroStabilityInwards.Data;
+using Ringtoets.MacroStabilityInwards.IO.Configurations;
+using Ringtoets.MacroStabilityInwards.IO.Configurations.Helpers;
+
+namespace Ringtoets.MacroStabilityInwards.IO.Test.Configurations.Helpers
+{
+ [TestFixture]
+ public class MacroStabilityInwardsGridConversionExtensionsTest
+ {
+ [Test]
+ public void ToMacroStabilityInwardsGridConfiguration_MacroStabilityInwardsGridNull_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => ((MacroStabilityInwardsGrid) null).ToMacroStabilityInwardsGridConfiguration();
+
+ // Assert
+ var exception = Assert.Throws(test);
+ Assert.AreEqual("macroStabilityInwardsGrid", exception.ParamName);
+ }
+
+ [Test]
+ public void ToMacroStabilityInwardsGridConfiguration_ValidMacroStabilityInwardsGrid_ReturnsNewMacroStabilityInwardsGridConfigurationWithParametersSet()
+ {
+ // Setup
+ var random = new Random(31);
+
+ var grid = new MacroStabilityInwardsGrid(random.NextRoundedDouble(0.0, 1.0),
+ random.NextRoundedDouble(2.0, 3.0),
+ random.NextRoundedDouble(2.0, 3.0),
+ random.NextRoundedDouble(0.0, 1.0))
+ {
+ NumberOfHorizontalPoints = random.Next(1, 100),
+ NumberOfVerticalPoints = random.Next(1, 100)
+ };
+
+ // Call
+ MacroStabilityInwardsGridConfiguration configuration = grid.ToMacroStabilityInwardsGridConfiguration();
+
+ // Assert
+ Assert.AreEqual(grid.XLeft, configuration.XLeft, grid.XLeft.GetAccuracy());
+ Assert.AreEqual(grid.XRight, configuration.XRight, grid.XRight.GetAccuracy());
+ Assert.AreEqual(grid.ZTop, configuration.ZTop, grid.ZTop.GetAccuracy());
+ Assert.AreEqual(grid.ZBottom, configuration.ZBottom, grid.ZBottom.GetAccuracy());
+ Assert.AreEqual(grid.NumberOfHorizontalPoints, configuration.NumberOfHorizontalPoints);
+ Assert.AreEqual(grid.NumberOfVerticalPoints, configuration.NumberOfVerticalPoints);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationTest.cs
===================================================================
diff -u -r53786a32ca0132c5f6fb3281544b97fe8475d3fa -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationTest.cs (.../MacroStabilityInwardsCalculationConfigurationTest.cs) (revision 53786a32ca0132c5f6fb3281544b97fe8475d3fa)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationTest.cs (.../MacroStabilityInwardsCalculationConfigurationTest.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -61,6 +61,8 @@
Assert.IsNull(configuration.SlipPlaneMinimumDepth);
Assert.IsNull(configuration.SlipPlaneMinimumLength);
Assert.IsNull(configuration.MaximumSliceWidth);
+ Assert.IsNull(configuration.LeftGrid);
+ Assert.IsNull(configuration.RightGrid);
}
[Test]
@@ -79,6 +81,8 @@
const double maximumSliceWidth = 4.4;
var scenarioConfiguration = new ScenarioConfiguration();
+ var leftGrid = new MacroStabilityInwardsGridConfiguration();
+ var rightGrid = new MacroStabilityInwardsGridConfiguration();
// Call
var configuration = new MacroStabilityInwardsCalculationConfiguration(calculationName)
@@ -92,7 +96,9 @@
DikeSoilScenario = dikeSoilScenario,
SlipPlaneMinimumDepth = slipPlaneMinimumDepth,
SlipPlaneMinimumLength = slipPlaneMinimumLength,
- MaximumSliceWidth = maximumSliceWidth
+ MaximumSliceWidth = maximumSliceWidth,
+ LeftGrid = leftGrid,
+ RightGrid = rightGrid
};
// Assert
@@ -107,6 +113,8 @@
Assert.AreEqual(slipPlaneMinimumDepth, configuration.SlipPlaneMinimumDepth);
Assert.AreEqual(slipPlaneMinimumLength, configuration.SlipPlaneMinimumLength);
Assert.AreEqual(maximumSliceWidth, configuration.MaximumSliceWidth);
+ Assert.AreSame(leftGrid, configuration.LeftGrid);
+ Assert.AreSame(rightGrid, configuration.RightGrid);
}
[Test]
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationWriterTest.cs
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationWriterTest.cs (.../MacroStabilityInwardsCalculationConfigurationWriterTest.cs) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Configurations/MacroStabilityInwardsCalculationConfigurationWriterTest.cs (.../MacroStabilityInwardsCalculationConfigurationWriterTest.cs) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -85,15 +85,33 @@
SurfaceLineName = "PK001_0001",
StochasticSoilModelName = "PK001_0001_Macrostabiliteit",
StochasticSoilProfileName = "W1-6_0_1D1",
+ DikeSoilScenario = ConfigurationDikeSoilScenario.ClayDikeOnSand,
+ SlipPlaneMinimumDepth = 0.4,
+ SlipPlaneMinimumLength = 0.5,
+ MaximumSliceWidth = 0.6,
+ LeftGrid = new MacroStabilityInwardsGridConfiguration
+ {
+ XLeft = 1.0,
+ XRight = 1.2,
+ ZTop = 1.3,
+ ZBottom = 1.4,
+ NumberOfVerticalPoints = 0,
+ NumberOfHorizontalPoints = 1
+ },
+ RightGrid = new MacroStabilityInwardsGridConfiguration
+ {
+ XLeft = 10.0,
+ XRight = 10.2,
+ ZTop = 10.3,
+ ZBottom = 10.4,
+ NumberOfVerticalPoints = 5,
+ NumberOfHorizontalPoints = 10
+ },
Scenario = new ScenarioConfiguration
{
IsRelevant = true,
Contribution = 0.3
- },
- DikeSoilScenario = ConfigurationDikeSoilScenario.ClayDikeOnSand,
- SlipPlaneMinimumDepth = 0.4,
- SlipPlaneMinimumLength = 0.5,
- MaximumSliceWidth = 0.6
+ }
};
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj
===================================================================
diff -u -r6ea49410690a01c9d6882053913633f0b0de4bb8 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj (.../Ringtoets.MacroStabilityInwards.IO.Test.csproj) (revision 6ea49410690a01c9d6882053913633f0b0de4bb8)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/Ringtoets.MacroStabilityInwards.IO.Test.csproj (.../Ringtoets.MacroStabilityInwards.IO.Test.csproj) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -64,6 +64,7 @@
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationIrrelevant.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationIrrelevant.xml (.../calculationIrrelevant.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationIrrelevant.xml (.../calculationIrrelevant.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -9,6 +9,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
false
50
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithAssessmentLevel.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithAssessmentLevel.xml (.../calculationWithAssessmentLevel.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithAssessmentLevel.xml (.../calculationWithAssessmentLevel.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -9,6 +9,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithInfinities.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithInfinities.xml (.../calculationWithInfinities.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithInfinities.xml (.../calculationWithInfinities.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -9,6 +9,22 @@
-INF
INF
-INF
+
+ -INF
+ INF
+ INF
+ -INF
+ 5
+ 5
+
+
+ -INF
+ INF
+ INF
+ -INF
+ 5
+ 5
+
true
INF
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithNaNs.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithNaNs.xml (.../calculationWithNaNs.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithNaNs.xml (.../calculationWithNaNs.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -9,6 +9,22 @@
NaN
NaN
NaN
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
NaN
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutHydraulicLocation.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutHydraulicLocation.xml (.../calculationWithoutHydraulicLocation.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutHydraulicLocation.xml (.../calculationWithoutHydraulicLocation.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -8,6 +8,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilProfile.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilProfile.xml (.../calculationWithoutSoilProfile.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilProfile.xml (.../calculationWithoutSoilProfile.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -8,6 +8,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilmodel.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilmodel.xml (.../calculationWithoutSoilmodel.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSoilmodel.xml (.../calculationWithoutSoilmodel.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -7,6 +7,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSurfaceline.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSurfaceline.xml (.../calculationWithoutSurfaceline.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/calculationWithoutSurfaceline.xml (.../calculationWithoutSurfaceline.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -8,6 +8,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/folderWithSubfolderAndCalculation.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/folderWithSubfolderAndCalculation.xml (.../folderWithSubfolderAndCalculation.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationExporter/folderWithSubfolderAndCalculation.xml (.../folderWithSubfolderAndCalculation.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -10,6 +10,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
@@ -25,6 +41,22 @@
0.4
0.5
0.6
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
+
+ NaN
+ NaN
+ NaN
+ NaN
+ 5
+ 5
+
true
100
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationWriter/folderWithSubfolderAndCalculation.xml
===================================================================
diff -u -r7d4a5ea0881e014dcdca60378286858959b88395 -ra5faeca3e4415a2ad45d339f8831e3d3614dcb54
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationWriter/folderWithSubfolderAndCalculation.xml (.../folderWithSubfolderAndCalculation.xml) (revision 7d4a5ea0881e014dcdca60378286858959b88395)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/MacroStabilityInwardsCalculationConfigurationWriter/folderWithSubfolderAndCalculation.xml (.../folderWithSubfolderAndCalculation.xml) (revision a5faeca3e4415a2ad45d339f8831e3d3614dcb54)
@@ -11,6 +11,22 @@
0.4
0.5
0.6
+
+ 1
+ 1.2
+ 1.3
+ 1.4
+ 0
+ 1
+
+
+ 10
+ 10.2
+ 10.3
+ 10.4
+ 5
+ 10
+
true
0.3