Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs =================================================================== diff -u -r1151 -r1152 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1151) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1152) @@ -45,25 +45,7 @@ private const double CMinimumShoulderExtraWidth = 1; private const double CToleranceShoulderChanges = 0.001; - /// - /// Calculates the maximum level for the shoulder. - /// - /// The surface line. - /// The fraction of dike height to determine maximimum shoulder height. - /// - private static double CalculateMaximumShoulderLevel(SurfaceLine2 surfaceLine, double maxFractionOfDikeHeightForShoulderHeight) - { - var top = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z; - var bottom = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - if (top - bottom <= 0) - { - throw new DesignCalculatorException(Resources.SurfaceLineShoulderAdapterMaxShoulderHeightError); - } - double maxHeight = Math.Abs((top - bottom) * maxFractionOfDikeHeightForShoulderHeight); - return bottom + maxHeight; - } - /// /// Performs the design calculation shoulder iterative per point. /// This is a design strategy used for Piping /// @@ -75,8 +57,10 @@ /// The calculation messages. /// The design calculations. /// - public static void PerformDesignCalculationShoulderPerPoint(IKernelWrapper kernelWrapper, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, - DamKernelInput damKernelInput, DesignScenario designScenario, + public static void PerformDesignCalculationShoulderPerPoint + (IKernelWrapper kernelWrapper, IKernelDataInput kernelDataInput, + IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, + DesignScenario designScenario, List calculationMessages, List designCalculations) { var designResults = new List(); @@ -178,6 +162,24 @@ } /// + /// Calculates the maximum level for the shoulder. + /// + /// The surface line. + /// The fraction of dike height to determine maximimum shoulder height. + /// + private static double CalculateMaximumShoulderLevel(SurfaceLine2 surfaceLine, double maxFractionOfDikeHeightForShoulderHeight) + { + var top = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z; + var bottom = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; + if (top - bottom <= 0) + { + throw new DesignCalculatorException(Resources.SurfaceLineShoulderAdapterMaxShoulderHeightError); + } + double maxHeight = Math.Abs((top - bottom) * maxFractionOfDikeHeightForShoulderHeight); + return bottom + maxHeight; + } + + /// /// Ensures that the points on the surface line are never more than cDiff (0.5) apart. /// ///