Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs =================================================================== diff -u -r2722 -r2889 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 2722) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 2889) @@ -27,6 +27,7 @@ using System.Xml.Linq; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon.Assemblers; +using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon.TestHelpers; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.DamEngine.TestHelpers.Factories; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/TestHelpers/DamMacroStabilityTestHelper.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/TestHelpers/DamMacroStabilityTestHelper.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/TestHelpers/DamMacroStabilityTestHelper.cs (revision 2889) @@ -0,0 +1,261 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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 Deltares.DamEngine.Data.Design; +using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.Geometry; +using Deltares.DamEngine.Data.Geotechnics; + +namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon.TestHelpers +{ + public static class DamMacroStabilityTestHelper + { + /// + /// Creates the scenario for testing. + /// + /// The location. + /// + public static DesignScenario CreateScenario(Location location) + { + DesignScenario scenario = new DesignScenario + { + Location = location, + LocationScenarioID = "ScenarioID" + }; + return scenario; + } + /// + /// Creates the location for testing. + /// + /// The surface line. + /// + public static Location CreateLocation(SurfaceLine2 surfaceLine) + { + Location location = new Location(); + var scenario = new DesignScenario(); + location.Scenarios.Add(scenario); + location.Name = "LocationName"; + location.DikeEmbankmentMaterial = "OB1"; + location.ShoulderEmbankmentMaterial = "OB2"; + location.SoilList = CreateSoilList(); + var dikeToe = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver); + dikeToe.Z = dikeToe.Z - 0.01; + location.SurfaceLine = surfaceLine; + return location; + } + + /// + /// Creates the soil list for the tests. + /// + /// + public static SoilList CreateSoilList() + { + var soilList = new SoilList(); + var s1 = new Soil("DKN5") + { + AbovePhreaticLevel = 17.5, + BelowPhreaticLevel = 17.50 + }; + soilList.Soils.Add(s1); + var s2 = new Soil("DKN4") + { + AbovePhreaticLevel = 17.16, + BelowPhreaticLevel = 17.16 + }; + soilList.Soils.Add(s2); + var s3 = new Soil("OA") + { + AbovePhreaticLevel = 18.00, + BelowPhreaticLevel = 20.00 + }; + soilList.Soils.Add(s3); + var s4 = new Soil("DKN3"); + soilList.Soils.Add(s4); + var s5 = new Soil("LM"); + soilList.Soils.Add(s5); + + var s6 = new Soil("OB1"); + soilList.Soils.Add(s6); + var s7 = new Soil("OB2"); + soilList.Soils.Add(s7); + + var s8 = new Soil("veen") + { + AbovePhreaticLevel = 10.15, + BelowPhreaticLevel = 10.20 + }; + soilList.Soils.Add(s8); + + var s9 = new Soil("Del_Tfg") + { + AbovePhreaticLevel = 10.15, + BelowPhreaticLevel = 10.20 + }; + soilList.Soils.Add(s9); + + var s10 = new Soil("Del_Tss_1") + { + AbovePhreaticLevel = 14.46, + BelowPhreaticLevel = 14.50 + }; + soilList.Soils.Add(s10); + + var s11 = new Soil("Del_Ffg") + { + AbovePhreaticLevel = 12.65, + BelowPhreaticLevel = 12.70 + }; + soilList.Soils.Add(s11); + + var s12 = new Soil("Del_Kms") + { + AbovePhreaticLevel = 18, + BelowPhreaticLevel = 20 + }; + soilList.Soils.Add(s12); + + var s13 = new Soil("Del_Ssc") + { + AbovePhreaticLevel = 18, + BelowPhreaticLevel = 20 + }; + soilList.Soils.Add(s13); + + var s14 = new Soil("DeL_Tcs") + { + AbovePhreaticLevel = 16.05, + BelowPhreaticLevel = 17.74 + }; + soilList.Soils.Add(s14); + + var s15 = new Soil("Del_Ppp") + { + AbovePhreaticLevel = 18, + BelowPhreaticLevel = 20 + }; + soilList.Soils.Add(s15); + soilList.AquiferDictionary = new Dictionary(); + soilList.AquiferDictionary.Add(s1, false); + soilList.AquiferDictionary.Add(s2, false); + soilList.AquiferDictionary.Add(s3, true); + soilList.AquiferDictionary.Add(s4, false); + soilList.AquiferDictionary.Add(s5, true); + soilList.AquiferDictionary.Add(s6, false); + soilList.AquiferDictionary.Add(s7, false); + soilList.AquiferDictionary.Add(s8, false); + soilList.AquiferDictionary.Add(s9, false); + soilList.AquiferDictionary.Add(s10, false); + soilList.AquiferDictionary.Add(s11, false); + soilList.AquiferDictionary.Add(s12, false); + soilList.AquiferDictionary.Add(s13, true); + soilList.AquiferDictionary.Add(s14, false); + soilList.AquiferDictionary.Add(s15, false); + return soilList; + } + + /// + /// Creates a 2D soil profile for the tests. + /// + /// + public static SoilProfile2D CreateSoilProfile2D() + { + SoilProfile2D soilProfile2D = new SoilProfile2D(); + + var geometry = new GeometryData(); + geometry.Left = 0; + geometry.Right = 100; + geometry.Bottom = -10; + soilProfile2D.Geometry = geometry; + + var layer = new SoilLayer2D + { + Name = "Layer 1", + Soil = new Soil("OA", 17.70, 17.70) + }; + layer.GeometrySurface = new GeometrySurface(); + var outerLoop = new GeometryLoop(); + var point1 = new Point2D(0, 1); + var point2 = new Point2D(100, 1); + var point3 = new Point2D(100, -5); + var point4 = new Point2D(0, -5); + outerLoop.CurveList.Add(new GeometryCurve(point1, point2)); + outerLoop.CurveList.Add(new GeometryCurve(point2, point3)); + outerLoop.CurveList.Add(new GeometryCurve(point3, point4)); + outerLoop.CurveList.Add(new GeometryCurve(point4, point1)); + layer.GeometrySurface.OuterLoop = outerLoop; + layer.WaterpressureInterpolationModel = WaterpressureInterpolationModel.Hydrostatic; + layer.IsAquifer = true; + soilProfile2D.Surfaces.Add(layer); + + layer = new SoilLayer2D + { + Name = "Layer 2", + Soil = new Soil("LM", 18.00, 18.00) + }; + layer.GeometrySurface = new GeometrySurface(); + outerLoop = new GeometryLoop(); + var point5 = new Point2D(0, -10); + var point6 = new Point2D(100, -10); + outerLoop.CurveList.Add(new GeometryCurve(point4, point3)); + outerLoop.CurveList.Add(new GeometryCurve(point3, point6)); + outerLoop.CurveList.Add(new GeometryCurve(point6, point5)); + outerLoop.CurveList.Add(new GeometryCurve(point5, point4)); + layer.GeometrySurface.OuterLoop = outerLoop; + layer.WaterpressureInterpolationModel = WaterpressureInterpolationModel.Hydrostatic; + layer.IsAquifer = true; + soilProfile2D.Surfaces.Add(layer); + + return soilProfile2D; + } + + /// + /// Creates a 1D soil profile for the tests. + /// + /// + public static SoilProfile1D CreateSoilProfile1D() + { + SoilProfile1D soilProfile1D = new SoilProfile1D(); + soilProfile1D.BottomLevel = -10; + + var layer = new SoilLayer1D + { + Name = "Layer 1", + Soil = new Soil("OA", 17.70, 17.70) + }; + layer.TopLevel = 1; + layer.IsAquifer = true; + soilProfile1D.Layers.Add(layer); + + layer = new SoilLayer1D + { + Name = "Layer 2", + Soil = new Soil("LM", 18.00, 18.00) + }; + layer.TopLevel = -10; + layer.IsAquifer = true; + soilProfile1D.Layers.Add(layer); + + return soilProfile1D; + } + + } +} Fisheye: Tag 2889 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/DamMacroStabilityTestHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/UpliftHelperTests.cs =================================================================== diff -u -r2173 -r2889 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/UpliftHelperTests.cs (.../UpliftHelperTests.cs) (revision 2173) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/UpliftHelperTests.cs (.../UpliftHelperTests.cs) (revision 2889) @@ -21,7 +21,7 @@ using System.IO; using Deltares.DamEngine.Calculators.KernelWrappers.Common; -using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon; +using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon.TestHelpers; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.TestHelpers.Factories; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r2173 -r2889 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 2173) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 2889) @@ -27,7 +27,7 @@ using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; -using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon; +using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon.TestHelpers; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.Results; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj =================================================================== diff -u -r2884 -r2889 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 2884) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 2889) @@ -85,14 +85,14 @@ + - @@ -220,7 +220,9 @@ PreserveNewest - + + +