Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/DamMStabAssemblerTest.cs =================================================================== diff -u -r1122 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/DamMStabAssemblerTest.cs (.../DamMStabAssemblerTest.cs) (revision 1122) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/DamMStabAssemblerTest.cs (.../DamMStabAssemblerTest.cs) (revision 1203) @@ -194,7 +194,7 @@ geometryCreationOptions.IsDesign = true; // MStabDesignEmbankment design - design = new MStabDesignEmbankment(); + design = new EmbankmentDesignParameters(); design.EmbankmentMaterialname = "soiltest"; design.PreviousGeometry2DFilename = "soilname/Path/testFileNameWithPLLines.sti"; @@ -291,7 +291,7 @@ private MStabGeometryCreationOptions geometryCreationOptions; private SheetPiling sheetPiling; private HorizontalBalanceArea horizontalBalanceArea; - private MStabDesignEmbankment design; + private EmbankmentDesignParameters design; private SlipCircleDefinition slipCircleDefinition; [TestFixtureSetUp] Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs =================================================================== diff -u -r1122 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs (.../MStabParameters.cs) (revision 1122) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs (.../MStabParameters.cs) (revision 1203) @@ -367,24 +367,7 @@ } } - public class MStabDesignEmbankment : IAssignable, ICloneable - { - public string EmbankmentMaterialname { get; set; } - public string PreviousGeometry2DFilename { get; set; } - public void Assign(MStabDesignEmbankment mstabDesignEmbankment) - { - this.EmbankmentMaterialname = mstabDesignEmbankment.EmbankmentMaterialname; - this.PreviousGeometry2DFilename = mstabDesignEmbankment.PreviousGeometry2DFilename; - } - public MStabDesignEmbankment Clone() - { - var mstabDesignEmbankment = new MStabDesignEmbankment(); - mstabDesignEmbankment.Assign(this); - return mstabDesignEmbankment; - } - } - public class MStabGeometryCreationOptions : IAssignable, ICloneable { public MStabGeometryCreationOptions() Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs =================================================================== diff -u -r1174 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 1174) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 1203) @@ -61,7 +61,7 @@ /// The river level high. /// The river level low. /// The sub soil scenario. - /// The mstab design embankment. + /// The embankment design parameters. /// The required safety factor. /// The input failure mechanism parameters m stab. /// The error messages. @@ -73,7 +73,7 @@ double riverLevelHigh, double? riverLevelLow, SoilGeometryProbability subSoilScenario, - MStabDesignEmbankment mstabDesignEmbankment, + EmbankmentDesignParameters embankmentDesignParameters, double requiredSafetyFactor, FailureMechanismParametersMStab inputFailureMechanismParametersMStab, out List errorMessages) { @@ -110,7 +110,7 @@ failureMechanismParametersMStab.MStabParameters.GeometryCreationOptions.IsUseOriginalPlLineAssignments = location.IsUseOriginalPlLineAssignments; failureMechanismParametersMStab.MStabParameters.GeometryCreationOptions.IsDesign = - (mstabDesignEmbankment != null); + (embankmentDesignParameters != null); failureMechanismParametersMStab.MStabParameters.GeometryCreationOptions.XOffsetSoilGeometry2DOrigin = -location.XSoilGeometry2DOrigin; failureMechanismParametersMStab.MStabParameters.GeometryCreationOptions.PlLineAssignment = @@ -124,7 +124,7 @@ // End of Geometry Creation Options // Design options - failureMechanismParametersMStab.Design = mstabDesignEmbankment; + failureMechanismParametersMStab.Design = embankmentDesignParameters; failureMechanismParametersMStab.SurfaceLine = location.SurfaceLine; failureMechanismParametersMStab.RiverLevel = riverLevelHigh; Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r1175 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 1175) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 1203) @@ -716,8 +716,89 @@ Assert.AreEqual(DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan, result.StabilityDesignResults.StabilityModelType); } - public string ChangeInputModel(string input, InputStabilityModelType modelType) + [Test] + // Expected results are determined by running .\DamUI\trunk\data\DamEngineTestProjects\DAM Tutorial Design\DAM Tutorial Design.damx + // with Dam Classic rev.1059 + // Select 1st location (DWP_1) + // Model Bishop, Set safetyfactor Inwards to 1.4 + // Design strategy: SlopeAdaptionBeforeShoulderAdaption + // Result: + // SF = 1.412 + // Shoulderheight = 3.889 + // DTH = 4.9 + // Dikelength = 43.760 + // Zone 1 entrypoint circle local X = 50.236 + // Zone 1 entrypoint circle local Z = 4.144 + // Zone 1 exitpoint circle local X = 67.077 + // Zone 1 exitpoint circle local Z = 1.677 + public void CanPerformStabilityInwardsDesignTutorialDesign1Location() { + const string calcDir = "TestStabInwardsBishopDesign"; + const string fileName = @"TestFiles\MacroStabilityTutorialDesignInputFile1LocationWithAdaption.xml"; + string inputString = File.ReadAllText(fileName); + inputString = XmlAdapter.ChangeValueInXml(inputString, "ProjectPath", ""); // Current directory will be used + inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used + inputString = XmlAdapter.ChangeValueInXml(inputString, "MapForSoilgeometries2D", @"TestFiles\DAM Tutorial Design.geometries2D.0\"); + inputString = XmlAdapter.ChangeValueInXml(inputString, "SoilDatabaseName", @"TestFiles\DAM Tutorial Design0.soilmaterials.mdb"); + EngineInterface engineInterface = new EngineInterface(inputString); + Assert.IsNotNull(engineInterface.DamProjectData); + + string outputString = engineInterface.Run(); + + Assert.IsNotNull(outputString); + var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); +// Assert.AreEqual(1.282, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.SafetyFactor, tolerance); +// // Zone1SafetyFactor=1.282 +// Assert.AreEqual(1.282, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone1SafetyFactor, tolerance); +// +// // Zone1EntryPointX Local =38.818 Global=47.238 +// Assert.AreEqual(38.818, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone1EntryPointX, tolerance); +// // Zone1ExitPointX Local=64.262 Global=72.682 +// Assert.AreEqual(64.262, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone1ExitPointX, tolerance); +// +// // Zone2SafetyFactor null, is set to default reading from output.xml +// Assert.AreEqual(0, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone2SafetyFactor, tolerance); +// // Zone2EntryPointX null, is set to default reading from output.xml +// Assert.AreEqual(0, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone2EntryPointX, tolerance); +// // Zone2ExitPointX null, is set to default reading from output.xml +// Assert.AreEqual(0, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.Zone2ExitPointX, tolerance); +// +// // NumberOfIterations=0 +// Assert.AreEqual(0, output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.NumberOfIterations); +// // ResultMessage "" +// Assert.AreEqual("", output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.ResultMessage); +// +// // Check that a line is specified +// Assert.IsNotNull(output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.RedesignedSurfaceLine); +// +// // Profile name = DWP_1.sti +// Assert.AreEqual("DWP_1.sti", output.Results.CalculationResults.DesignResults[0].ProfileName); +// +// // Uplift +// var upliftSituation = output.Results.CalculationResults.DesignResults[0].StabilityDesignResults.UpliftSituation; +// Assert.IsNotNull(upliftSituation); +// Assert.AreEqual(true, upliftSituation.IsUplift); +// Assert.AreEqual(1.141, upliftSituation.Pl3MinUplift, tolerance); +// Assert.AreEqual(4.4, upliftSituation.Pl3HeadAdjusted, tolerance); +// Assert.AreEqual(60.64, upliftSituation.Pl3LocationXMinUplift, tolerance); +// Assert.AreEqual(0.0, upliftSituation.Pl4MinUplift, tolerance); +// Assert.AreEqual(0.0, upliftSituation.Pl4HeadAdjusted, tolerance); +// Assert.AreEqual(0.0, upliftSituation.Pl4LocationXMinUplift, tolerance); +// +// // Calculation Result +// Assert.AreEqual(CalculationResult.Succeeded, ConversionHelper.ConvertToCalculationResult(output.Results.CalculationResults.DesignResults[0].CalculationResult)); + } + [Test] + // Expected results are determined by running .\DamUI\trunk\data\DamEngineTestProjects\DAM Tutorial Design\DAM Tutorial Design.damx + // with Dam Classic rev.1059 + // Select .. location (DWP_1, DWP_10, DWP_16, DWP_19, DWP_23,DWP_9) + // Model Bishop + public void CanPerformStabilityInwardsDesignTutorialDesignMultiplLocations() + { + + } + private string ChangeInputModel(string input, InputStabilityModelType modelType) + { string pattern = "StabilityModelType=\"Bishop\""; string replacement = pattern; switch (modelType) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs =================================================================== diff -u -r1198 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1198) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1203) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Data; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; using Deltares.DamEngine.Calculators.Properties; @@ -347,6 +348,11 @@ return (fosAchieved >= fosRequiered); } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + throw new NotImplementedException(); + } + /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (revision 1203) @@ -0,0 +1,36 @@ +// 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; + +namespace Deltares.DamEngine.Calculators.DikesDesign +{ + /// + /// Design strategy: combined slope adaption and shoulder adaption + /// + class DesignCalculatorCombinedSlopeAndShoulderAdaption + { + } +} Fisheye: Tag 1203 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesignHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1203 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/ShoulderDesign.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesignHelper.cs =================================================================== diff -u -r1121 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesignHelper.cs (.../KernelWrappers/Common/ShoulderDesignHelper.cs) (revision 1121) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesignHelper.cs (.../DikesDesign/ShoulderDesignHelper.cs) (revision 1203) @@ -24,7 +24,7 @@ using Deltares.DamEngine.Data.General.PlLines; using Deltares.DamEngine.Data.Geotechnics; -namespace Deltares.DamEngine.Calculators.KernelWrappers.Common +namespace Deltares.DamEngine.Calculators.DikesDesign { public class ShoulderDesignHelper { Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/MacroStabilityTutorialDesignInputFile1LocationWithAdaption.xml =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/MacroStabilityTutorialDesignInputFile1LocationWithAdaption.xml (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/MacroStabilityTutorialDesignInputFile1LocationWithAdaption.xml (revision 1203) @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (revision 1203) @@ -0,0 +1,250 @@ +// 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.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; +using Deltares.DamEngine.Calculators.DikesDesign; +using Deltares.DamEngine.Calculators.KernelWrappers.Common; +using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; +using Deltares.DamEngine.Calculators.Stability; +using Deltares.DamEngine.Data.Design; +using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.General.Results; +using Deltares.DamEngine.Data.Geometry; +using Deltares.DamEngine.Data.Geotechnics; +using Deltares.DamEngine.Data.Standard.Calculation; +using Deltares.DamEngine.Data.Standard.Logging; +using Deltares.DamEngine.Data.Standard.Validation; +using Deltares.DamMacroStability.Calculator; + +namespace Deltares.DamEngine.Calculators +{ + /// + /// Design strategy: first slope adaption, then shoulder adaption + /// + public class DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption + { + public static void PerformDesignCalculationFirstSlopeAdaptionThenShoulderAdaption + (IKernelWrapper kernelWrapper, IKernelDataInput kernelDataInput, + IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, + DesignScenario designScenario, + List calculationMessages, List designCalculations) + { + Location location = damKernelInput.Location; + SoilGeometryProbability subSoilScenario = damKernelInput.SubSoilScenario; + double requiredSafetyFactor = location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value; + const int maxRedesignIterations = 200; + int iterationIndex = 1; + SurfaceLine2 orgSurfaceLine = location.SurfaceLine; + + // Create the file with the initial geometry to be used to determine which layers have to be defined as dike embankment material + var EmbankmentDesignParameters = new EmbankmentDesignParameters(); + kernelWrapper.InitDesign(kernelDataInput, kernelDataOutput, damKernelInput, out EmbankmentDesignParameters); + string previousFilename = EmbankmentDesignParameters.PreviousGeometry2DFilename; + // CreateInitialGeometry(scenario, stabilityCalculator, soilProfileProbability, orgSurfaceLine, out previousFilename); + SurfaceLine2 surfaceLine = designScenario.GetMostRecentSurfaceLine(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName).FullDeepClone(); + +// var designEmbankmentDesignParameters = new DesignEmbankmentDesignParameters +// { +// EmbankmentMaterialname = location.DikeEmbankmentMaterial, +// PreviousGeometry2DFilename = previousFilename +// }; +// +// try +// { +// double? beta; +// bool isRedesignRequired; +// double? exitPointXCoordinate; +// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine); +// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile, +// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName), +// iterationIndex, mstabDesignEmbankment); +// mstabDesignEmbankment.PreviousGeometry2DFilename = stabilityCalculator.StabilityProjectFilename; +// mstabDesignEmbankment.EmbankmentMaterialname = location.ShoulderEmbankmentMaterial; +// MStabResults? mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName); +// double? safetyFactor = mStabResults.Value.zone1.safetyFactor; +// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; +// +// if (!isRedesignRequired && surfaceLine != null) +// { +// // Set redesigned surfaceline to original, so in case no redesign is needed, the original surfaceline will be returned +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName, surfaceLine); +// } +// else +// { +// double maxFractionOfDikeHeightForShoulderHeight = scenario.Location.UseNewMaxHeightShoulderAsFraction ? +// scenario.Location.NewMaxHeightShoulderAsFraction : defaultMaxFractionOfDikeHeightForShoulderHeight; +// double maxShoulderLevel = CalculateMaximumShoulderLevel(surfaceLine, maxFractionOfDikeHeightForShoulderHeight); +// while (isRedesignRequired && surfaceLine != null) +// { +// // First slope adaption +// double startCoTangent = location.SlopeAdaptionStartCotangent; +// double endCoTangent = location.SlopeAdaptionEndCotangent; +// double stepCoTangent = location.SlopeAdaptionStepCotangent; +// var orgCotangent = surfaceLine.GetCotangentOfInnerSlope(); +// double coTangent = startCoTangent; +// double currentCoTangent = orgCotangent; +// +// // Find out for which cotangent we want to start designing +// while (coTangent <= orgCotangent) +// { +// coTangent += stepCoTangent; +// } +// +// // Design for slope adaption +// GeometryPoint limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); +// while (isRedesignRequired && (coTangent < endCoTangent)) +// { +// iterationIndex++; +// if (iterationIndex >= maxRedesignIterations) +// { +// throw new MaximumRedesignIterationsReachedException(); +// } +// var surfaceLineSlopeAdapter = new SurfaceLineSlopeAdapter(surfaceLine, scenario.Location); +// // The parameter for ConstructNewSurfaceLineBySlope is the tangent of the slope, so use reciproce value +// surfaceLine = surfaceLineSlopeAdapter.ConstructNewSurfaceLineBySlope(1 / coTangent); +// currentCoTangent = coTangent; +// +// var validationError = surfaceLine.Validate().FirstOrDefault(vr => vr.MessageType == ValidationResultType.Error); +// if (validationError != null) +// { +// throw new SurfaceLineException(validationError.Text); +// } +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName, surfaceLine); +// +// // Recalculate new surfaceline +// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine); +// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile, +// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName), +// iterationIndex, mstabDesignEmbankment); +// mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName); +// safetyFactor = mStabResults.Value.zone1.safetyFactor; +// exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate; +// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile, +// soilProfileProbability.SoilGeometry2DName); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); +// +// coTangent += stepCoTangent; +// } +// +// // Then shoulder adaption +// while (isRedesignRequired && surfaceLine != null) +// { +// iterationIndex++; +// if (iterationIndex >= maxRedesignIterations) +// { +// throw new MaximumRedesignIterationsReachedException(); +// } +// +// // Determine new width and height for shoulder +// double shoulderHeight; +// double shoulderWidth; +// DetermineNewShoulderWidthAndHeight(scenario.Location.StabilityShoulderGrowDeltaX, +// scenario.Location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, out shoulderHeight, out shoulderWidth); +// +// // Create new shoulder +// var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(surfaceLine, scenario.Location); +// surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel; +// surfaceLineShoulderAdapter.SlopeOfNewShoulder = currentCoTangent; +// surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); +// +// var validationError = surfaceLine.Validate().FirstOrDefault(vr => vr.MessageType == ValidationResultType.Error); +// if (validationError != null) +// { +// throw new SurfaceLineException(validationError.Text); +// } +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, surfaceLine); +// +// // Recalculate new surfaceline +// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine); +// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile, +// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName), +// iterationIndex, mstabDesignEmbankment); +// mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName); +// safetyFactor = mStabResults.Value.zone1.safetyFactor; +// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName); +// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta); +// limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); +// } +// } +// } +// scenario.SetResultMessage(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, "Succes"); +// } +// catch (Exception exception) +// { +// string errorMessage = "FAIL: " + exception.Message; +// Exception innerException = exception.InnerException; +// while (innerException != null) +// { +// errorMessage = errorMessage + ";" + innerException.Message; +// innerException = innerException.InnerException; +// } +// scenario.SetResultMessage(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, errorMessage); +// scenario.CalculationResult = CalculationResult.RunFailed; +// // Redesign not succesful, so no redesigned surfaceline will be returned +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, null); +// } +// foreach (var errorMessage in stabilityCalculator.ErrorMessages) +// { +// errorMessages.Add(errorMessage); +// } + + } + //private void CreateInitialGeometry(StabilityCalculator stabilityCalculator, SoilGeometryProbability soilProfileProbability, SurfaceLine2 surfaceLine, out String initialgeometryFile) + //{ + // const int IterationIndex = -1; + + // initialgeometryFile = StabilityCalculator.DetermineCalculationFilename(scenario.Location.Name, scenario.LocationScenarioID, soilProfileProbability.SoilGeometryName, IterationIndex); + // initialgeometryFile = initialgeometryFile + stabilityCalculator.GetFilenameExtension(); + // initialgeometryFile = Path.Combine(stabilityCalculator.GetStabilityCalculationDirectory(), initialgeometryFile); + // double riverLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Z + + // surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Z); + // string soilgeometry2DFilename = null; + // if (soilProfileProbability.SoilGeometry2DName != null) + // { + // soilgeometry2DFilename = + // Path.GetFullPath(Path.Combine(DamProject.ProjectMap, Path.Combine(scenario.Location.MapForSoilGeometries2D, soilProfileProbability.SoilGeometry2DName))); + // } + // XDocument mstabXML = stabilityCalculator.CreateMStabXmlDoc(initialgeometryFile, scenario, soilProfileProbability.SoilProfile, + // soilgeometry2DFilename, riverLevel, null, surfaceLine); + // mstabXML.Save(initialgeometryFile + ".xml"); + // var stabilityServiceAgent = new StabilityServiceAgent(); + // stabilityServiceAgent.CreateProjectFile(mstabXML.ToString()); + // if (!File.Exists(initialgeometryFile)) + // { + // throw new DamFailureMechanismeCalculatorException("Initial geometry file (sti) is not created."); + // } + //} + } +} Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesign.cs =================================================================== diff -u -r1082 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesign.cs (.../KernelWrappers/Common/ShoulderDesign.cs) (revision 1082) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/ShoulderDesign.cs (.../DikesDesign/ShoulderDesign.cs) (revision 1203) @@ -19,7 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -namespace Deltares.DamEngine.Calculators.KernelWrappers.Common +namespace Deltares.DamEngine.Calculators.DikesDesign { public class ShoulderDesign { Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/FailureMechanismParametersMStab.cs =================================================================== diff -u -r1121 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/FailureMechanismParametersMStab.cs (.../FailureMechanismParametersMStab.cs) (revision 1121) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/FailureMechanismParametersMStab.cs (.../FailureMechanismParametersMStab.cs) (revision 1203) @@ -78,7 +78,7 @@ /// Default it is false (set in constructor) /// public bool IsStabilityCheckOnUplift { get; set; } - public MStabDesignEmbankment Design { get; set; } + public EmbankmentDesignParameters Design { get; set; } [Validate] public MStabParameters MStabParameters { get; set; } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs =================================================================== diff -u -r1198 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1198) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1203) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Data; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; using Deltares.DamEngine.Calculators.Properties; @@ -365,6 +366,11 @@ return (fosAchieved >= fosRequiered); } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + throw new NotImplementedException(); + } + /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj =================================================================== diff -u -r1121 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 1121) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 1203) @@ -40,6 +40,7 @@ + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1200 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1200) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1203) @@ -24,6 +24,7 @@ using System.Data; using System.IO; using System.Xml.Linq; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; @@ -35,6 +36,7 @@ using Deltares.DamEngine.Data.Standard.Calculation; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.DamMacroStability.Calculator; +using Deltares.DamEngine.Data.Geotechnics; namespace Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityInwards { @@ -114,7 +116,7 @@ model, FailureMechanismParametersMStab.ProjectWorkingPath); // if not, only Bishop calculation so leave SecondModel empty. } - + kernelDataInput = damMacroStabilityInput; // When BishopUpliftVan is performed, make sure the first one is Bishop @@ -195,7 +197,7 @@ /// The return messages. public void Execute(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages) { - DamMacroStabilityOutput damMacroStabilityOutput = (DamMacroStabilityOutput) kernelDataOutput; + DamMacroStabilityOutput damMacroStabilityOutput = (DamMacroStabilityOutput)kernelDataOutput; messages = new List(); var input = (DamMacroStabilityInput)kernelDataInput; @@ -214,7 +216,7 @@ { damMacroStabilityOutput.StabilityOutputItems.Add(stabilityOutputItem); } - + // now check if second calculation for BishopUpliftVan is needed, if so perform it. if (bishopUpliftVan) { @@ -299,7 +301,7 @@ var message = new LogMessage { MessageType = LogMessageType.Info, Message = e.Message }; messages.Add(message); var stabilityOutputItem = - new DamMacroStabilityOutputItem {CalculationResult = CalculationResult.UnexpectedError}; + new DamMacroStabilityOutputItem { CalculationResult = CalculationResult.UnexpectedError }; stabilityOutputItem.StabilityModelType = input.FailureMechanismParametersMStab.MStabParameters.Model; return stabilityOutputItem; } @@ -475,6 +477,46 @@ return DesignStrategy.SlopeAdaptionBeforeShoulderAdaption; } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + DamMacroStabilityInput damMacroStabilityInput = kernelDataInput as DamMacroStabilityInput; + DamMacroStabilityUtils.ThrowWhenMacroStabilityKernelInputNull(damMacroStabilityInput); + + const int iterationIndex = -1; + + string projectWorkingPath = damKernelInput.ProjectDir; //TODO #The + MStabModelType model = MStabModelType.Bishop; //TODO #The + string initialgeometryFile = DamMacroStabilityUtils.GetStabilityInputFileName(damKernelInput, iterationIndex, model, projectWorkingPath); + var location = damKernelInput.Location; + var surfaceLine = damKernelInput.Location.SurfaceLine; + var subSoilScenario = damKernelInput.SubSoilScenario; + double riverLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Z + + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Z); + List errorMessages; + XDocument mstabXML = MStabXmlDoc.CreateMStabXmlDoc( + initialgeometryFile, + damKernelInput.Location, + riverLevel, + 0.0, + subSoilScenario, + null, location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value, + damMacroStabilityInput.FailureMechanismParametersMStab, out errorMessages); + + mstabXML.Save(initialgeometryFile + ".xml"); + damMacroStabilityInput.DGeoStabilityInputFileName = initialgeometryFile; + CreateStiFile(mstabXML); + + embankmentDesignParameters = new EmbankmentDesignParameters() + { + EmbankmentMaterialname = location.DikeEmbankmentMaterial, + PreviousGeometry2DFilename = initialgeometryFile + }; + + if (!File.Exists(initialgeometryFile)) + { + throw new MacroStabilityException("Initial geometry file (sti) is not created."); + } + } private DesignResult NewDesignResult(DamKernelInput damKernelInput, DesignScenario designScenario) { string soilProfile2DName = damKernelInput.SubSoilScenario.ToString(); @@ -498,20 +540,20 @@ designResult.StabilityDesignResults.StabilityModelType = damMacroStabilityOutputItem.StabilityModelType; if (designResult.CalculationResult == CalculationResult.Succeeded) { - designResult.StabilityDesignResults.Zone1SafetyFactor = - damMacroStabilityOutputItem.Zone1Results.SafetyFactor; - designResult.StabilityDesignResults.LocalZone1EntryPointX = - damMacroStabilityOutputItem.Zone1Results.CircleSurfacePointLeftXCoordinate; - designResult.StabilityDesignResults.LocalZone1ExitPointX = - damMacroStabilityOutputItem.Zone1Results.CircleSurfacePointRightXCoordinate; + designResult.StabilityDesignResults.Zone1SafetyFactor = + damMacroStabilityOutputItem.Zone1Results.SafetyFactor; + designResult.StabilityDesignResults.LocalZone1EntryPointX = + damMacroStabilityOutputItem.Zone1Results.CircleSurfacePointLeftXCoordinate; + designResult.StabilityDesignResults.LocalZone1ExitPointX = + damMacroStabilityOutputItem.Zone1Results.CircleSurfacePointRightXCoordinate; - designResult.StabilityDesignResults.SafetyFactor = designResult.StabilityDesignResults.Zone1SafetyFactor; - if (damMacroStabilityOutputItem.Zone2Results != null) - { + designResult.StabilityDesignResults.SafetyFactor = designResult.StabilityDesignResults.Zone1SafetyFactor; + if (damMacroStabilityOutputItem.Zone2Results != null) + { var zone2 = (DamMacroStabilityOutputItem.ResultsSingleZone)damMacroStabilityOutputItem.Zone2Results; - designResult.StabilityDesignResults.Zone2SafetyFactor = zone2.SafetyFactor; - designResult.StabilityDesignResults.LocalZone2EntryPointX = zone2.CircleSurfacePointLeftXCoordinate; - designResult.StabilityDesignResults.LocalZone2ExitPointX = zone2.CircleSurfacePointRightXCoordinate; + designResult.StabilityDesignResults.Zone2SafetyFactor = zone2.SafetyFactor; + designResult.StabilityDesignResults.LocalZone2EntryPointX = zone2.CircleSurfacePointLeftXCoordinate; + designResult.StabilityDesignResults.LocalZone2ExitPointX = zone2.CircleSurfacePointRightXCoordinate; } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs =================================================================== diff -u -r1153 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1153) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1203) @@ -20,8 +20,10 @@ // All rights reserved. using System.Collections.Generic; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Data.Design; +using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.Results; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Standard.Calculation; @@ -134,6 +136,7 @@ /// if the design was succesful bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage); + void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters); /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r1197 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1197) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1203) @@ -155,7 +155,10 @@ case DesignStrategy.NoDesignPossible: throw new NotImplementedException("No design is possible for this failure mechanism"); case DesignStrategy.SlopeAdaptionBeforeShoulderAdaption: - throw new NotImplementedException("SlopeAdaptionBeforeShoulderAdaption design strategy is not implemented yet."); + DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.PerformDesignCalculationFirstSlopeAdaptionThenShoulderAdaption( + kernelWrapper, kernelDataInput, kernelDataOutput, damKernelInput, designScenario, + calculationMessages, designCalculations); + break; case DesignStrategy.OptimizedSlopeAndShoulderAdaption: throw new NotImplementedException("OptimizedSlopeAndShoulderAdaption design strategy is not implemented yet."); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r1174 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1174) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1203) @@ -57,11 +57,13 @@ + + - + @@ -72,7 +74,7 @@ - + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs =================================================================== diff -u -r1153 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1153) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1203) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.Data; using System.Xml.Linq; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; @@ -225,6 +226,11 @@ throw new NotImplementedException(); } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + throw new NotImplementedException(); + } + /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj =================================================================== diff -u -r1198 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 1198) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 1203) @@ -135,6 +135,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs =================================================================== diff -u -r1153 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1153) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1203) @@ -33,6 +33,7 @@ using Deltares.DamEngine.Data.Standard.Logging; using Deltares.DamMacroStability.Calculator; using System.IO; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.Geometry; @@ -336,6 +337,11 @@ throw new NotImplementedException(); } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + throw new NotImplementedException(); + } + /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs =================================================================== diff -u -r1153 -r1203 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1153) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1203) @@ -30,6 +30,7 @@ using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamPiping.SellmeijerVNKCalculator; using System.Data; +using Deltares.DamEngine.Calculators.DikesDesign; using Deltares.DamEngine.Calculators.Properties; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.Geometry; @@ -278,6 +279,11 @@ throw new NotImplementedException(); } + public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters) + { + throw new NotImplementedException(); + } + /// /// Gets the design strategy /// Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/EmbankmentDesignParameters.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/EmbankmentDesignParameters.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/EmbankmentDesignParameters.cs (revision 1203) @@ -0,0 +1,43 @@ +// 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 Deltares.DamEngine.Data.Standard; + +namespace Deltares.DamEngine.Data.General +{ + public class EmbankmentDesignParameters : IAssignable, ICloneable + { + public string EmbankmentMaterialname { get; set; } + public string PreviousGeometry2DFilename { get; set; } + public void Assign(EmbankmentDesignParameters mstabEmbankmentDesignEmbankment) + { + this.EmbankmentMaterialname = mstabEmbankmentDesignEmbankment.EmbankmentMaterialname; + this.PreviousGeometry2DFilename = mstabEmbankmentDesignEmbankment.PreviousGeometry2DFilename; + } + + public EmbankmentDesignParameters Clone() + { + var mstabDesignEmbankment = new EmbankmentDesignParameters(); + mstabDesignEmbankment.Assign(this); + return mstabDesignEmbankment; + } + } +}