Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SoilProfileCreator.cs =================================================================== diff -u -rfed3ead7401b6f3317ec3a5be54ec7bda38552cc -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision fed3ead7401b6f3317ec3a5be54ec7bda38552cc) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SoilProfileCreator.cs (.../SoilProfileCreator.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -67,7 +67,8 @@ { IsAquifer = layerWithSoil.Key.Properties.IsAquifer, Soil = layerWithSoil.Value, - GeometrySurface = CreateGeometrySurface(layerWithSoil.Key) + GeometrySurface = CreateGeometrySurface(layerWithSoil.Key), + WaterpressureInterpolationModel = WaterpressureInterpolationModel.Automatic }); } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs =================================================================== diff -u -rfed3ead7401b6f3317ec3a5be54ec7bda38552cc -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision fed3ead7401b6f3317ec3a5be54ec7bda38552cc) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -106,6 +106,8 @@ calculator.SurfaceLine = SurfaceLineCreator.Create(input.SurfaceLine); calculator.SlipPlaneUpliftVan = SlipPlaneUpliftVanCreator.Create(input); calculator.GridAutomaticDetermined = input.GridAutomaticDetermined; + calculator.CreateZones = input.CreateZones; + calculator.AutomaticForbidenZones = input.AutomaticForbiddenZones; return calculator; } Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs =================================================================== diff -u -r991a9bc3bb36370b7be134369211b0edfd1b227e -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -75,6 +75,10 @@ TangentLineAutomaticAtBoundaries = properties.TangentLineAutomaticAtBoundaries; TangentLineZTop = properties.TangentLineZTop; TangentLineZBottom = properties.TangentLineZBottom; + CreateZones = properties.CreateZones; + AutomaticForbiddenZones = properties.AutomaticForbiddenZones; + SlipPlaneMinimumDepth = properties.SlipPlaneMinimumDepth; + SlipPlaneMinimumLength = properties.SlipPlaneMinimumLength; } public class ConstructionProperties @@ -106,6 +110,8 @@ MaximumSliceWidth = double.NaN; TangentLineZTop = double.NaN; TangentLineZBottom = double.NaN; + SlipPlaneMinimumDepth = double.NaN; + SlipPlaneMinimumLength = double.NaN; } #region properties @@ -291,6 +297,28 @@ /// public double TangentLineZBottom { internal get; set; } + /// + /// Gets or sets the create zones. + /// + public bool CreateZones { internal get; set; } + + /// + /// Gets or sets the automatic forbidden zones. + /// + public bool AutomaticForbiddenZones { internal get; set; } + + /// + /// Gets or sets the minimum depth of the slip plane. + /// [m] + /// + public double SlipPlaneMinimumDepth { internal get; set; } + + /// + /// Gets or sets the minimum length of the slip plane. + /// [m] + /// + public double SlipPlaneMinimumLength { internal get; set; } + #endregion } @@ -477,6 +505,28 @@ /// public double TangentLineZBottom { get; } + /// + /// Gets the create zones. + /// + public bool CreateZones { get; } + + /// + /// Gets the automatic forbidden zones. + /// + public bool AutomaticForbiddenZones { get; } + + /// + /// Gets the minimum depth of the slip plane. + /// [m] + /// + public double SlipPlaneMinimumDepth { get; } + + /// + /// Gets the minimum length of the slip plane. + /// [m] + /// + public double SlipPlaneMinimumLength { get; } + #endregion } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs =================================================================== diff -u -r177ec6713fcf4dbdbc5fd2a542fb7bfa6554e1ff -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 177ec6713fcf4dbdbc5fd2a542fb7bfa6554e1ff) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -73,5 +73,27 @@ /// sets whether the grid is automatic determined or not. /// bool GridAutomaticDetermined { set; } + + /// + /// Sets the create zones property. + /// + bool CreateZones { set; } + + /// + /// Sets the automatic forbidden zones property. + /// + bool AutomaticForbidenZones { set; } + + /// + /// Sets the minimum depth of the slip plane. + /// [m] + /// + double SlipPlaneMinimumDepth { set; } + + /// + /// Sets the minimum length of the slip plane. + /// [m] + /// + double SlipPlaneMinimumLength { set; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs =================================================================== diff -u -r0e2f13c8bf23fe5b9750e7453e39840e53b92291 -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 0e2f13c8bf23fe5b9750e7453e39840e53b92291) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -47,11 +47,7 @@ ModelOption = ModelOptions.UpliftVan, SearchAlgorithm = SearchAlgorithm.Grid, GridOrientation = GridOrientation.Inwards, - SlipPlaneConstraints = new SlipPlaneConstraints - { - AutomaticForbiddenZones = true, - CreateZones = true - }, + SlipPlaneConstraints = new SlipPlaneConstraints(), GeneticAlgorithmOptions = new GeneticAlgorithmOptions { EliteCount = 2, @@ -137,6 +133,38 @@ } } + public bool CreateZones + { + set + { + calculatorInput.SlipPlaneConstraints.CreateZones = value; + } + } + + public bool AutomaticForbidenZones + { + set + { + calculatorInput.SlipPlaneConstraints.AutomaticForbiddenZones = value; + } + } + + public double SlipPlaneMinimumDepth + { + set + { + calculatorInput.SlipPlaneConstraints.SlipPlaneMinDepth = value; + } + } + + public double SlipPlaneMinimumLength + { + set + { + calculatorInput.SlipPlaneConstraints.SlipPlaneMinLength = value; + } + } + public void Calculate() { try Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs =================================================================== diff -u -r991a9bc3bb36370b7be134369211b0edfd1b227e -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -196,7 +196,11 @@ RightGrid = inputParameters.RightGrid, TangentLineAutomaticAtBoundaries = inputParameters.TangentLineDetermination == MacroStabilityInwardsTangentLineDetermination.LayerSeparated, TangentLineZTop = inputParameters.TangentLineZTop, - TangentLineZBottom = inputParameters.TangentLineZBottom + TangentLineZBottom = inputParameters.TangentLineZBottom, + CreateZones = inputParameters.CreateZones, + AutomaticForbiddenZones = inputParameters.AutomaticForbiddenZones == MacroStabilityInwardsZoningBoundariesDetermination.Automatic, + SlipPlaneMinimumDepth = inputParameters.SlipPlaneMinimumDepth, + SlipPlaneMinimumLength = inputParameters.SlipPlaneMinimumLength }); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SoilProfileCreatorTest.cs =================================================================== diff -u -rfed3ead7401b6f3317ec3a5be54ec7bda38552cc -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision fed3ead7401b6f3317ec3a5be54ec7bda38552cc) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SoilProfileCreatorTest.cs (.../SoilProfileCreatorTest.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -141,6 +141,7 @@ SoilLayer2D surface = profile.Surfaces.First(); Assert.AreSame(soil, surface.Soil); Assert.AreEqual(layer.Properties.IsAquifer, surface.IsAquifer); + Assert.AreEqual(WaterpressureInterpolationModel.Automatic, surface.WaterpressureInterpolationModel); var point1 = new WTIStabilityPoint2D(0, 0); var point2 = new WTIStabilityPoint2D(10, 10); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs =================================================================== diff -u -r991a9bc3bb36370b7be134369211b0edfd1b227e -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision 991a9bc3bb36370b7be134369211b0edfd1b227e) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -81,13 +81,17 @@ bool drainageConstructionPresent = random.NextBoolean(); var dikeSoilScenario = random.NextEnumValue(); bool moveGrid = random.NextBoolean(); - double maximumSliceWidth = random.NextDouble(); + double maximumSliceWidth = random.Next(); bool gridAutomaticDetermined = random.NextBoolean(); var leftGrid = new MacroStabilityInwardsGrid(); var rightGrid = new MacroStabilityInwardsGrid(); bool tangentLineAutomaticAtBoundaries = random.NextBoolean(); - double tangentLineZTop = random.NextDouble(); - double tangentLineZBottom = random.NextDouble(); + double tangentLineZTop = random.Next(); + double tangentLineZBottom = random.Next(); + bool createZones = random.NextBoolean(); + bool automaticForbiddenZones = random.NextBoolean(); + double slipPlaneMinDepth = random.Next(); + double slipPlaneMinLength = random.Next(); // Call var input = new MacroStabilityInwardsCalculatorInput( @@ -124,7 +128,11 @@ RightGrid = rightGrid, TangentLineAutomaticAtBoundaries = tangentLineAutomaticAtBoundaries, TangentLineZTop = tangentLineZTop, - TangentLineZBottom = tangentLineZBottom + TangentLineZBottom = tangentLineZBottom, + CreateZones = createZones, + AutomaticForbiddenZones = automaticForbiddenZones, + SlipPlaneMinimumDepth = slipPlaneMinDepth, + SlipPlaneMinimumLength = slipPlaneMinLength }); // Assert @@ -164,6 +172,10 @@ Assert.AreEqual(tangentLineAutomaticAtBoundaries, input.TangentLineAutomaticAtBoundaries); Assert.AreEqual(tangentLineZTop, input.TangentLineZTop); Assert.AreEqual(tangentLineZBottom, input.TangentLineZBottom); + Assert.AreEqual(createZones, input.CreateZones); + Assert.AreEqual(automaticForbiddenZones, input.AutomaticForbiddenZones); + Assert.AreEqual(slipPlaneMinDepth, input.SlipPlaneMinimumDepth); + Assert.AreEqual(slipPlaneMinLength, input.SlipPlaneMinimumLength); } [Test] @@ -200,13 +212,17 @@ Assert.IsNaN(input.MaximumSliceWidth); Assert.IsNaN(input.TangentLineZTop); Assert.IsNaN(input.TangentLineZBottom); + Assert.IsNaN(input.SlipPlaneMinimumDepth); + Assert.IsNaN(input.SlipPlaneMinimumLength); Assert.IsFalse(input.DrainageConstructionPresent); Assert.IsFalse(input.AdjustPhreaticLine3And4ForUplift); Assert.IsFalse(input.UseDefaultOffsets); Assert.IsFalse(input.MoveGrid); - Assert.IsFalse(input.GridAutomaticDetermined); + Assert.IsFalse(input.GridAutomaticDetermined); Assert.IsFalse(input.TangentLineAutomaticAtBoundaries); + Assert.IsFalse(input.CreateZones); + Assert.IsFalse(input.AutomaticForbiddenZones); Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay, input.DikeSoilScenario); } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs =================================================================== diff -u -r177ec6713fcf4dbdbc5fd2a542fb7bfa6554e1ff -r34ad98587d7f114c9f7c2233199b34fc1ef6dc76 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 177ec6713fcf4dbdbc5fd2a542fb7bfa6554e1ff) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 34ad98587d7f114c9f7c2233199b34fc1ef6dc76) @@ -51,6 +51,14 @@ public bool GridAutomaticDetermined { get; set; } + public bool CreateZones { get; set; } + + public bool AutomaticForbidenZones { get; set; } + + public double SlipPlaneMinimumDepth { get; set; } + + public double SlipPlaneMinimumLength { get; set; } + public void Calculate() { Calculated = true;