Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs =================================================================== diff -u -rfdd2ef5df1a8c575ff40ac874c25c81afbabd176 -r76ae563a2db79178d0a21533f320f17d738f4048 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision fdd2ef5df1a8c575ff40ac874c25c81afbabd176) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision 76ae563a2db79178d0a21533f320f17d738f4048) @@ -115,19 +115,32 @@ } /// - /// Clears the output of the dune location calculations within the collection. + /// Clears the output of the dune location calculations within the dune erosion failure mechanism. /// - /// The calculations for which the output needs to be cleared. + /// The failure mechanism for which the output of the calculations needs to be cleared. /// All objects changed during the clear. - /// Thrown when is null. - public static IEnumerable ClearDuneCalculationsOutput(IEnumerable calculations) + /// Thrown when is null. + public static IEnumerable ClearDuneCalculationOutputs(DuneErosionFailureMechanism failureMechanism) { - if (calculations == null) + if (failureMechanism == null) { - throw new ArgumentNullException(nameof(calculations)); + throw new ArgumentNullException(nameof(failureMechanism)); } var affectedCalculations = new List(); + + affectedCalculations.AddRange(ClearDuneCalculationsOutput(failureMechanism.CalculationsForMechanismSpecificFactorizedSignalingNorm)); + affectedCalculations.AddRange(ClearDuneCalculationsOutput(failureMechanism.CalculationsForMechanismSpecificSignalingNorm)); + affectedCalculations.AddRange(ClearDuneCalculationsOutput(failureMechanism.CalculationsForMechanismSpecificLowerLimitNorm)); + affectedCalculations.AddRange(ClearDuneCalculationsOutput(failureMechanism.CalculationsForLowerLimitNorm)); + affectedCalculations.AddRange(ClearDuneCalculationsOutput(failureMechanism.CalculationsForFactorizedLowerLimitNorm)); + + return affectedCalculations; + } + + private static IEnumerable ClearDuneCalculationsOutput(IEnumerable calculations) + { + var affectedCalculations = new List(); foreach (DuneLocationCalculation calculation in calculations) { if (calculation.Output != null)