Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs =================================================================== diff -u -r6a8d4edb0f3b2d00d3958c48146c51487bd01247 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 6a8d4edb0f3b2d00d3958c48146c51487bd01247) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -31,15 +31,13 @@ using log4net; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Service.Properties; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; -using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.Data.Input.Overtopping; @@ -97,7 +95,6 @@ /// /// The that holds all the information required to perform the calculation. /// The that holds information about the norm used in the calculation. - /// The to create input with. /// Calculation input parameters that apply to all instances. /// The amount of contribution for this failure mechanism in the assessment section. /// The path which points to the hydraulic boundary database file. @@ -135,7 +132,6 @@ /// Thrown when an error occurs during the calculation. internal void Calculate(GrassCoverErosionInwardsCalculation calculation, IAssessmentSection assessmentSection, - FailureMechanismSection failureMechanismSection, GeneralGrassCoverErosionInwardsInput generalInput, double failureMechanismContribution, string hydraulicBoundaryDatabaseFilePath) @@ -148,10 +144,6 @@ { throw new ArgumentNullException(nameof(assessmentSection)); } - if (failureMechanismSection == null) - { - throw new ArgumentNullException(nameof(failureMechanismSection)); - } if (generalInput == null) { throw new ArgumentNullException(nameof(generalInput)); @@ -166,7 +158,7 @@ CalculationServiceHelper.LogCalculationBeginTime(calculationName); overtoppingCalculator = HydraRingCalculatorFactory.Instance.CreateOvertoppingCalculator(hlcdDirectory, assessmentSection.Id); - var overtoppingCalculationInput = CreateOvertoppingInput(calculation, failureMechanismSection, generalInput, hydraulicBoundaryDatabaseFilePath); + var overtoppingCalculationInput = CreateOvertoppingInput(calculation, generalInput, hydraulicBoundaryDatabaseFilePath); DikeHeightAssessmentOutput dikeHeight = null; try @@ -188,7 +180,6 @@ generalInput, failureMechanismContribution, calculation.InputParameters.DikeHeightCalculationType); var dikeHeightCalculationInput = CreateDikeHeightInput(calculation, norm, - failureMechanismSection, generalInput, hydraulicBoundaryDatabaseFilePath); bool dikeHeightCalculated = CalculateDikeHeight(dikeHeightCalculationInput, calculationName); @@ -386,12 +377,11 @@ /// /// private static OvertoppingCalculationInput CreateOvertoppingInput(GrassCoverErosionInwardsCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralGrassCoverErosionInwardsInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var overtoppingCalculationInput = new OvertoppingCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation), + calculation.InputParameters.Orientation, ParseProfilePoints(calculation.InputParameters.DikeGeometry), HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), @@ -443,13 +433,12 @@ /// private static DikeHeightCalculationInput CreateDikeHeightInput(GrassCoverErosionInwardsCalculation calculation, double norm, - FailureMechanismSection failureMechanismSection, GeneralGrassCoverErosionInwardsInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var dikeHeightCalculationInput = new DikeHeightCalculationInput(calculation.InputParameters.HydraulicBoundaryLocation.Id, norm, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.Orientation), + calculation.InputParameters.Orientation, ParseProfilePoints(calculation.InputParameters.DikeGeometry), HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters),