Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r1152 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1152) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 1153) @@ -91,13 +91,13 @@ case AnalysisType.AdaptGeometry: PerformDesignCalculation( kernelWrapper, kernelDataInput, kernelDataOutput, - damKernelInput, designScenario, calculationMessages, + damKernelInput, designScenario, calculationMessages, damProjectData.DesignCalculations); break; case AnalysisType.NoAdaption: DesignCalculatorSingle.PerformSingleCalculation( kernelWrapper, kernelDataInput, kernelDataOutput, - damKernelInput, designScenario, calculationMessages, + damKernelInput, designScenario, calculationMessages, damProjectData.DesignCalculations); break; @@ -143,10 +143,22 @@ DesignScenario designScenario, List calculationMessages, List designCalculations) { - DesignCalculatorShoulderPerPoint.PerformDesignCalculationShoulderPerPoint( - kernelWrapper, kernelDataInput, kernelDataOutput, - damKernelInput, designScenario, calculationMessages, - designCalculations); + switch (kernelWrapper.GetDesignStrategy()) + { + case DesignStrategy.ShoulderPerPoint: + DesignCalculatorShoulderPerPoint.PerformDesignCalculationShoulderPerPoint( + kernelWrapper, kernelDataInput, kernelDataOutput, + damKernelInput, designScenario, calculationMessages, + designCalculations); + break; + 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."); + case DesignStrategy.OptimizedSlopeAndShoulderAdaption: + throw new NotImplementedException("OptimizedSlopeAndShoulderAdaption design strategy is not implemented yet."); + break; + } } /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs =================================================================== diff -u -r1148 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1148) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1153) @@ -346,6 +346,16 @@ evaluationMessage = String.Format(Resources.FactorAchievedVsFactorRequired, fosAchieved, fosRequiered); return (fosAchieved >= fosRequiered); } + + /// + /// Gets the design strategy + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.ShoulderPerPoint; + } + private static void ThrowWhenKernelInputNull(DamPipingBlighInput damPipingBlighInput) { if (damPipingBlighInput == null) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs =================================================================== diff -u -r1148 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1148) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1153) @@ -335,5 +335,14 @@ { throw new NotImplementedException(); } + + /// + /// Gets the design strategy + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.NoDesignPossible; + } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs =================================================================== diff -u -r1148 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1148) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1153) @@ -278,6 +278,16 @@ throw new NotImplementedException(); } + /// + /// Gets the design strategy + /// + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.ShoulderPerPoint; + } + private static PipingCalculatorSellmeijerVNK CreatePipingCalculatorSellmeijerVnk(IKernelDataInput kernelDataInput) { DamPipingSellmeijerVnkInput damPipingInput = kernelDataInput as DamPipingSellmeijerVnkInput; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1150 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1150) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1153) @@ -460,6 +460,15 @@ throw new NotImplementedException(); } + /// + /// Gets the design strategy + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.SlopeAdaptionBeforeShoulderAdaption; + } + private DesignResult NewDesignResult(DamKernelInput damKernelInput, DesignScenario designScenario) { string soilProfile2DName = damKernelInput.SubSoilScenario.ToString(); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs =================================================================== diff -u -r1148 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1148) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1153) @@ -226,6 +226,15 @@ } /// + /// Gets the design strategy + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.NoDesignPossible; + } + + /// /// Creates the mstab dam XML document. /// /// The dam kernel input. Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs =================================================================== diff -u -r1137 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1137) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1153) @@ -22,10 +22,8 @@ using System.Collections.Generic; 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.Geotechnics; using Deltares.DamEngine.Data.Standard.Calculation; using Deltares.DamEngine.Data.Standard.Logging; @@ -42,8 +40,34 @@ Successful, Failed, NotRelevant - }; + } + /// + /// The design strategy that has to be followed + /// + public enum DesignStrategy + { + /// + /// No design is possible + /// + NoDesignPossible, + /// + /// The surfaceline is discretized with a minimum distance between points and for each point a new design is evaluated + /// + ShoulderPerPoint, + /// + /// Iterative process. + /// Dependendent on the most recent design iteration a choice between slope adaption or shoulder adaption is for the next iteration + /// + OptimizedSlopeAndShoulderAdaption, + /// + /// Iterative process. + /// First slope adaption is done then shoulder adaption + /// + SlopeAdaptionBeforeShoulderAdaption, + } + + /// /// Interface to implement external failure mechanisms /// public interface IKernelWrapper : ICalculation @@ -109,5 +133,11 @@ /// The evaluation message. /// if the design was succesful bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage); + + /// + /// Gets the design strategy + /// + /// + DesignStrategy GetDesignStrategy(); } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs =================================================================== diff -u -r1148 -r1153 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1148) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1153) @@ -291,5 +291,14 @@ { throw new NotImplementedException(); } + + /// + /// Gets the design strategy + /// + /// + public DesignStrategy GetDesignStrategy() + { + return DesignStrategy.ShoulderPerPoint; + } } }