Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs =================================================================== diff -u -r4540 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs (.../DamKernelInput.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs (.../DamKernelInput.cs) (revision 5466) @@ -21,6 +21,7 @@ using System; using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.Geotechnics; namespace Deltares.DamEngine.Calculators.KernelWrappers.Common; @@ -94,4 +95,12 @@ /// The dam failure mechanism calculation specification. /// public DamFailureMechanismeCalculationSpecification DamFailureMechanismeCalculationSpecification { get; set; } + + /// + /// Gets or sets the current embankment soil (either DikeEmbakmentSoil or ShoulderEmbankmentSoil). + /// + /// + /// The current embankment soil. + /// + public Soil CurrentEmbankmentSoil { get; set; } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs =================================================================== diff -u -r4540 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 5466) @@ -497,6 +497,25 @@ } /// + /// Gets the shoulder embankment soil. + /// + /// + public Soil GetShoulderEmbankmentSoil() + { + Soil soil = null; + if (SoilList != null && SoilList.Soils.Count > 0 && !String.IsNullOrEmpty(ShoulderEmbankmentMaterial)) + { + soil = SoilList.GetSoilByName(ShoulderEmbankmentMaterial); + } + + if (soil == null) + { + soil = GetDikeEmbankmentSoil(); + } + return soil; + } + + /// /// Aligns the boundary points of PL1 line with adapted surface line. /// /// The adapted surface line. Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs =================================================================== diff -u -r5464 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 5464) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 5466) @@ -80,6 +80,7 @@ } surfaceLine = surfaceLine.FullDeepClone(); + damKernelInput.CurrentEmbankmentSoil = location.GetDikeEmbankmentSoil(); try { iterationIndex = 1; @@ -150,6 +151,8 @@ } // Then shoulder adaption + orgSoilProfile2D = damKernelInput.SubSoilScenario.SoilProfile2D.Clone(); + damKernelInput.CurrentEmbankmentSoil = location.GetShoulderEmbankmentSoil(); while (isRedesignRequired && surfaceLine != null) { // Always start with the original soil profile Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r4540 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 5466) @@ -269,6 +269,7 @@ try { orgLocationSurfaceLine = AdaptSurfaceLineWhenNeededForDesign(location, analysisType, damKernelInput); + damKernelInput.CurrentEmbankmentSoil = location.GetDikeEmbankmentSoil(); PrepareResult prepareResult = kernelWrapper.Prepare(damKernelInput, 0, out kernelDataInput, out kernelDataOutput); Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r5464 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5464) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5466) @@ -486,7 +486,7 @@ Assert.That(output.Results.CalculationResults.First().StabilityDesignResults.SafetyFactor, Is.EqualTo(1.366).Within(tolerance)); } - [TestCase("SlopeAdaptionBeforeShoulderAdaption", 1.4, 1.539, 5)] + [TestCase("SlopeAdaptionBeforeShoulderAdaption", 1.4, 1.515, 5)] [TestCase("OptimizedSlopeAndShoulderAdaption", 1.4, 1.426, 3)] public void GivenTutorialDesignDwp1_WhenRunWithGeometryAdaption_ThenGivesExpectedResults(string designMethod, double requiredSafetyFactor, double actualSafetyFactor, int iterationCount) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r5380 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 5380) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 5466) @@ -105,7 +105,7 @@ } MacroStabilityCommonHelper.CombineSoilProfileWithSurfaceLine(damKernelInput.SubSoilScenario, damKernelInput.Location.SurfaceLine, - damKernelInput.Location.GetDikeEmbankmentSoil()); + damKernelInput.CurrentEmbankmentSoil); const bool useRiverLevelLow = false; // Determine whether there is uplift Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs =================================================================== diff -u -r5372 -r5466 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs (.../MacroStabilityOutwardsKernelWrapper.cs) (revision 5372) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs (.../MacroStabilityOutwardsKernelWrapper.cs) (revision 5466) @@ -100,7 +100,7 @@ } MacroStabilityCommonHelper.CombineSoilProfileWithSurfaceLine(damKernelInput.SubSoilScenario, damKernelInput.Location.SurfaceLine, - damKernelInput.Location.GetDikeEmbankmentSoil()); + damKernelInput.CurrentEmbankmentSoil); const bool useRiverLevelLow = true; // Determine PL-lines and create waternet