Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs =================================================================== diff -u -reb77464397a17cc0a006933b6d9bfeb5cfba3d66 -r991a9bc3bb36370b7be134369211b0edfd1b227e --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision eb77464397a17cc0a006933b6d9bfeb5cfba3d66) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) @@ -69,6 +69,12 @@ DikeSoilScenario = properties.DikeSoilScenario; MoveGrid = properties.MoveGrid; MaximumSliceWidth = properties.MaximumSliceWidth; + GridAutomaticDetermined = properties.GridAutomaticDetermined; + LeftGrid = properties.LeftGrid; + RightGrid = properties.RightGrid; + TangentLineAutomaticAtBoundaries = properties.TangentLineAutomaticAtBoundaries; + TangentLineZTop = properties.TangentLineZTop; + TangentLineZBottom = properties.TangentLineZBottom; } public class ConstructionProperties @@ -79,8 +85,6 @@ public ConstructionProperties() { AssessmentLevel = double.NaN; - SurfaceLine = null; - SoilProfile = null; WaterLevelRiverAverage = double.NaN; WaterLevelPolder = double.NaN; XCoordinateDrainageConstruction = double.NaN; @@ -94,11 +98,14 @@ LeakageLengthOutwardsPhreaticLine3 = double.NaN; LeakageLengthInwardsPhreaticLine3 = double.NaN; LeakageLengthOutwardsPhreaticLine4 = double.NaN; + LeakageLengthInwardsPhreaticLine4 = double.NaN; PiezometricHeadPhreaticLine2Outwards = double.NaN; PiezometricHeadPhreaticLine2Inwards = double.NaN; PenetrationLength = double.NaN; DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay; MaximumSliceWidth = double.NaN; + TangentLineZTop = double.NaN; + TangentLineZBottom = double.NaN; } #region properties @@ -247,11 +254,43 @@ public bool MoveGrid { internal get; set; } /// - /// Gets the maximum slice width. + /// Gets or sets the maximum slice width. /// [m] /// public double MaximumSliceWidth { internal get; set; } + /// + /// Gets or sets whether the grid is automatic determined or not. + /// + public bool GridAutomaticDetermined { internal get; set; } + + /// + /// Gets or sets the left grid. + /// + public MacroStabilityInwardsGrid LeftGrid { internal get; set; } + + /// + /// Gets or sets the right grid. + /// + public MacroStabilityInwardsGrid RightGrid { internal get; set; } + + /// + /// Gets or sets whether the tangent line boundaries should be defined automatically. + /// + public bool TangentLineAutomaticAtBoundaries { internal get; set; } + + /// + /// Gets or sets the tangent line z top. + /// [m+NAP] + /// + public double TangentLineZTop { internal get; set; } + + /// + /// Gets or sets the tangent line z bottom. + /// [m+NAP] + /// + public double TangentLineZBottom { internal get; set; } + #endregion } @@ -406,6 +445,38 @@ /// public double MaximumSliceWidth { get; } + /// + /// Gets whether the grid is automatic determined or not. + /// + public bool GridAutomaticDetermined { get; } + + /// + /// Gets the left grid. + /// + public MacroStabilityInwardsGrid LeftGrid { get; } + + /// + /// Gets the right grid. + /// + public MacroStabilityInwardsGrid RightGrid { get; } + + /// + /// Gets whether the tangent line boundaries should be defined automatically. + /// + public bool TangentLineAutomaticAtBoundaries { get; } + + /// + /// Gets the tangent line z top. + /// [m+NAP] + /// + public double TangentLineZTop { get; } + + /// + /// Gets the tangent line z bottom. + /// [m+NAP] + /// + public double TangentLineZBottom { get; } + #endregion } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs =================================================================== diff -u -r67d3117861b4e393093753aaa3e9a28125a4a74f -r991a9bc3bb36370b7be134369211b0edfd1b227e --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 67d3117861b4e393093753aaa3e9a28125a4a74f) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) @@ -167,7 +167,36 @@ { AssessmentLevel = inputParameters.AssessmentLevel, SurfaceLine = inputParameters.SurfaceLine, - SoilProfile = inputParameters.SoilProfileUnderSurfaceLine + SoilProfile = inputParameters.SoilProfileUnderSurfaceLine, + DikeSoilScenario = inputParameters.DikeSoilScenario, + WaterLevelRiverAverage = inputParameters.WaterLevelRiverAverage, + WaterLevelPolder = inputParameters.WaterLevelPolder, + XCoordinateDrainageConstruction = inputParameters.XCoordinateDrainageConstruction, + ZCoordinateDrainageConstruction = inputParameters.ZCoordinateDrainageConstruction, + MinimumLevelPhreaticLineAtDikeTopRiver = inputParameters.MinimumLevelPhreaticLineAtDikeTopRiver, + MinimumLevelPhreaticLineAtDikeTopPolder = inputParameters.MinimumLevelPhreaticLineAtDikeTopPolder, + PhreaticLineOffsetBelowDikeTopAtRiver = inputParameters.PhreaticLineOffsetBelowDikeTopAtRiver, + PhreaticLineOffsetBelowDikeTopAtPolder = inputParameters.PhreaticLineOffsetBelowDikeTopAtPolder, + PhreaticLineOffsetBelowShoulderBaseInside = inputParameters.PhreaticLineOffsetBelowShoulderBaseInside, + PhreaticLineOffsetBelowDikeToeAtPolder = inputParameters.PhreaticLineOffsetBelowDikeToeAtPolder, + LeakageLengthOutwardsPhreaticLine3 = inputParameters.LeakageLengthOutwardsPhreaticLine3, + LeakageLengthInwardsPhreaticLine3 = inputParameters.LeakageLengthInwardsPhreaticLine3, + LeakageLengthOutwardsPhreaticLine4 = inputParameters.LeakageLengthOutwardsPhreaticLine4, + LeakageLengthInwardsPhreaticLine4 = inputParameters.LeakageLengthInwardsPhreaticLine4, + PiezometricHeadPhreaticLine2Outwards = inputParameters.PiezometricHeadPhreaticLine2Outwards, + PiezometricHeadPhreaticLine2Inwards = inputParameters.PiezometricHeadPhreaticLine2Inwards, + PenetrationLength = inputParameters.PenetrationLength, + DrainageConstructionPresent = inputParameters.DrainageConstructionPresent, + AdjustPhreaticLine3And4ForUplift = inputParameters.AdjustPhreaticLine3And4ForUplift, + UseDefaultOffsets = inputParameters.UseDefaultOffsets, + MoveGrid = inputParameters.MoveGrid, + MaximumSliceWidth = inputParameters.MaximumSliceWidth, + GridAutomaticDetermined = inputParameters.GridDetermination == MacroStabilityInwardsGridDetermination.Automatic, + LeftGrid = inputParameters.LeftGrid, + RightGrid = inputParameters.RightGrid, + TangentLineAutomaticAtBoundaries = inputParameters.TangentLineDetermination == MacroStabilityInwardsTangentLineDetermination.LayerSeparated, + TangentLineZTop = inputParameters.TangentLineZTop, + TangentLineZBottom = inputParameters.TangentLineZBottom }); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs =================================================================== diff -u -reb77464397a17cc0a006933b6d9bfeb5cfba3d66 -r991a9bc3bb36370b7be134369211b0edfd1b227e --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision eb77464397a17cc0a006933b6d9bfeb5cfba3d66) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) @@ -81,6 +81,13 @@ bool drainageConstructionPresent = random.NextBoolean(); var dikeSoilScenario = random.NextEnumValue(); bool moveGrid = random.NextBoolean(); + double maximumSliceWidth = random.NextDouble(); + bool gridAutomaticDetermined = random.NextBoolean(); + var leftGrid = new MacroStabilityInwardsGrid(); + var rightGrid = new MacroStabilityInwardsGrid(); + bool tangentLineAutomaticAtBoundaries = random.NextBoolean(); + double tangentLineZTop = random.NextDouble(); + double tangentLineZBottom = random.NextDouble(); // Call var input = new MacroStabilityInwardsCalculatorInput( @@ -110,7 +117,14 @@ AdjustPhreaticLine3And4ForUplift = adjustPhreaticLine3And4ForUplift, DrainageConstructionPresent = drainageConstructionPresent, DikeSoilScenario = dikeSoilScenario, - MoveGrid = moveGrid + MoveGrid = moveGrid, + MaximumSliceWidth = maximumSliceWidth, + GridAutomaticDetermined = gridAutomaticDetermined, + LeftGrid = leftGrid, + RightGrid = rightGrid, + TangentLineAutomaticAtBoundaries = tangentLineAutomaticAtBoundaries, + TangentLineZTop = tangentLineZTop, + TangentLineZBottom = tangentLineZBottom }); // Assert @@ -141,6 +155,60 @@ Assert.AreEqual(dikeSoilScenario, input.DikeSoilScenario); Assert.AreEqual(moveGrid, input.MoveGrid); + Assert.AreEqual(maximumSliceWidth, input.MaximumSliceWidth); + Assert.AreEqual(gridAutomaticDetermined, input.GridAutomaticDetermined); + + Assert.AreSame(leftGrid, input.LeftGrid); + Assert.AreSame(rightGrid, input.RightGrid); + + Assert.AreEqual(tangentLineAutomaticAtBoundaries, input.TangentLineAutomaticAtBoundaries); + Assert.AreEqual(tangentLineZTop, input.TangentLineZTop); + Assert.AreEqual(tangentLineZBottom, input.TangentLineZBottom); } + + [Test] + public void Constructor_EmptyConstrutionProperties_ExpectedValues() + { + // Call + var input = new MacroStabilityInwardsCalculatorInput( + new MacroStabilityInwardsCalculatorInput.ConstructionProperties()); + + // Assert + Assert.IsNull(input.SurfaceLine); + Assert.IsNull(input.SoilProfile); + Assert.IsNull(input.LeftGrid); + Assert.IsNull(input.RightGrid); + + Assert.IsNaN(input.AssessmentLevel); + Assert.IsNaN(input.WaterLevelRiverAverage); + Assert.IsNaN(input.WaterLevelPolder); + Assert.IsNaN(input.XCoordinateDrainageConstruction); + Assert.IsNaN(input.ZCoordinateDrainageConstruction); + Assert.IsNaN(input.MinimumLevelPhreaticLineAtDikeTopRiver); + Assert.IsNaN(input.MinimumLevelPhreaticLineAtDikeTopPolder); + Assert.IsNaN(input.PhreaticLineOffsetBelowDikeTopAtRiver); + Assert.IsNaN(input.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.IsNaN(input.PhreaticLineOffsetBelowShoulderBaseInside); + Assert.IsNaN(input.PhreaticLineOffsetBelowDikeToeAtPolder); + Assert.IsNaN(input.LeakageLengthOutwardsPhreaticLine3); + Assert.IsNaN(input.LeakageLengthInwardsPhreaticLine3); + Assert.IsNaN(input.LeakageLengthOutwardsPhreaticLine4); + Assert.IsNaN(input.LeakageLengthInwardsPhreaticLine4); + Assert.IsNaN(input.PiezometricHeadPhreaticLine2Outwards); + Assert.IsNaN(input.PiezometricHeadPhreaticLine2Inwards); + Assert.IsNaN(input.PenetrationLength); + Assert.IsNaN(input.MaximumSliceWidth); + Assert.IsNaN(input.TangentLineZTop); + Assert.IsNaN(input.TangentLineZBottom); + + Assert.IsFalse(input.DrainageConstructionPresent); + Assert.IsFalse(input.AdjustPhreaticLine3And4ForUplift); + Assert.IsFalse(input.UseDefaultOffsets); + Assert.IsFalse(input.MoveGrid); + Assert.IsFalse(input.GridAutomaticDetermined); + Assert.IsFalse(input.TangentLineAutomaticAtBoundaries); + + Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay, input.DikeSoilScenario); + } } } \ No newline at end of file