// Copyright (C) Stichting Deltares 2018. 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; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Geotechnics; namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon { public static class DamMacroStabilityTestHelper { public static DesignScenario CreateScenarioForLocation(Location location, SurfaceLine2 surfaceLine) { DesignScenario scenario = new DesignScenario(); scenario.Location = location; scenario.Location.DamType = DamType.Regional; scenario.Location.Name = "LocationName"; scenario.Location.DikeEmbankmentMaterial = "OB1"; scenario.Location.ShoulderEmbankmentMaterial = "OB2"; scenario.Location.SoilList = CreateSoilList(); scenario.LocationScenarioID = "ScenarioID"; scenario.Location.SurfaceLine = surfaceLine; return scenario; } private 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); 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); return soilList; } } }