Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsOutput.cs
===================================================================
diff -u -r1bb88ae89a19c2213d616243bca2a3a6326c5612 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsOutput.cs (.../MacroStabilityInwardsOutput.cs) (revision 1bb88ae89a19c2213d616243bca2a3a6326c5612)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsOutput.cs (.../MacroStabilityInwardsOutput.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -50,7 +50,7 @@
#region properties
///
- /// Gets the factory of stability of the upliftVan calculation.
+ /// Gets the factor of stability of the upliftVan calculation.
///
public double FactorOfStability { get; }
@@ -70,7 +70,7 @@
}
///
- /// Gets or sets the factory of stability of the upliftVan calculation.
+ /// Gets or sets the factor of stability of the upliftVan calculation.
///
public double FactorOfStability { internal get; set; }
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs
===================================================================
diff -u -r9143ff3b15c83b84e3d30f2eb193f951f7295935 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 9143ff3b15c83b84e3d30f2eb193f951f7295935)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculator.cs (.../MacroStabilityInwardsCalculator.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -71,7 +71,11 @@
return new MacroStabilityInwardsCalculatorResult(new MacroStabilityInwardsCalculatorResult.ConstructionProperties
{
- FactorOfStability = upliftVanCalculator.FactoryOfStability
+ FactorOfStability = upliftVanCalculator.FactoryOfStability,
+ ZValue = upliftVanCalculator.ZValue,
+ ForbiddenZonesXEntryMin = upliftVanCalculator.ForbiddenZonesXEntryMin,
+ ForbiddenZonesXEntryMax = upliftVanCalculator.ForbiddenZonesXEntryMax,
+ ForbiddenZonesAutomaticallyCalculated = upliftVanCalculator.ForbiddenZonesAutomaticallyCalculated
});
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorResult.cs
===================================================================
diff -u -r1bb88ae89a19c2213d616243bca2a3a6326c5612 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorResult.cs (.../MacroStabilityInwardsCalculatorResult.cs) (revision 1bb88ae89a19c2213d616243bca2a3a6326c5612)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorResult.cs (.../MacroStabilityInwardsCalculatorResult.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -44,15 +44,39 @@
}
FactorOfStability = properties.FactorOfStability;
+ ZValue = properties.ZValue;
+ ForbiddenZonesXEntryMin = properties.ForbiddenZonesXEntryMin;
+ ForbiddenZonesXEntryMax = properties.ForbiddenZonesXEntryMax;
+ ForbiddenZonesAutomaticallyCalculated = properties.ForbiddenZonesAutomaticallyCalculated;
}
#region properties
///
- /// Gets the factory of stability of the uplift van calculation.
+ /// Gets the factor of stability of the uplift van calculation.
///
public double FactorOfStability { get; }
+ ///
+ /// Gets the z value.
+ ///
+ public double ZValue { get; }
+
+ ///
+ /// Gets the forbidden zones x entry min.
+ ///
+ public double ForbiddenZonesXEntryMin { get; }
+
+ ///
+ /// Gets the forbidden zones x entry max.
+ ///
+ public double ForbiddenZonesXEntryMax { get; }
+
+ ///
+ /// Gets whether the forbidden zones are automatically calculated.
+ ///
+ public bool ForbiddenZonesAutomaticallyCalculated { get; }
+
#endregion
///
@@ -66,12 +90,35 @@
public ConstructionProperties()
{
FactorOfStability = double.NaN;
+ ZValue = double.NaN;
+ ForbiddenZonesXEntryMin = double.NaN;
+ ForbiddenZonesXEntryMax = double.NaN;
}
///
- /// Gets or sets the factory of stability of the uplift van calculation.
+ /// Gets or sets the factor of stability of the uplift van calculation.
///
public double FactorOfStability { internal get; set; }
+
+ ///
+ /// Gets or sets the z value.
+ ///
+ public double ZValue { internal get; set; }
+
+ ///
+ /// Gets or sets the forbidden zones x entry min.
+ ///
+ public double ForbiddenZonesXEntryMin { internal get; set; }
+
+ ///
+ /// Gets or sets the forbidden zones x entry max.
+ ///
+ public double ForbiddenZonesXEntryMax { internal get; set; }
+
+ ///
+ /// Gets or sets whether the forbidden zones are automatically calculated.
+ ///
+ public bool ForbiddenZonesAutomaticallyCalculated { internal get; set; }
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs
===================================================================
diff -u -r9143ff3b15c83b84e3d30f2eb193f951f7295935 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 9143ff3b15c83b84e3d30f2eb193f951f7295935)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/IUpliftVanCalculator.cs (.../IUpliftVanCalculator.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -30,11 +30,6 @@
public interface IUpliftVanCalculator
{
///
- /// Performs the upliftVan calculation.
- ///
- void Calculate();
-
- ///
/// Sets the soil model.
///
SoilModel SoilModel { set; }
@@ -97,8 +92,43 @@
double SlipPlaneMinimumLength { set; }
///
- /// Gets the factory of stability.
+ /// Gets the factor of stability.
///
double FactoryOfStability { get; }
+
+ ///
+ /// Gets the z value.
+ ///
+ double ZValue { get; }
+
+ ///
+ /// Gets the forbidden zones x entry min.
+ ///
+ double ForbiddenZonesXEntryMin { get; }
+
+ ///
+ /// Gets the forbidden zones x entry max.
+ ///
+ double ForbiddenZonesXEntryMax { get; }
+
+ ///
+ /// Gets whether the forbidden zones are automatically calculated.
+ ///
+ bool ForbiddenZonesAutomaticallyCalculated { get; }
+
+ ///
+ /// Gets the sliding curve.
+ ///
+ SlidingCurve SlidingCurve { get; }
+
+ ///
+ /// Gets the slip plane.
+ ///
+ SlipPlaneUpliftVan SlipPlane { get; }
+
+ ///
+ /// Performs the upliftVan calculation.
+ ///
+ void Calculate();
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs
===================================================================
diff -u -r9143ff3b15c83b84e3d30f2eb193f951f7295935 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 9143ff3b15c83b84e3d30f2eb193f951f7295935)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/SubCalculator/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -19,6 +19,8 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
+using System.Linq;
using Deltares.WTIStability;
using Deltares.WTIStability.Calculation.Wrapper;
using Deltares.WTIStability.Data.Geo;
@@ -164,18 +166,48 @@
}
}
+ public double FactoryOfStability { get; private set; }
+
+ public double ZValue { get; private set; }
+
+ public double ForbiddenZonesXEntryMin { get; private set; }
+
+ public double ForbiddenZonesXEntryMax { get; private set; }
+
+ public bool ForbiddenZonesAutomaticallyCalculated { get; private set; }
+
+ public SlidingCurve SlidingCurve { get; private set; }
+
+ public SlipPlaneUpliftVan SlipPlane { get; private set; }
+
public void Calculate()
{
wrappedCalculator.InitializeForDeterministic(WTISerializer.Serialize(calculatorInput));
string messages = wrappedCalculator.Validate();
string result = wrappedCalculator.Run();
+ ReadResult(result);
+ }
+
+ private void ReadResult(string result)
+ {
StabilityAssessmentCalculationResult convertedResult = WTIDeserializer.DeserializeResult(result);
+ if (convertedResult.Messages.Any())
+ {
+ throw new Exception();
+ }
+
FactoryOfStability = convertedResult.FactorOfSafety;
- }
+ ZValue = convertedResult.ZValue;
- public double FactoryOfStability { get; private set; }
+ ForbiddenZonesXEntryMin = convertedResult.XMinEntry;
+ ForbiddenZonesXEntryMax = convertedResult.XMaxEntry;
+ ForbiddenZonesAutomaticallyCalculated = convertedResult.AreForbiddenZonesAuto;
+
+ SlidingCurve = convertedResult.Curve;
+ SlipPlane = convertedResult.SlipPlaneUpliftVan;
+ }
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorResultTest.cs
===================================================================
diff -u -r9143ff3b15c83b84e3d30f2eb193f951f7295935 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorResultTest.cs (.../MacroStabilityInwardsCalculatorResultTest.cs) (revision 9143ff3b15c83b84e3d30f2eb193f951f7295935)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.Test/MacroStabilityInwardsCalculatorResultTest.cs (.../MacroStabilityInwardsCalculatorResultTest.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using Core.Common.TestUtil;
using NUnit.Framework;
namespace Ringtoets.MacroStabilityInwards.KernelWrapper.Test
@@ -46,6 +47,10 @@
// Assert
Assert.IsNaN(result.FactorOfStability);
+ Assert.IsNaN(result.ZValue);
+ Assert.IsNaN(result.ForbiddenZonesXEntryMin);
+ Assert.IsNaN(result.ForbiddenZonesXEntryMax);
+ Assert.IsFalse(result.ForbiddenZonesAutomaticallyCalculated);
}
[Test]
@@ -54,17 +59,29 @@
// Setup
var random = new Random(21);
double factorOfStability = random.NextDouble();
+ double zValue = random.NextDouble();
+ double xEntryMin = random.NextDouble();
+ double xEntryMax = random.NextDouble();
+ bool forbiddenZonesAutomaticallyCalculated = random.NextBoolean();
var constructionProperties = new MacroStabilityInwardsCalculatorResult.ConstructionProperties
{
- FactorOfStability = factorOfStability
+ FactorOfStability = factorOfStability,
+ ZValue = zValue,
+ ForbiddenZonesXEntryMin = xEntryMin,
+ ForbiddenZonesXEntryMax = xEntryMax,
+ ForbiddenZonesAutomaticallyCalculated = forbiddenZonesAutomaticallyCalculated
};
// Call
var result = new MacroStabilityInwardsCalculatorResult(constructionProperties);
// Assert
Assert.AreEqual(factorOfStability, result.FactorOfStability);
+ Assert.AreEqual(zValue, result.ZValue);
+ Assert.AreEqual(xEntryMin, result.ForbiddenZonesXEntryMin);
+ Assert.AreEqual(xEntryMax, result.ForbiddenZonesXEntryMax);
+ Assert.AreEqual(forbiddenZonesAutomaticallyCalculated, result.ForbiddenZonesAutomaticallyCalculated);
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs
===================================================================
diff -u -r9143ff3b15c83b84e3d30f2eb193f951f7295935 -r0e9146a3375e69a172409554b934db2cc14b3f84
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 9143ff3b15c83b84e3d30f2eb193f951f7295935)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.KernelWrapper.TestUtil/SubCalculator/UpliftVanCalculatorStub.cs (.../UpliftVanCalculatorStub.cs) (revision 0e9146a3375e69a172409554b934db2cc14b3f84)
@@ -61,6 +61,18 @@
public double FactoryOfStability { get; set; }
+ public double ZValue { get; set; }
+
+ public double ForbiddenZonesXEntryMin { get; set; }
+
+ public double ForbiddenZonesXEntryMax { get; set; }
+
+ public bool ForbiddenZonesAutomaticallyCalculated { get; set; }
+
+ public SlidingCurve SlidingCurve { get; set; }
+
+ public SlipPlaneUpliftVan SlipPlane { get; set; }
+
public void Calculate()
{
Calculated = true;