Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs =================================================================== diff -u -rc62200ea10d37435621c8f3387c78dc911b6b7e2 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision c62200ea10d37435621c8f3387c78dc911b6b7e2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -85,6 +85,9 @@ private IUpliftVanCalculator CreateUpliftVanCalculator() { IUpliftVanCalculator calculator = factory.CreateUpliftVanCalculator(); + calculator.MoveGrid = input.MoveGrid; + calculator.MaximumSliceWidth = input.MaximumSliceWidth; + Soil[] soils = SoilCreator.Create(input.SoilProfile); calculator.SoilModel = SoilModelCreator.Create(soils); Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs =================================================================== diff -u -r2e4a7f40ff810375ec45120f7e3ff41b417dea67 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 2e4a7f40ff810375ec45120f7e3ff41b417dea67) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -62,12 +62,12 @@ PiezometricHeadPhreaticLine2Outwards = properties.PiezometricHeadPhreaticLine2Outwards; PiezometricHeadPhreaticLine2Inwards = properties.PiezometricHeadPhreaticLine2Inwards; PenetrationLength = properties.PenetrationLength; - DrainageConstructionPresent = properties.DrainageConstructionPresent; AdjustPhreaticLine3And4ForUplift = properties.AdjustPhreaticLine3And4ForUplift; UseDefaultOffsets = properties.UseDefaultOffsets; - DikeSoilScenario = properties.DikeSoilScenario; + MoveGrid = properties.MoveGrid; + MaximumSliceWidth = properties.MaximumSliceWidth; } public class ConstructionProperties @@ -96,8 +96,8 @@ PiezometricHeadPhreaticLine2Outwards = double.NaN; PiezometricHeadPhreaticLine2Inwards = double.NaN; PenetrationLength = double.NaN; - DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay; + MaximumSliceWidth = double.NaN; } #region properties @@ -240,6 +240,17 @@ /// public double PenetrationLength { internal get; set; } + /// + /// Gets or sets the value whether the grid should be moved. + /// + public bool MoveGrid { internal get; set; } + + /// + /// Gets the maximum slice width. + /// [m] + /// + public double MaximumSliceWidth { internal get; set; } + #endregion } @@ -262,127 +273,138 @@ public MacroStabilityInwardsSoilProfileUnderSurfaceLine SoilProfile { get; } /// - /// Gets or sets the dike soil scenario. + /// Gets the dike soil scenario. /// public MacroStabilityInwardsDikeSoilScenario DikeSoilScenario { get; } /// - /// Gets or sets the average river water level. + /// Gets the average river water level. /// [m+NAP] /// public double WaterLevelRiverAverage { get; } /// - /// Gets or sets the polder water level. + /// Gets the polder water level. /// [m+NAP] /// public double WaterLevelPolder { get; } /// - /// Gets or sets whether a drainage construction is present. + /// Gets whether a drainage construction is present. /// public bool DrainageConstructionPresent { get; } /// - /// Gets or sets the x coordinate of the drainage construction. + /// Gets the x coordinate of the drainage construction. /// [m] /// public double XCoordinateDrainageConstruction { get; } /// - /// Gets or sets the z coordinate of the drainage construction. + /// Gets the z coordinate of the drainage construction. /// [m+NAP] /// public double ZCoordinateDrainageConstruction { get; } /// - /// Gets or sets the minimum level phreatic line at dike top river. + /// Gets the minimum level phreatic line at dike top river. /// [m+NAP] /// public double MinimumLevelPhreaticLineAtDikeTopRiver { get; } /// - /// Gets or sets the minimum level phreatic line at dike top polder. + /// Gets the minimum level phreatic line at dike top polder. /// [m+NAP] /// public double MinimumLevelPhreaticLineAtDikeTopPolder { get; } /// - /// Gets or sets whether the default offset should be used. + /// Gets whether the default offset should be used. /// public bool UseDefaultOffsets { get; } /// - /// Gets or sets the offset of the phreatic line below dike top at river. + /// Gets the offset of the phreatic line below dike top at river. /// [m] /// public double PhreaticLineOffsetBelowDikeTopAtRiver { get; } /// - /// Gets or sets the offset of the phreatic line below dike top at polder. + /// Gets the offset of the phreatic line below dike top at polder. /// [m] /// public double PhreaticLineOffsetBelowDikeTopAtPolder { get; } /// - /// Gets or sets the offset of the phreatic line below shoulder base inside. + /// Gets the offset of the phreatic line below shoulder base inside. /// [m] /// public double PhreaticLineOffsetBelowShoulderBaseInside { get; } /// - /// Gets or sets the offset of the phreatic line below dike toe at polder. + /// Gets the offset of the phreatic line below dike toe at polder. /// [m] /// public double PhreaticLineOffsetBelowDikeToeAtPolder { get; } /// - /// Gets or sets whether phreatic line 3 and 4 should be adjusted for uplift. + /// Gets whether phreatic line 3 and 4 should be adjusted for uplift. /// public bool AdjustPhreaticLine3And4ForUplift { get; } /// - /// Gets or sets the leakage length outwards of phreatic line 3. + /// Gets the leakage length outwards of phreatic line 3. /// [m] /// public double LeakageLengthOutwardsPhreaticLine3 { get; } /// - /// Gets or sets the leakage length inwards of phreatic line 3. + /// Gets the leakage length inwards of phreatic line 3. /// [m] /// public double LeakageLengthInwardsPhreaticLine3 { get; } /// - /// Gets or sets the leakage length outwards of phreatic line 4. + /// Gets the leakage length outwards of phreatic line 4. /// [m] /// public double LeakageLengthOutwardsPhreaticLine4 { get; } /// - /// Gets or sets the leakage length inwards of phreatic line 4. + /// Gets the leakage length inwards of phreatic line 4. /// [m] /// public double LeakageLengthInwardsPhreaticLine4 { get; } /// - /// Gets or sets the piezometric head of the phreatic line 2 outwards. + /// Gets the piezometric head of the phreatic line 2 outwards. /// [m+NAP] /// public double PiezometricHeadPhreaticLine2Outwards { get; } /// - /// Gets or sets the piezometric head of the phreatic line 2 inwards. + /// Gets the piezometric head of the phreatic line 2 inwards. /// [m+NAP] /// public double PiezometricHeadPhreaticLine2Inwards { get; } /// - /// Gets or sets the penetration length. + /// Gets the penetration length. /// [m] /// public double PenetrationLength { get; } + /// + /// Gets the value whether the grid should be moved. + /// + public bool MoveGrid { get; } + + /// + /// Gets the maximum slice width. + /// [m] + /// + public double MaximumSliceWidth { get; } + #endregion } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs =================================================================== diff -u -r2e4a7f40ff810375ec45120f7e3ff41b417dea67 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 2e4a7f40ff810375ec45120f7e3ff41b417dea67) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -48,5 +48,15 @@ /// Sets the location. /// StabilityLocation Location { set; } + + /// + /// Sets the move grid property. + /// + bool MoveGrid { set; } + + /// + /// Sets the maximum slice width. + /// + double MaximumSliceWidth { set; } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs =================================================================== diff -u -r2e4a7f40ff810375ec45120f7e3ff41b417dea67 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 2e4a7f40ff810375ec45120f7e3ff41b417dea67) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -45,7 +45,9 @@ wrappedCalculator = new WTIStabilityCalculation(); calculatorInput = new StabilityModel { - ModelOption = ModelOptions.UpliftVan + ModelOption = ModelOptions.UpliftVan, + SearchAlgorithm = SearchAlgorithm.Grid, + GridOrientation = GridOrientation.Inwards, }; } @@ -87,5 +89,21 @@ calculatorInput.Location = value; } } + + public bool MoveGrid + { + set + { + calculatorInput.MoveGrid = value; + } + } + + public double MaximumSliceWidth + { + set + { + calculatorInput.MaximumSliceWidth = value; + } + } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs =================================================================== diff -u -r2e4a7f40ff810375ec45120f7e3ff41b417dea67 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision 2e4a7f40ff810375ec45120f7e3ff41b417dea67) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs (.../MacroStabilityInwardsCalculatorInputTest.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -79,6 +79,7 @@ bool adjustPhreaticLine3And4ForUplift = random.NextBoolean(); bool drainageConstructionPresent = random.NextBoolean(); var dikeSoilScenario = random.NextEnumValue(); + bool moveGrid = random.NextBoolean(); // Call var input = new MacroStabilityInwardsCalculatorInput( @@ -107,7 +108,8 @@ UseDefaultOffsets = useDefaultOffsets, AdjustPhreaticLine3And4ForUplift = adjustPhreaticLine3And4ForUplift, DrainageConstructionPresent = drainageConstructionPresent, - DikeSoilScenario = dikeSoilScenario + DikeSoilScenario = dikeSoilScenario, + MoveGrid = moveGrid }); // Assert @@ -137,6 +139,7 @@ Assert.AreEqual(drainageConstructionPresent, input.DrainageConstructionPresent); Assert.AreEqual(dikeSoilScenario, input.DikeSoilScenario); + Assert.AreEqual(moveGrid, input.MoveGrid); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs =================================================================== diff -u -r2e4a7f40ff810375ec45120f7e3ff41b417dea67 -r206b4532b803312043b7f85fc4aaeb9ae7b8104b --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 2e4a7f40ff810375ec45120f7e3ff41b417dea67) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 206b4532b803312043b7f85fc4aaeb9ae7b8104b) @@ -41,6 +41,10 @@ public StabilityLocation Location { get; set; } + public bool MoveGrid { get; set; } + + public double MaximumSliceWidth { get; set; } + public void Calculate() { Calculated = true;