Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs =================================================================== diff -u -ree62f9ef8c69cd574bd23077bf9079e3e8fbdd8c -rf0c2e0726fb0d7a85fd1e192f3775c8dba10605f --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision ee62f9ef8c69cd574bd23077bf9079e3e8fbdd8c) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision f0c2e0726fb0d7a85fd1e192f3775c8dba10605f) @@ -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)