Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SlipPlaneUpliftVanCreator.cs
===================================================================
diff -u -r5278b82071883876afcaa601e722f564c5815aab -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SlipPlaneUpliftVanCreator.cs (.../SlipPlaneUpliftVanCreator.cs) (revision 5278b82071883876afcaa601e722f564c5815aab)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/SlipPlaneUpliftVanCreator.cs (.../SlipPlaneUpliftVanCreator.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -34,10 +34,10 @@
/// Creates a based on the given ,
/// which can be used in the .
///
- /// The to get the information from.
+ /// The to get the information from.
/// A new with the given information from .
/// Thrown when is null.
- public static SlipPlaneUpliftVan Create(MacroStabilityInwardsCalculatorInput input)
+ public static SlipPlaneUpliftVan Create(UpliftVanCalculatorInput input)
{
if (input == null)
{
@@ -52,7 +52,7 @@
};
}
- private static SlipCircleTangentLine CreateTangentline(MacroStabilityInwardsCalculatorInput input)
+ private static SlipCircleTangentLine CreateTangentline(UpliftVanCalculatorInput input)
{
return new SlipCircleTangentLine
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/StabilityLocationCreator.cs
===================================================================
diff -u -r5278b82071883876afcaa601e722f564c5815aab -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/StabilityLocationCreator.cs (.../StabilityLocationCreator.cs) (revision 5278b82071883876afcaa601e722f564c5815aab)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Creators/StabilityLocationCreator.cs (.../StabilityLocationCreator.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -36,14 +36,14 @@
/// Creates a based on the given ,
/// which can be used in the .
///
- /// The to get the information from.
+ /// The to get the information from.
/// A new with the given information from .
/// Thrown when is null.
- /// Thrown when
+ /// Thrown when
/// is an invalid value.
- /// Thrown when
+ /// Thrown when
/// is a valid value but unsupported.
- public static StabilityLocation Create(MacroStabilityInwardsCalculatorInput input)
+ public static StabilityLocation Create(UpliftVanCalculatorInput input)
{
if (input == null)
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -rd6c2f6364fcba038152ea93e0e420e03989dd35a -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs (.../IMacroStabilityInwardsCalculatorFactory.cs) (revision d6c2f6364fcba038152ea93e0e420e03989dd35a)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/IMacroStabilityInwardsCalculatorFactory.cs (.../IMacroStabilityInwardsCalculatorFactory.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -24,17 +24,17 @@
namespace Ringtoets.MacroStabilityInwards.KernelWrapper
{
///
- /// Interface for a factory which creates the calculators from the macro stability inwards kernel.
+ /// Interface for a factory which creates calculators for performing macro stability inwards calculations.
///
public interface IMacroStabilityInwardsCalculatorFactory
{
///
- /// Creates the calculator.
+ /// Creates an Uplift Van calculator.
///
- /// The containing all the values required
- /// for performing a macro stability inwards calculation.
- /// The factory responsible for creating the sub calculators.
- /// The calculator.
- IUpliftVanCalculator CreateCalculator(MacroStabilityInwardsCalculatorInput input, IMacroStabilityInwardsKernelFactory factory);
+ /// The containing all the values required
+ /// for performing an Uplift Van calculation.
+ /// The factory responsible for creating the Uplift Van kernel.
+ /// The Uplift Van calculator.
+ IUpliftVanCalculator CreateUpliftVanCalculator(UpliftVanCalculatorInput input, IMacroStabilityInwardsKernelFactory factory);
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -r5278b82071883876afcaa601e722f564c5815aab -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs (.../MacroStabilityInwardsCalculatorFactory.cs) (revision 5278b82071883876afcaa601e722f564c5815aab)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorFactory.cs (.../MacroStabilityInwardsCalculatorFactory.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -24,15 +24,14 @@
namespace Ringtoets.MacroStabilityInwards.KernelWrapper
{
///
- /// Factory which creates the calculators from the macro stability inwards kernel.
+ /// Factory which creates calculators for performing macro stability inwards calculations.
///
public class MacroStabilityInwardsCalculatorFactory : IMacroStabilityInwardsCalculatorFactory
{
private static IMacroStabilityInwardsCalculatorFactory instance;
///
- /// Sets the current , which is used to create
- /// instances.
+ /// Sets the current .
///
public static IMacroStabilityInwardsCalculatorFactory Instance
{
@@ -46,7 +45,7 @@
}
}
- public IUpliftVanCalculator CreateCalculator(MacroStabilityInwardsCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
+ public IUpliftVanCalculator CreateUpliftVanCalculator(UpliftVanCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
{
return new UpliftVanCalculator(input, factory);
}
Fisheye: Tag 497172e737ffc201c0f905e85a246cdba3c0cb1c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj
===================================================================
diff -u -r283274d59060df06800cc23bd00ea9a31535d174 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision 283274d59060df06800cc23bd00ea9a31535d174)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/Ringtoets.MacroStabilityInwards.KernelWrapper.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.csproj) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -51,7 +51,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculator.cs
===================================================================
diff -u -r551dedc408a4155fc9484b03107b533347a8b4fb -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 551dedc408a4155fc9484b03107b533347a8b4fb)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -34,17 +34,17 @@
///
public class UpliftVanCalculator : IUpliftVanCalculator
{
- private readonly MacroStabilityInwardsCalculatorInput input;
+ private readonly UpliftVanCalculatorInput input;
private readonly IMacroStabilityInwardsKernelFactory factory;
///
/// Creates a new instance of .
///
- /// The containing all the values required
+ /// The containing all the values required
/// for performing the Uplift Van calculation.
/// The factory responsible for creating the Uplift Van kernel.
/// Thrown when or is null.
- public UpliftVanCalculator(MacroStabilityInwardsCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
+ public UpliftVanCalculator(UpliftVanCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
{
if (input == null)
{
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculatorInput.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculatorInput.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/UpliftVanCalculatorInput.cs (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -0,0 +1,534 @@
+// 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.Primitives;
+using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper
+{
+ ///
+ /// This class contains all the parameters that are required to perform an Uplift Van calculation.
+ ///
+ public class UpliftVanCalculatorInput
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The object containing the values for the properties
+ /// of the new .
+ /// Thrown when is null.
+ public UpliftVanCalculatorInput(ConstructionProperties properties)
+ {
+ if (properties == null)
+ {
+ throw new ArgumentNullException(nameof(properties));
+ }
+ AssessmentLevel = properties.AssessmentLevel;
+ SurfaceLine = properties.SurfaceLine;
+ SoilProfile = properties.SoilProfile;
+ WaterLevelRiverAverage = properties.WaterLevelRiverAverage;
+ WaterLevelPolder = properties.WaterLevelPolder;
+ XCoordinateDrainageConstruction = properties.XCoordinateDrainageConstruction;
+ ZCoordinateDrainageConstruction = properties.ZCoordinateDrainageConstruction;
+ MinimumLevelPhreaticLineAtDikeTopRiver = properties.MinimumLevelPhreaticLineAtDikeTopRiver;
+ MinimumLevelPhreaticLineAtDikeTopPolder = properties.MinimumLevelPhreaticLineAtDikeTopPolder;
+ PhreaticLineOffsetBelowDikeTopAtRiver = properties.PhreaticLineOffsetBelowDikeTopAtRiver;
+ PhreaticLineOffsetBelowDikeTopAtPolder = properties.PhreaticLineOffsetBelowDikeTopAtPolder;
+ PhreaticLineOffsetBelowShoulderBaseInside = properties.PhreaticLineOffsetBelowShoulderBaseInside;
+ PhreaticLineOffsetBelowDikeToeAtPolder = properties.PhreaticLineOffsetBelowDikeToeAtPolder;
+ LeakageLengthOutwardsPhreaticLine3 = properties.LeakageLengthOutwardsPhreaticLine3;
+ LeakageLengthInwardsPhreaticLine3 = properties.LeakageLengthInwardsPhreaticLine3;
+ LeakageLengthOutwardsPhreaticLine4 = properties.LeakageLengthOutwardsPhreaticLine4;
+ LeakageLengthInwardsPhreaticLine4 = properties.LeakageLengthInwardsPhreaticLine4;
+ 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;
+ GridAutomaticDetermined = properties.GridAutomaticDetermined;
+ LeftGrid = properties.LeftGrid;
+ RightGrid = properties.RightGrid;
+ TangentLineAutomaticAtBoundaries = properties.TangentLineAutomaticAtBoundaries;
+ TangentLineZTop = properties.TangentLineZTop;
+ TangentLineZBottom = properties.TangentLineZBottom;
+ CreateZones = properties.CreateZones;
+ AutomaticForbiddenZones = properties.AutomaticForbiddenZones;
+ SlipPlaneMinimumDepth = properties.SlipPlaneMinimumDepth;
+ SlipPlaneMinimumLength = properties.SlipPlaneMinimumLength;
+ }
+
+ ///
+ /// Container for properties for constructing a .
+ ///
+ public class ConstructionProperties
+ {
+ ///
+ /// Creates new instance of .
+ ///
+ public ConstructionProperties()
+ {
+ AssessmentLevel = double.NaN;
+ WaterLevelRiverAverage = double.NaN;
+ WaterLevelPolder = double.NaN;
+ XCoordinateDrainageConstruction = double.NaN;
+ ZCoordinateDrainageConstruction = double.NaN;
+ MinimumLevelPhreaticLineAtDikeTopRiver = double.NaN;
+ MinimumLevelPhreaticLineAtDikeTopPolder = double.NaN;
+ PhreaticLineOffsetBelowDikeTopAtRiver = double.NaN;
+ PhreaticLineOffsetBelowDikeTopAtPolder = double.NaN;
+ PhreaticLineOffsetBelowShoulderBaseInside = double.NaN;
+ PhreaticLineOffsetBelowDikeToeAtPolder = double.NaN;
+ 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;
+ SlipPlaneMinimumDepth = double.NaN;
+ SlipPlaneMinimumLength = double.NaN;
+ }
+
+ #region Properties
+
+ ///
+ /// Gets or sets the outside high water level.
+ /// [m]
+ ///
+ public double AssessmentLevel { internal get; set; }
+
+ ///
+ /// Gets or sets the surface line.
+ ///
+ public MacroStabilityInwardsSurfaceLine SurfaceLine { internal get; set; }
+
+ ///
+ /// Gets or sets the profile which contains a definition of soil layers with properties.
+ ///
+ public MacroStabilityInwardsSoilProfileUnderSurfaceLine SoilProfile { internal get; set; }
+
+ ///
+ /// Gets or sets the dike soil scenario.
+ ///
+ public MacroStabilityInwardsDikeSoilScenario DikeSoilScenario { internal get; set; }
+
+ ///
+ /// Gets or sets the average river water level.
+ /// [m+NAP]
+ ///
+ public double WaterLevelRiverAverage { internal get; set; }
+
+ ///
+ /// Gets or sets the polder water level.
+ /// [m+NAP]
+ ///
+ public double WaterLevelPolder { internal get; set; }
+
+ ///
+ /// Gets or sets whether a drainage construction is present.
+ ///
+ public bool DrainageConstructionPresent { internal get; set; }
+
+ ///
+ /// Gets or sets the x coordinate of the drainage construction.
+ /// [m]
+ ///
+ public double XCoordinateDrainageConstruction { internal get; set; }
+
+ ///
+ /// Gets or sets the z coordinate of the drainage construction.
+ /// [m+NAP]
+ ///
+ public double ZCoordinateDrainageConstruction { internal get; set; }
+
+ ///
+ /// Gets or sets the minimum level phreatic line at dike top river.
+ /// [m+NAP]
+ ///
+ public double MinimumLevelPhreaticLineAtDikeTopRiver { internal get; set; }
+
+ ///
+ /// Gets or sets the minimum level phreatic line at dike top polder.
+ /// [m+NAP]
+ ///
+ public double MinimumLevelPhreaticLineAtDikeTopPolder { internal get; set; }
+
+ ///
+ /// Gets or sets whether the default offsets should be used.
+ ///
+ public bool UseDefaultOffsets { internal get; set; }
+
+ ///
+ /// Gets or sets the offset of the phreatic line below dike top at river.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeTopAtRiver { internal get; set; }
+
+ ///
+ /// Gets or sets the offset of the phreatic line below dike top at polder.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeTopAtPolder { internal get; set; }
+
+ ///
+ /// Gets or sets the offset of the phreatic line below shoulder base inside.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowShoulderBaseInside { internal get; set; }
+
+ ///
+ /// Gets or sets the offset of the phreatic line below dike toe at polder.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeToeAtPolder { internal get; set; }
+
+ ///
+ /// Gets or sets whether phreatic line 3 and 4 should be adjusted for uplift.
+ ///
+ public bool AdjustPhreaticLine3And4ForUplift { internal get; set; }
+
+ ///
+ /// Gets or sets the leakage length outwards of phreatic line 3.
+ /// [m]
+ ///
+ public double LeakageLengthOutwardsPhreaticLine3 { internal get; set; }
+
+ ///
+ /// Gets or sets the leakage length inwards of phreatic line 3.
+ /// [m]
+ ///
+ public double LeakageLengthInwardsPhreaticLine3 { internal get; set; }
+
+ ///
+ /// Gets or sets the leakage length outwards of phreatic line 4.
+ /// [m]
+ ///
+ public double LeakageLengthOutwardsPhreaticLine4 { internal get; set; }
+
+ ///
+ /// Gets or sets the leakage length inwards of phreatic line 4.
+ /// [m]
+ ///
+ public double LeakageLengthInwardsPhreaticLine4 { internal get; set; }
+
+ ///
+ /// Gets or sets the piezometric head of the phreatic line 2 outwards.
+ /// [m+NAP]
+ ///
+ public double PiezometricHeadPhreaticLine2Outwards { internal get; set; }
+
+ ///
+ /// Gets or sets the piezometric head of the phreatic line 2 inwards.
+ /// [m+NAP]
+ ///
+ public double PiezometricHeadPhreaticLine2Inwards { internal get; set; }
+
+ ///
+ /// Gets or sets the penetration length.
+ /// [m]
+ ///
+ public double PenetrationLength { internal get; set; }
+
+ ///
+ /// Gets or sets the value whether the grid should be moved.
+ ///
+ public bool MoveGrid { internal get; set; }
+
+ ///
+ /// 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; }
+
+ ///
+ /// Gets or sets whether zones should be created.
+ ///
+ public bool CreateZones { internal get; set; }
+
+ ///
+ /// Gets or sets whether forbidden zones are automatically determined or not.
+ ///
+ 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
+ }
+
+ #region Properties
+
+ ///
+ /// Gets the outside high water level.
+ /// [m]
+ ///
+ public double AssessmentLevel { get; }
+
+ ///
+ /// Gets the surface line.
+ ///
+ public MacroStabilityInwardsSurfaceLine SurfaceLine { get; }
+
+ ///
+ /// Gets the profile which contains a definition of soil layers with properties.
+ ///
+ public MacroStabilityInwardsSoilProfileUnderSurfaceLine SoilProfile { get; }
+
+ ///
+ /// Gets the dike soil scenario.
+ ///
+ public MacroStabilityInwardsDikeSoilScenario DikeSoilScenario { get; }
+
+ ///
+ /// Gets the average river water level.
+ /// [m+NAP]
+ ///
+ public double WaterLevelRiverAverage { get; }
+
+ ///
+ /// Gets the polder water level.
+ /// [m+NAP]
+ ///
+ public double WaterLevelPolder { get; }
+
+ ///
+ /// Gets whether a drainage construction is present.
+ ///
+ public bool DrainageConstructionPresent { get; }
+
+ ///
+ /// Gets the x coordinate of the drainage construction.
+ /// [m]
+ ///
+ public double XCoordinateDrainageConstruction { get; }
+
+ ///
+ /// Gets the z coordinate of the drainage construction.
+ /// [m+NAP]
+ ///
+ public double ZCoordinateDrainageConstruction { get; }
+
+ ///
+ /// Gets the minimum level phreatic line at dike top river.
+ /// [m+NAP]
+ ///
+ public double MinimumLevelPhreaticLineAtDikeTopRiver { get; }
+
+ ///
+ /// Gets the minimum level phreatic line at dike top polder.
+ /// [m+NAP]
+ ///
+ public double MinimumLevelPhreaticLineAtDikeTopPolder { get; }
+
+ ///
+ /// Gets whether the default offsets should be used.
+ ///
+ public bool UseDefaultOffsets { get; }
+
+ ///
+ /// Gets the offset of the phreatic line below dike top at river.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeTopAtRiver { get; }
+
+ ///
+ /// Gets the offset of the phreatic line below dike top at polder.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeTopAtPolder { get; }
+
+ ///
+ /// Gets the offset of the phreatic line below shoulder base inside.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowShoulderBaseInside { get; }
+
+ ///
+ /// Gets the offset of the phreatic line below dike toe at polder.
+ /// [m]
+ ///
+ public double PhreaticLineOffsetBelowDikeToeAtPolder { get; }
+
+ ///
+ /// Gets whether phreatic line 3 and 4 should be adjusted for uplift.
+ ///
+ public bool AdjustPhreaticLine3And4ForUplift { get; }
+
+ ///
+ /// Gets the leakage length outwards of phreatic line 3.
+ /// [m]
+ ///
+ public double LeakageLengthOutwardsPhreaticLine3 { get; }
+
+ ///
+ /// Gets the leakage length inwards of phreatic line 3.
+ /// [m]
+ ///
+ public double LeakageLengthInwardsPhreaticLine3 { get; }
+
+ ///
+ /// Gets the leakage length outwards of phreatic line 4.
+ /// [m]
+ ///
+ public double LeakageLengthOutwardsPhreaticLine4 { get; }
+
+ ///
+ /// Gets the leakage length inwards of phreatic line 4.
+ /// [m]
+ ///
+ public double LeakageLengthInwardsPhreaticLine4 { get; }
+
+ ///
+ /// Gets the piezometric head of the phreatic line 2 outwards.
+ /// [m+NAP]
+ ///
+ public double PiezometricHeadPhreaticLine2Outwards { get; }
+
+ ///
+ /// Gets the piezometric head of the phreatic line 2 inwards.
+ /// [m+NAP]
+ ///
+ public double PiezometricHeadPhreaticLine2Inwards { get; }
+
+ ///
+ /// 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; }
+
+ ///
+ /// 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; }
+
+ ///
+ /// Gets whether zones should be created.
+ ///
+ public bool CreateZones { get; }
+
+ ///
+ /// Gets whether forbidden zones are automatically determined or not.
+ ///
+ 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.Service/MacroStabilityInwardsCalculationService.cs
===================================================================
diff -u -r832f344292007108d1e7323891eacce5bd678c0e -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 832f344292007108d1e7323891eacce5bd678c0e)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsCalculationService.cs (.../MacroStabilityInwardsCalculationService.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -64,8 +64,8 @@
return false;
}
- MacroStabilityInwardsCalculatorInput macroStabilityInwardsCalculatorInput = CreateInputFromData(calculation.InputParameters);
- IUpliftVanCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(macroStabilityInwardsCalculatorInput, MacroStabilityInwardsKernelWrapperFactory.Instance);
+ UpliftVanCalculatorInput macroStabilityInwardsCalculatorInput = CreateInputFromData(calculation.InputParameters);
+ IUpliftVanCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateUpliftVanCalculator(macroStabilityInwardsCalculatorInput, MacroStabilityInwardsKernelWrapperFactory.Instance);
List validationResults = calculator.Validate();
CalculationServiceHelper.LogMessagesAsError(RingtoetsCommonServiceResources.Error_in_validation_0, validationResults.ToArray());
@@ -93,7 +93,7 @@
try
{
- IUpliftVanCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateCalculator(CreateInputFromData(calculation.InputParameters), MacroStabilityInwardsKernelWrapperFactory.Instance);
+ IUpliftVanCalculator calculator = MacroStabilityInwardsCalculatorFactory.Instance.CreateUpliftVanCalculator(CreateInputFromData(calculation.InputParameters), MacroStabilityInwardsKernelWrapperFactory.Instance);
UpliftVanCalculatorResult macroStabilityInwardsResult = calculator.Calculate();
calculation.Output = new MacroStabilityInwardsOutput(
@@ -175,10 +175,10 @@
return validationResults;
}
- private static MacroStabilityInwardsCalculatorInput CreateInputFromData(MacroStabilityInwardsInput inputParameters)
+ private static UpliftVanCalculatorInput CreateInputFromData(MacroStabilityInwardsInput inputParameters)
{
- return new MacroStabilityInwardsCalculatorInput(
- new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ return new UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.ConstructionProperties
{
AssessmentLevel = inputParameters.AssessmentLevel,
SurfaceLine = inputParameters.SurfaceLine,
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SlipPlaneUpliftVanCreatorTest.cs
===================================================================
diff -u -r1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SlipPlaneUpliftVanCreatorTest.cs (.../SlipPlaneUpliftVanCreatorTest.cs) (revision 1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/SlipPlaneUpliftVanCreatorTest.cs (.../SlipPlaneUpliftVanCreatorTest.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -65,7 +65,7 @@
double tangentLineZBottom = random.NextDouble();
bool tangentLineAutomaticAtBoundaries = random.NextBoolean();
- var input = new MacroStabilityInwardsCalculatorInput(new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ var input = new UpliftVanCalculatorInput(new UpliftVanCalculatorInput.ConstructionProperties
{
LeftGrid = new MacroStabilityInwardsGrid
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/StabilityLocationCreatorTest.cs
===================================================================
diff -u -r1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/StabilityLocationCreatorTest.cs (.../StabilityLocationCreatorTest.cs) (revision 1d6eb4a980508dc55fca5a225fe777c7fd3cbd2e)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Creators/StabilityLocationCreatorTest.cs (.../StabilityLocationCreatorTest.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -48,8 +48,8 @@
public void Create_InvalidDikeSoilScenario_ThrowInvalidEnumArgumentException()
{
// Setup
- var input = new MacroStabilityInwardsCalculatorInput(
- new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ var input = new UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.ConstructionProperties
{
DikeSoilScenario = (MacroStabilityInwardsDikeSoilScenario) 99
});
@@ -71,8 +71,8 @@
DikeSoilScenario dikeSoilScenario)
{
// Setup
- var input = new MacroStabilityInwardsCalculatorInput(
- new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ var input = new UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.ConstructionProperties
{
DikeSoilScenario = macroStabilityInwardsDikeSoilScenario
});
@@ -111,8 +111,8 @@
double leakageLengthOutwardsPhreaticLine4 = random.Next();
double leakageLengthInwardsPhreaticLine4 = random.Next();
- var input = new MacroStabilityInwardsCalculatorInput(
- new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ var input = new UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.ConstructionProperties
{
DikeSoilScenario = MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay,
AssessmentLevel = assessmentLevel,
Fisheye: Tag 497172e737ffc201c0f905e85a246cdba3c0cb1c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorInputTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj
===================================================================
diff -u -r283274d59060df06800cc23bd00ea9a31535d174 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 283274d59060df06800cc23bd00ea9a31535d174)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.Test.csproj) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -64,7 +64,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorInputTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorInputTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorInputTest.cs (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -0,0 +1,231 @@
+// 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 System.Linq;
+using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
+using NUnit.Framework;
+using Ringtoets.MacroStabilityInwards.Primitives;
+using Ringtoets.MacroStabilityInwards.Primitives.MacroStabilityInwardsSoilUnderSurfaceLine;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test
+{
+ [TestFixture]
+ public class UpliftVanCalculatorInputTest
+ {
+ [Test]
+ public void Constructor_WithoutConstructionProperies_ThrowsArgumentNullException()
+ {
+ // Call
+ TestDelegate test = () => new UpliftVanCalculatorInput(null);
+
+ // Assert
+ string paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("properties", paramName);
+ }
+
+ [Test]
+ public void Constructor_WithConstructionProperties_PropertiesAreSet()
+ {
+ // Setup
+ var random = new Random(11);
+
+ double hRiverValue = random.NextDouble();
+ var surfaceLine = new MacroStabilityInwardsSurfaceLine(string.Empty);
+ var soilProfile = new MacroStabilityInwardsSoilProfileUnderSurfaceLine(new[]
+ {
+ new MacroStabilityInwardsSoilLayerUnderSurfaceLine(new[]
+ {
+ new Point2D(0, 0)
+ }, new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine(
+ new MacroStabilityInwardsSoilLayerPropertiesUnderSurfaceLine.ConstructionProperties()))
+ }, Enumerable.Empty());
+
+ double waterLevelRiverAverage = random.Next();
+ double waterLevelPolder = random.Next();
+ double xCoordinateDrainageConstruction = random.Next();
+ double zCoordinateDrainageConstruction = random.Next();
+ double minimumLevelPhreaticLineAtDikeTopRiver = random.Next();
+ double minimumLevelPhreaticLineAtDikeTopPolder = random.Next();
+ double phreaticLineOffsetBelowDikeTopAtRiver = random.Next();
+ double phreaticLineOffsetBelowDikeTopAtPolder = random.Next();
+ double phreaticLineOffsetBelowShoulderBaseInside = random.Next();
+ double phreaticLineOffsetBelowDikeToeAtPolder = random.Next();
+ double leakageLengthOutwardsPhreaticLine3 = random.Next();
+ double leakageLengthInwardsPhreaticLine3 = random.Next();
+ double leakageLengthOutwardsPhreaticLine4 = random.Next();
+ double leakageLengthInwardsPhreaticLine4 = random.Next();
+ double piezometricHeadPhreaticLine2Outwards = random.Next();
+ double piezometricHeadPhreaticLine2Inwards = random.Next();
+ double penetrationLength = random.Next();
+ bool useDefaultOffsets = random.NextBoolean();
+ bool adjustPhreaticLine3And4ForUplift = random.NextBoolean();
+ bool drainageConstructionPresent = random.NextBoolean();
+ var dikeSoilScenario = random.NextEnumValue();
+ bool moveGrid = random.NextBoolean();
+ double maximumSliceWidth = random.Next();
+ bool gridAutomaticDetermined = random.NextBoolean();
+ var leftGrid = new MacroStabilityInwardsGrid();
+ var rightGrid = new MacroStabilityInwardsGrid();
+ bool tangentLineAutomaticAtBoundaries = random.NextBoolean();
+ 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 UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.ConstructionProperties
+ {
+ AssessmentLevel = hRiverValue,
+ SurfaceLine = surfaceLine,
+ SoilProfile = soilProfile,
+ WaterLevelRiverAverage = waterLevelRiverAverage,
+ WaterLevelPolder = waterLevelPolder,
+ XCoordinateDrainageConstruction = xCoordinateDrainageConstruction,
+ ZCoordinateDrainageConstruction = zCoordinateDrainageConstruction,
+ MinimumLevelPhreaticLineAtDikeTopRiver = minimumLevelPhreaticLineAtDikeTopRiver,
+ MinimumLevelPhreaticLineAtDikeTopPolder = minimumLevelPhreaticLineAtDikeTopPolder,
+ PhreaticLineOffsetBelowDikeTopAtRiver = phreaticLineOffsetBelowDikeTopAtRiver,
+ PhreaticLineOffsetBelowDikeTopAtPolder = phreaticLineOffsetBelowDikeTopAtPolder,
+ PhreaticLineOffsetBelowShoulderBaseInside = phreaticLineOffsetBelowShoulderBaseInside,
+ PhreaticLineOffsetBelowDikeToeAtPolder = phreaticLineOffsetBelowDikeToeAtPolder,
+ LeakageLengthOutwardsPhreaticLine3 = leakageLengthOutwardsPhreaticLine3,
+ LeakageLengthInwardsPhreaticLine3 = leakageLengthInwardsPhreaticLine3,
+ LeakageLengthOutwardsPhreaticLine4 = leakageLengthOutwardsPhreaticLine4,
+ LeakageLengthInwardsPhreaticLine4 = leakageLengthInwardsPhreaticLine4,
+ PiezometricHeadPhreaticLine2Outwards = piezometricHeadPhreaticLine2Outwards,
+ PiezometricHeadPhreaticLine2Inwards = piezometricHeadPhreaticLine2Inwards,
+ PenetrationLength = penetrationLength,
+ UseDefaultOffsets = useDefaultOffsets,
+ AdjustPhreaticLine3And4ForUplift = adjustPhreaticLine3And4ForUplift,
+ DrainageConstructionPresent = drainageConstructionPresent,
+ DikeSoilScenario = dikeSoilScenario,
+ MoveGrid = moveGrid,
+ MaximumSliceWidth = maximumSliceWidth,
+ GridAutomaticDetermined = gridAutomaticDetermined,
+ LeftGrid = leftGrid,
+ RightGrid = rightGrid,
+ TangentLineAutomaticAtBoundaries = tangentLineAutomaticAtBoundaries,
+ TangentLineZTop = tangentLineZTop,
+ TangentLineZBottom = tangentLineZBottom,
+ CreateZones = createZones,
+ AutomaticForbiddenZones = automaticForbiddenZones,
+ SlipPlaneMinimumDepth = slipPlaneMinDepth,
+ SlipPlaneMinimumLength = slipPlaneMinLength
+ });
+
+ // Assert
+ Assert.AreEqual(hRiverValue, input.AssessmentLevel);
+ Assert.AreSame(surfaceLine, input.SurfaceLine);
+ Assert.AreSame(soilProfile, input.SoilProfile);
+
+ Assert.AreEqual(waterLevelRiverAverage, input.WaterLevelRiverAverage);
+ Assert.AreEqual(waterLevelPolder, input.WaterLevelPolder);
+ Assert.AreEqual(xCoordinateDrainageConstruction, input.XCoordinateDrainageConstruction);
+ Assert.AreEqual(zCoordinateDrainageConstruction, input.ZCoordinateDrainageConstruction);
+ Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopRiver, input.MinimumLevelPhreaticLineAtDikeTopRiver);
+ Assert.AreEqual(minimumLevelPhreaticLineAtDikeTopPolder, input.MinimumLevelPhreaticLineAtDikeTopPolder);
+ Assert.AreEqual(phreaticLineOffsetBelowDikeTopAtRiver, input.PhreaticLineOffsetBelowDikeTopAtRiver);
+ Assert.AreEqual(phreaticLineOffsetBelowDikeTopAtPolder, input.PhreaticLineOffsetBelowDikeTopAtPolder);
+ Assert.AreEqual(phreaticLineOffsetBelowShoulderBaseInside, input.PhreaticLineOffsetBelowShoulderBaseInside);
+ Assert.AreEqual(phreaticLineOffsetBelowDikeToeAtPolder, input.PhreaticLineOffsetBelowDikeToeAtPolder);
+ Assert.AreEqual(leakageLengthOutwardsPhreaticLine3, input.LeakageLengthOutwardsPhreaticLine3);
+ Assert.AreEqual(leakageLengthInwardsPhreaticLine3, input.LeakageLengthInwardsPhreaticLine3);
+ Assert.AreEqual(leakageLengthOutwardsPhreaticLine4, input.LeakageLengthOutwardsPhreaticLine4);
+ Assert.AreEqual(leakageLengthInwardsPhreaticLine4, input.LeakageLengthInwardsPhreaticLine4);
+ Assert.AreEqual(piezometricHeadPhreaticLine2Outwards, input.PiezometricHeadPhreaticLine2Outwards);
+ Assert.AreEqual(piezometricHeadPhreaticLine2Inwards, input.PiezometricHeadPhreaticLine2Inwards);
+ Assert.AreEqual(penetrationLength, input.PenetrationLength);
+ Assert.AreEqual(useDefaultOffsets, input.UseDefaultOffsets);
+ Assert.AreEqual(adjustPhreaticLine3And4ForUplift, input.AdjustPhreaticLine3And4ForUplift);
+ Assert.AreEqual(drainageConstructionPresent, input.DrainageConstructionPresent);
+
+ 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);
+ Assert.AreEqual(createZones, input.CreateZones);
+ Assert.AreEqual(automaticForbiddenZones, input.AutomaticForbiddenZones);
+ Assert.AreEqual(slipPlaneMinDepth, input.SlipPlaneMinimumDepth);
+ Assert.AreEqual(slipPlaneMinLength, input.SlipPlaneMinimumLength);
+ }
+
+ [Test]
+ public void Constructor_EmptyConstructionProperties_ExpectedValues()
+ {
+ // Call
+ var input = new UpliftVanCalculatorInput(
+ new UpliftVanCalculatorInput.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.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.TangentLineAutomaticAtBoundaries);
+ Assert.IsFalse(input.CreateZones);
+ Assert.IsFalse(input.AutomaticForbiddenZones);
+
+ Assert.AreEqual(MacroStabilityInwardsDikeSoilScenario.ClayDikeOnClay, input.DikeSoilScenario);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorTest.cs
===================================================================
diff -u -r551dedc408a4155fc9484b03107b533347a8b4fb -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision 551dedc408a4155fc9484b03107b533347a8b4fb)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/UpliftVanCalculatorTest.cs (.../UpliftVanCalculatorTest.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -60,7 +60,7 @@
public void Constructor_FactoryNull_ArgumentNullException()
{
// Call
- var input = new MacroStabilityInwardsCalculatorInput(CreateSimpleConstructionProperties());
+ var input = new UpliftVanCalculatorInput(CreateSimpleConstructionProperties());
TestDelegate call = () => new UpliftVanCalculator(input, null);
// Assert
@@ -76,7 +76,7 @@
var factory = mocks.Stub();
mocks.ReplayAll();
- var input = new MacroStabilityInwardsCalculatorInput(CreateSimpleConstructionProperties());
+ var input = new UpliftVanCalculatorInput(CreateSimpleConstructionProperties());
// Call
var calculator = new UpliftVanCalculator(input, factory);
@@ -91,7 +91,7 @@
// Setup
var random = new Random(11);
- var input = new MacroStabilityInwardsCalculatorInput(CreateSimpleConstructionProperties());
+ var input = new UpliftVanCalculatorInput(CreateSimpleConstructionProperties());
var testMacroStabilityInwardsKernelFactory = new TestMacroStabilityInwardsKernelFactory();
UpliftVanKernelStub upliftVanKernel = testMacroStabilityInwardsKernelFactory.LastCreatedUpliftVanKernel;
upliftVanKernel.FactorOfStability = random.NextDouble();
@@ -126,7 +126,7 @@
public void Validate_Always_ReturnEmptyList()
{
// Setup
- var input = new MacroStabilityInwardsCalculatorInput(CreateSimpleConstructionProperties());
+ var input = new UpliftVanCalculatorInput(CreateSimpleConstructionProperties());
var testMacroStabilityInwardsSubCalculatorFactory = new TestMacroStabilityInwardsKernelFactory();
// Call
@@ -136,12 +136,12 @@
CollectionAssert.IsEmpty(validationResult);
}
- private static MacroStabilityInwardsCalculatorInput.ConstructionProperties CreateSimpleConstructionProperties()
+ private static UpliftVanCalculatorInput.ConstructionProperties CreateSimpleConstructionProperties()
{
var random = new Random(21);
MacroStabilityInwardsSurfaceLine surfaceLine = CreateValidSurfaceLine();
- return new MacroStabilityInwardsCalculatorInput.ConstructionProperties
+ return new UpliftVanCalculatorInput.ConstructionProperties
{
AssessmentLevel = random.NextDouble(),
SurfaceLine = surfaceLine,
Fisheye: Tag 497172e737ffc201c0f905e85a246cdba3c0cb1c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/MacroStabilityInwardsCalculatorStubTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj
===================================================================
diff -u -r83f824a69b1a78fc4822ac19375e60e6c9be7d87 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision 83f824a69b1a78fc4822ac19375e60e6c9be7d87)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test.csproj) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -53,7 +53,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/TestMacroStabilityInwardsCalculatorFactoryTest.cs
===================================================================
diff -u -r83f824a69b1a78fc4822ac19375e60e6c9be7d87 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/TestMacroStabilityInwardsCalculatorFactoryTest.cs (.../TestMacroStabilityInwardsCalculatorFactoryTest.cs) (revision 83f824a69b1a78fc4822ac19375e60e6c9be7d87)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/TestMacroStabilityInwardsCalculatorFactoryTest.cs (.../TestMacroStabilityInwardsCalculatorFactoryTest.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -35,19 +35,19 @@
// Assert
Assert.IsInstanceOf(factory);
- Assert.IsNotNull(factory.LastCreatedCalculator);
- Assert.IsNull(factory.LastCreatedCalculator.Input);
+ Assert.IsNotNull(factory.LastCreatedUpliftVanCalculator);
+ Assert.IsNull(factory.LastCreatedUpliftVanCalculator.Input);
}
[Test]
- public void CreateCalculator_Always_ReturnStubWithInputSet()
+ public void CreateUpliftVanCalculatorr_Always_ReturnStubWithInputSet()
{
// Setup
var factory = new TestMacroStabilityInwardsCalculatorFactory();
- var input = new MacroStabilityInwardsCalculatorInput(new MacroStabilityInwardsCalculatorInput.ConstructionProperties());
+ var input = new UpliftVanCalculatorInput(new UpliftVanCalculatorInput.ConstructionProperties());
// Call
- var calculator = (MacroStabilityInwardsCalculatorStub) factory.CreateCalculator(input, new TestMacroStabilityInwardsKernelFactory());
+ var calculator = (UpliftVanCalculatorStub) factory.CreateUpliftVanCalculator(input, new TestMacroStabilityInwardsKernelFactory());
// Assert
Assert.AreSame(input, calculator.Input);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/UpliftVanCalculatorStubTest.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/UpliftVanCalculatorStubTest.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test/UpliftVanCalculatorStubTest.cs (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -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.Collections.Generic;
+using NUnit.Framework;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.Test
+{
+ [TestFixture]
+ public class UpliftVanCalculatorStubTest
+ {
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Call
+ var calculator = new UpliftVanCalculatorStub();
+
+ // Assert
+ Assert.IsInstanceOf(calculator);
+ Assert.IsNull(calculator.Input);
+ Assert.IsNull(calculator.Output);
+ }
+
+ [Test]
+ public void Validate_Always_ReturnEmptyList()
+ {
+ // Setup
+ var calculator = new UpliftVanCalculatorStub();
+
+ // Call
+ List messages = calculator.Validate();
+
+ // Assert
+ CollectionAssert.IsEmpty(messages);
+ }
+
+ [Test]
+ public void Calculate_Always_ReturnResult()
+ {
+ // Setup
+ var calculator = new UpliftVanCalculatorStub();
+
+ // Call
+ UpliftVanCalculatorResult result = calculator.Calculate();
+
+ // Assert
+ Assert.AreEqual(0.1, result.FactorOfStability);
+ Assert.AreEqual(0.2, result.ZValue);
+ Assert.AreEqual(0.3, result.ForbiddenZonesXEntryMin);
+ Assert.AreEqual(0.4, result.ForbiddenZonesXEntryMax);
+ Assert.IsNotNull(result.SlidingCurveResult);
+ Assert.IsNotNull(result.CalculationGridResult);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 497172e737ffc201c0f905e85a246cdba3c0cb1c refers to a dead (removed) revision in file `Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/MacroStabilityInwardsCalculatorStub.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj
===================================================================
diff -u -r83f824a69b1a78fc4822ac19375e60e6c9be7d87 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 83f824a69b1a78fc4822ac19375e60e6c9be7d87)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj (.../Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil.csproj) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -68,7 +68,7 @@
-
+
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs
===================================================================
diff -u -rd6c2f6364fcba038152ea93e0e420e03989dd35a -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs (.../TestMacroStabilityInwardsCalculatorFactory.cs) (revision d6c2f6364fcba038152ea93e0e420e03989dd35a)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/TestMacroStabilityInwardsCalculatorFactory.cs (.../TestMacroStabilityInwardsCalculatorFactory.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -33,18 +33,18 @@
///
public TestMacroStabilityInwardsCalculatorFactory()
{
- LastCreatedCalculator = new MacroStabilityInwardsCalculatorStub();
+ LastCreatedUpliftVanCalculator = new UpliftVanCalculatorStub();
}
///
- /// Gets the last created .
+ /// Gets the last created .
///
- public MacroStabilityInwardsCalculatorStub LastCreatedCalculator { get; }
+ public UpliftVanCalculatorStub LastCreatedUpliftVanCalculator { get; }
- public IUpliftVanCalculator CreateCalculator(MacroStabilityInwardsCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
+ public IUpliftVanCalculator CreateUpliftVanCalculator(UpliftVanCalculatorInput input, IMacroStabilityInwardsKernelFactory factory)
{
- LastCreatedCalculator.Input = input;
- return LastCreatedCalculator;
+ LastCreatedUpliftVanCalculator.Input = input;
+ return LastCreatedUpliftVanCalculator;
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/UpliftVanCalculatorStub.cs
===================================================================
diff -u
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/UpliftVanCalculatorStub.cs (revision 0)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/UpliftVanCalculatorStub.cs (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -0,0 +1,45 @@
+// 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.Collections.Generic;
+
+namespace Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil
+{
+ ///
+ /// Stub for the real macro stability inwards calculator.
+ ///
+ public class UpliftVanCalculatorStub : IUpliftVanCalculator
+ {
+ public UpliftVanCalculatorInput Input { get; set; }
+
+ public UpliftVanCalculatorResult Output { get; private set; }
+
+ public UpliftVanCalculatorResult Calculate()
+ {
+ return Output ?? (Output = MacroStabilityInwardsCalculatorResultTestFactory.Create());
+ }
+
+ public List Validate()
+ {
+ return new List();
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs
===================================================================
diff -u -r283274d59060df06800cc23bd00ea9a31535d174 -r497172e737ffc201c0f905e85a246cdba3c0cb1c
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 283274d59060df06800cc23bd00ea9a31535d174)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsCalculationServiceTest.cs (.../MacroStabilityInwardsCalculationServiceTest.cs) (revision 497172e737ffc201c0f905e85a246cdba3c0cb1c)
@@ -339,13 +339,13 @@
MacroStabilityInwardsCalculationService.Calculate(testCalculation);
// Assert
- AssertOutput(calculatorFactory.LastCreatedCalculator.Output, testCalculation.Output);
+ AssertOutput(calculatorFactory.LastCreatedUpliftVanCalculator.Output, testCalculation.Output);
}
}
private static void AssertInput(MacroStabilityInwardsInput originalInput, TestMacroStabilityInwardsCalculatorFactory factory)
{
- MacroStabilityInwardsCalculatorInput actualInput = factory.LastCreatedCalculator.Input;
+ UpliftVanCalculatorInput actualInput = factory.LastCreatedUpliftVanCalculator.Input;
Assert.AreSame(originalInput.SoilProfileUnderSurfaceLine, actualInput.SoilProfile);
Assert.AreSame(originalInput.SurfaceLine, actualInput.SurfaceLine);
Assert.AreEqual(originalInput.AssessmentLevel, actualInput.AssessmentLevel);