Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1371 -r1374 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1371) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1374) @@ -581,12 +581,15 @@ } else { - // Iteration 1 = initial geometry - // Iteration 2 = height adaption - // The following iterations are shoulder/slope adjustement): the embankment material is ShoulderEmbankmentMaterial - if (iterationIndex == 3) + // Iteration 1 = height adaption + // The following iterations are shoulder/slope adjustement): + // - The embankment material is set to ShoulderEmbankmentMaterial + // The previous geometry is set to the height adapted geometry (name is constructed with iteration index 1) + if (iterationIndex == 2) { FailureMechanismParametersMStab.EmbankmentDesignParameters.EmbankmentMaterialname = location.ShoulderEmbankmentMaterial; + FailureMechanismParametersMStab.EmbankmentDesignParameters.PreviousGeometry2DFilename = + DamMacroStabilityUtils.GetStabilityInputFileName(damKernelInput, 1, model, projectWorkingPath); } // In the following prepareDesign calls just return the stored embankmentDesignParameters embankmentDesignParameters = FailureMechanismParametersMStab.EmbankmentDesignParameters; @@ -613,11 +616,6 @@ { throw new MacroStabilityException(Resources.DamMacroStabilityKernelWrapper_CannotCreateInitialGeometryFile); } - if (iterationIndex == 2) - { - // The height adapted geometry should be the previous geometry when doing shoulder/slope adaption - FailureMechanismParametersMStab.EmbankmentDesignParameters.PreviousGeometry2DFilename = mstabProjectFilename; - } } private DesignResult NewDesignResult(DamKernelInput damKernelInput, DesignScenario designScenario, DamMacroStabilityOutputItem macroStabilityOutputItem) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs =================================================================== diff -u -r1371 -r1374 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (.../DesignCalculatorCombinedSlopeAndShoulderAdaption.cs) (revision 1371) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (.../DesignCalculatorCombinedSlopeAndShoulderAdaption.cs) (revision 1374) @@ -77,6 +77,7 @@ { iterationIndex = 1; bool isRedesignRequired; + damKernelInput.Location.SurfaceLine = surfaceLine; location.AlignBoundaryPointsOfPl1LineWithAdaptedSurfaceLine(surfaceLine); List locationCalculationMessages; DesignCalculatorUtils.KernelCalculate(out kernelDataInput, kernelWrapper, out kernelDataOutput, damKernelInput, iterationIndex, out locationCalculationMessages);