Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1375 -r1390 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1375) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1390) @@ -564,13 +564,12 @@ var subSoilScenario = damKernelInput.SubSoilScenario; double riverLevel = damKernelInput.RiverLevelHigh; List errorMessages; - // The following parameter is used for correctly creating the MStab file - // For the initial geometry, no previous geometry filenam has to be defined EmbankmentDesignParameters embankmentDesignParametersForCreatingMstabFile; if (iterationIndex < 1) { - // In the first prepareDesign, the initial geometry filename is determined and should be stored in the embankmentDesignParameters - // In the first iteration (height adaption), the embankment material is DikeEmbankmentMaterial + // This is the first (initial) call to prepareDesign. + // The initial geometry filename is determined and are stored in the embankmentDesignParameters. + // Also the embankment material is set to DikeEmbankmentMaterial, because the next iteration (Index = 1) will be height adaption embankmentDesignParameters = new EmbankmentDesignParameters() { EmbankmentMaterialname = location.DikeEmbankmentMaterial, @@ -581,10 +580,12 @@ } else { - // 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) + // Calculation iterations start with IterationIndex = 1. + // When IterationIndex = 1: height adaption. + // When Iteration > 1: Slope/Shoulder adaption. + // Starting from IterationIndex 2 the following parameters should be used: + // - 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;