Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -29,15 +29,12 @@ using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Service.Properties; using Ringtoets.Common.Data.AssessmentSection; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service; using Ringtoets.Common.Service.ValidationRules; -using Ringtoets.Common.Utils; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; -using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Input.Structures; using Ringtoets.HydraRing.Calculation.Exceptions; using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; @@ -100,12 +97,8 @@ string calculationName = calculation.Name; - FailureMechanismSection failureMechanismSection = StructuresHelper.GetFailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - StructuresClosureCalculationInput input = CreateStructuresClosureCalculationInput(calculation, failureMechanism, - failureMechanismSection, hydraulicBoundaryDatabaseFilePath); string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); @@ -174,6 +167,7 @@ public void Cancel() { calculator?.Cancel(); + canceled = true; } @@ -229,20 +223,19 @@ private static StructuresClosureCalculationInput CreateStructuresClosureCalculationInput( StructuresCalculation calculation, ClosingStructuresFailureMechanism failureMechanism, - FailureMechanismSection failureMechanismSection, string hydraulicBoundaryDatabaseFilePath) { StructuresClosureCalculationInput input; switch (calculation.InputParameters.InflowModelType) { case ClosingStructureInflowModelType.VerticalWall: - input = CreateClosureVerticalWallCalculationInput(calculation, failureMechanismSection, failureMechanism.GeneralInput); + input = CreateClosureVerticalWallCalculationInput(calculation, failureMechanism.GeneralInput); break; case ClosingStructureInflowModelType.LowSill: - input = CreateLowSillCalculationInput(calculation, failureMechanismSection, failureMechanism.GeneralInput); + input = CreateLowSillCalculationInput(calculation, failureMechanism.GeneralInput); break; case ClosingStructureInflowModelType.FloodedCulvert: - input = CreateFloodedCulvertCalculationInput(calculation, failureMechanismSection, failureMechanism.GeneralInput); + input = CreateFloodedCulvertCalculationInput(calculation, failureMechanism.GeneralInput); break; default: throw new InvalidEnumArgumentException("calculation", @@ -256,12 +249,11 @@ private static StructuresClosureVerticalWallCalculationInput CreateClosureVerticalWallCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { return new StructuresClosureVerticalWallCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), generalInput.GravitationalAcceleration, @@ -288,12 +280,11 @@ private static StructuresClosureLowSillCalculationInput CreateLowSillCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { return new StructuresClosureLowSillCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), generalInput.GravitationalAcceleration, @@ -319,12 +310,11 @@ private static StructuresClosureFloodedCulvertCalculationInput CreateFloodedCulvertCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput) { return new StructuresClosureFloodedCulvertCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), generalInput.GravitationalAcceleration, Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs =================================================================== diff -u -r6a8d4edb0f3b2d00d3958c48146c51487bd01247 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision 6a8d4edb0f3b2d00d3958c48146c51487bd01247) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -596,12 +596,7 @@ { // Setup var closingStructuresFailureMechanism = new ClosingStructuresFailureMechanism(); - closingStructuresFailureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); - + var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(closingStructuresFailureMechanism, mockRepository); @@ -620,8 +615,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -642,7 +635,7 @@ ClosingStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresClosureVerticalWallCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, generalInput.GravitationalAcceleration, @@ -681,11 +674,6 @@ { // Setup var closingStructuresFailureMechanism = new ClosingStructuresFailureMechanism(); - closingStructuresFailureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(closingStructuresFailureMechanism, @@ -706,8 +694,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -728,7 +714,7 @@ ClosingStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresClosureLowSillCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, generalInput.GravitationalAcceleration, @@ -766,11 +752,6 @@ { // Setup var closingStructuresFailureMechanism = new ClosingStructuresFailureMechanism(); - closingStructuresFailureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(closingStructuresFailureMechanism, @@ -791,8 +772,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -813,7 +792,7 @@ ClosingStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresClosureFloodedCulvertCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, generalInput.GravitationalAcceleration, Index: Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -56,28 +56,6 @@ } /// - /// Determine which geometrically contains the . - /// - /// The objects - /// whose are considered. - /// The . - /// The containing , or null if none found. - /// Thrown when is null - /// Thrown when an element in is null. - /// - public static FailureMechanismSection GetFailureMechanismSectionForCalculation(IEnumerable sections, - StructuresCalculation calculation) - where T : IStructuresCalculationInput, new() - { - CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); - if (calculationWithLocation != null) - { - return AssignUnassignCalculations.FailureMechanismSectionForCalculation(sections, calculationWithLocation); - } - return null; - } - - /// /// Updates the for each element /// of if required due to a change. /// Index: Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs (.../StructuresHelperTest.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs (.../StructuresHelperTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -103,96 +103,6 @@ } [Test] - public void GetFailureMechanismSectionForCalculation_SectionsNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => StructuresHelper.GetFailureMechanismSectionForCalculation(null, calculationInSectionA); - - // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("sections", paramName); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_SectionElementsNull_ThrowsArgumentException() - { - // Call - TestDelegate test = () => StructuresHelper.GetFailureMechanismSectionForCalculation( - new FailureMechanismSection[] - { - null, - null - }, - calculationInSectionA); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("sections", exception.ParamName); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_CalculationNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => StructuresHelper.GetFailureMechanismSectionForCalculation(oneSection, null); - - // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("calculation", paramName); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_ValidSectionWithoutCalculationStructureSet_ReturnsNull() - { - // Setup - var calculation = new StructuresCalculation(); - - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.GetFailureMechanismSectionForCalculation(oneSection, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_EmptySectionWithoutCalculationStructureSet_ReturnsNull() - { - // Setup - var emptySections = new FailureMechanismSection[0]; - var calculation = new StructuresCalculation(); - - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.GetFailureMechanismSectionForCalculation(emptySections, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_FirstSectionContainsCalculation_FailureMechanismSectionOfFirstSection() - { - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.GetFailureMechanismSectionForCalculation(twoSections, calculationInSectionA); - - // Assert - Assert.AreSame(twoSections[0], failureMechanismSection); - } - - [Test] - public void GetFailureMechanismSectionForCalculation_SecondSectionContainsCalculation_FailureMechanismSectionOfSecondSection() - { - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.GetFailureMechanismSectionForCalculation(twoSections, calculationInSectionB); - - // Assert - Assert.AreSame(twoSections[1], failureMechanismSection); - } - - [Test] public void UpdateCalculationToSectionResultAssignments_SectionResultsNull_ThrowsArgumentNullException() { // Call Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationActivity.cs (.../GrassCoverErosionInwardsCalculationActivity.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -22,11 +22,8 @@ using System; using Core.Common.Base.Service; using Ringtoets.Common.Data.AssessmentSection; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data; -using Ringtoets.GrassCoverErosionInwards.Utils; using Ringtoets.HydraRing.Calculation.Activities; -using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; namespace Ringtoets.GrassCoverErosionInwards.Service { @@ -90,14 +87,10 @@ protected override void PerformCalculation() { GrassCoverErosionInwardsDataSynchronizationService.ClearCalculationOutput(calculation); - - FailureMechanismSection failureMechanismSection = - GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation(failureMechanism.Sections, calculation); - + calculationService.Calculate( calculation, assessmentSection, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, hydraulicBoundaryDatabaseFilePath); 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), Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs =================================================================== diff -u -r6c3b126a0a9d31abf3bada375416117f6ffb2e97 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 6c3b126a0a9d31abf3bada375416117f6ffb2e97) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -55,30 +55,6 @@ } /// - /// Obtains the which intersects with the defined on - /// . - /// - /// The of to iterate over when trying to find a match - /// with the location of . - /// The which's location is used to match to the location of the - /// . - /// Returns the closest to or null if the - /// has no location. - /// Thrown when is null - /// Thrown when an element in is null. - /// - public static FailureMechanismSection FailureMechanismSectionForCalculation(IEnumerable sections, - GrassCoverErosionInwardsCalculation calculation) - { - CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); - if (calculationWithLocation != null) - { - return AssignUnassignCalculations.FailureMechanismSectionForCalculation(sections, calculationWithLocation); - } - return null; - } - - /// /// Removed the for each /// element of if required due to a change. /// Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs =================================================================== diff -u -r6a8d4edb0f3b2d00d3958c48146c51487bd01247 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 6a8d4edb0f3b2d00d3958c48146c51487bd01247) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Service.Test/GrassCoverErosionInwardsCalculationServiceTest.cs (.../GrassCoverErosionInwardsCalculationServiceTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -29,7 +29,6 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.DikeProfiles; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.TestUtil; @@ -386,7 +385,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = mockRepository.Stub(); @@ -395,7 +393,6 @@ // Call TestDelegate test = () => new GrassCoverErosionInwardsCalculationService().Calculate(null, assessmentSectionStub, - failureMechanism.Sections.First(), failureMechanism.GeneralInput, failureMechanism.Contribution, string.Empty); @@ -412,12 +409,10 @@ // Setup var calculation = new GrassCoverErosionInwardsCalculation(); GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); // Call TestDelegate test = () => new GrassCoverErosionInwardsCalculationService().Calculate(calculation, null, - failureMechanism.Sections.First(), failureMechanism.GeneralInput, failureMechanism.Contribution, string.Empty); @@ -426,37 +421,13 @@ var exception = Assert.Throws(test); Assert.AreEqual("assessmentSection", exception.ParamName); } - [Test] - public void Calculate_FailureMechanismSectionNull_ThrowArgumentNullException() - { - // Setup - var calculation = new GrassCoverErosionInwardsCalculation(); - GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - var mockRepository = new MockRepository(); - IAssessmentSection assessmentSectionStub = mockRepository.Stub(); - mockRepository.ReplayAll(); - - // Call - TestDelegate test = () => new GrassCoverErosionInwardsCalculationService().Calculate(calculation, - assessmentSectionStub, - null, - failureMechanism.GeneralInput, - failureMechanism.Contribution, - string.Empty); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("failureMechanismSection", exception.ParamName); - mockRepository.VerifyAll(); - } [Test] public void Calculate_GeneralinputNull_ThrowArgumentNullException() { // Setup var calculation = new GrassCoverErosionInwardsCalculation(); GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = mockRepository.Stub(); @@ -465,7 +436,6 @@ // Call TestDelegate test = () => new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanism.Sections.First(), null, failureMechanism.Contribution, string.Empty); @@ -484,7 +454,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -505,14 +474,11 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { // Call new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -554,7 +520,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -574,7 +539,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); bool expectedExceptionThrown = false; // Call @@ -588,7 +552,6 @@ calculator.EndInFailure = true; new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -622,7 +585,6 @@ { // Setup var grassCoverErosionInwardsFailureMechanism = new GrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(grassCoverErosionInwardsFailureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(grassCoverErosionInwardsFailureMechanism, @@ -642,7 +604,6 @@ } }; - var failureMechanismSection = grassCoverErosionInwardsFailureMechanism.Sections.First(); var service = new GrassCoverErosionInwardsCalculationService(); using (new HydraRingCalculatorFactoryConfig()) @@ -653,7 +614,6 @@ // Call service.Calculate(calculation, assessmentSectionStub, - failureMechanismSection, grassCoverErosionInwardsFailureMechanism.GeneralInput, grassCoverErosionInwardsFailureMechanism.Contribution, validFile); @@ -672,7 +632,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -693,7 +652,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); var service = new GrassCoverErosionInwardsCalculationService(); // Call @@ -715,7 +673,6 @@ // Call service.Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -746,7 +703,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -766,8 +722,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).OvertoppingCalculator; @@ -783,7 +737,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -817,7 +770,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -837,8 +789,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).OvertoppingCalculator; @@ -853,7 +803,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -887,7 +836,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -907,8 +855,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).OvertoppingCalculator; @@ -925,7 +871,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -960,7 +905,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -980,8 +924,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).DikeHeightCalculator; @@ -996,7 +938,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -1030,7 +971,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository, @@ -1049,8 +989,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).DikeHeightCalculator; @@ -1064,7 +1002,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -1098,7 +1035,6 @@ { // Setup GrassCoverErosionInwardsFailureMechanism failureMechanism = CreateGrassCoverErosionInwardsFailureMechanism(); - AddSectionToFailureMechanism(failureMechanism); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, @@ -1118,8 +1054,6 @@ } }; - var failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).DikeHeightCalculator; @@ -1134,7 +1068,6 @@ { new GrassCoverErosionInwardsCalculationService().Calculate(calculation, assessmentSectionStub, - failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, validFile); @@ -1169,15 +1102,6 @@ }; } - private static void AddSectionToFailureMechanism(GrassCoverErosionInwardsFailureMechanism failureMechanism) - { - failureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); - } - private static DikeProfile GetDikeProfile() { return new DikeProfile( Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Utils.Test/GrassCoverErosionInwardsHelperTest.cs =================================================================== diff -u -r2a0fbe6ec22928831305671ecd4f41030b827250 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Utils.Test/GrassCoverErosionInwardsHelperTest.cs (.../GrassCoverErosionInwardsHelperTest.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Utils.Test/GrassCoverErosionInwardsHelperTest.cs (.../GrassCoverErosionInwardsHelperTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -103,106 +103,6 @@ } [Test] - public void FailureMechanismSectionForCalculation_CalculationNull_ThrowsArgumentNullException() - { - // Call - TestDelegate test = () => GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation( - twoSections, - null); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("calculation", exception.ParamName); - } - - [Test] - public void FailureMechanismSectionForCalculation_SectionsNull_ThrowsArgumentNullException() - { - // Call - TestDelegate test = () => GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation( - null, - calculationInSectionA); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("sections", exception.ParamName); - } - - [Test] - public void FailureMechanismSectionForCalculation_SectionElementsNull_ThrowsArgumentException() - { - // Call - TestDelegate test = () => GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation( - new FailureMechanismSection[] - { - null, - null - }, - calculationInSectionA); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("sections", exception.ParamName); - } - - [Test] - public void FailureMechanismSectionForCalculation_CalculationWithoutDikeProfile_ReturnsNull() - { - // Setup - var calculation = new GrassCoverErosionInwardsCalculation(); - - // Call - FailureMechanismSection failureMechanismSection = - GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation(oneSection, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_ValidEmptySectionResults_ReturnsNull() - { - // Setup - var emptySections = new FailureMechanismSection[0]; - var calculation = new GrassCoverErosionInwardsCalculation - { - InputParameters = - { - DikeProfile = new TestDikeProfile() - } - }; - - // Call - FailureMechanismSection failureMechanismSection = - GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation(emptySections, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_FirstSectionResultContainsCalculation_FailureMechanismSectionOfFirstSectionResult() - { - // Call - FailureMechanismSection failureMechanismSection = - GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation(twoSections, calculationInSectionA); - - // Assert - Assert.AreSame(twoSections[0], failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_SecondSectionResultContainsCalculation_FailureMechanismSectionOfSecondSectionResult() - { - // Call - FailureMechanismSection failureMechanismSection = - GrassCoverErosionInwardsHelper.FailureMechanismSectionForCalculation(twoSections, calculationInSectionB); - - // Assert - Assert.AreSame(twoSections[1], failureMechanismSection); - } - - [Test] public void UpdateCalculationToSectionResultAssignments_SectionResultsNull_ThrowsArgumentNullException() { // Call Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -26,17 +26,14 @@ using Core.Common.IO.Exceptions; using log4net; using Ringtoets.Common.Data.AssessmentSection; -using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service; using Ringtoets.Common.Service.ValidationRules; -using Ringtoets.Common.Utils; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Service.Properties; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; -using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Input.Structures; using Ringtoets.HydraRing.Calculation.Exceptions; using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; @@ -131,12 +128,9 @@ } var calculationName = calculation.Name; + + StructuresOvertoppingCalculationInput input = CreateInput(calculation, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); - FailureMechanismSection failureMechanismSection = StructuresHelper.GetFailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - - StructuresOvertoppingCalculationInput input = CreateInput(calculation, failureMechanismSection, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); - string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); calculator = HydraRingCalculatorFactory.Instance.CreateStructuresOvertoppingCalculator(hlcdDirectory, assessmentSection.Id); @@ -216,13 +210,12 @@ /// private static StructuresOvertoppingCalculationInput CreateInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralHeightStructuresInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var structuresOvertoppingCalculationInput = new StructuresOvertoppingCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), generalInput.GravitationalAcceleration, Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -r6a8d4edb0f3b2d00d3958c48146c51487bd01247 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 6a8d4edb0f3b2d00d3958c48146c51487bd01247) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -720,11 +720,6 @@ { // Setup var heightStructuresFailureMechanism = new HeightStructuresFailureMechanism(); - heightStructuresFailureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(heightStructuresFailureMechanism, mockRepository); @@ -743,8 +738,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = heightStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var testStructuresOvertoppingCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresOvertoppingCalculator; @@ -765,7 +758,7 @@ HeightStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresOvertoppingCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, generalInput.GravitationalAcceleration, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/DikeHeightCalculationInput.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/DikeHeightCalculationInput.cs (.../DikeHeightCalculationInput.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/DikeHeightCalculationInput.cs (.../DikeHeightCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -39,7 +39,7 @@ /// /// The id of the hydraulic boundary location. /// The norm. - /// The section. + /// The normal of the section. /// The profile points. /// The foreland points. /// The break water. @@ -64,7 +64,7 @@ /// The lower boundary of the exponent model factor shallow. /// The upper boundary of the exponent model factor shallow. public DikeHeightCalculationInput(long hydraulicBoundaryLocationId, double norm, - HydraRingSection section, + double sectionNormal, IEnumerable profilePoints, IEnumerable forelandPoints, HydraRingBreakWater breakWater, @@ -80,7 +80,7 @@ double exponentModelFactorShallowMean, double exponentModelFactorShallowStandardDeviation, double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary) : base(hydraulicBoundaryLocationId, norm, - section, + sectionNormal, profilePoints, forelandPoints, breakWater, @@ -99,13 +99,7 @@ this.criticalOvertoppingStandardDeviation = criticalOvertoppingStandardDeviation; } - public override int VariableId - { - get - { - return 1; - } - } + public override int VariableId { get; } = 1; public override IEnumerable Variables { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/HydraulicLoadsCalculationInput.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/HydraulicLoadsCalculationInput.cs (.../HydraulicLoadsCalculationInput.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/HydraulicLoadsCalculationInput.cs (.../HydraulicLoadsCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -58,7 +58,7 @@ /// /// The id of the hydraulic boundary location. /// The norm. - /// The section. + /// The normal of the section. /// The profile points. /// The foreland points. /// The break water. @@ -81,7 +81,7 @@ /// The lower boundary of the exponent model factor shallow. /// The upper boundary of the exponent model factor shallow. protected HydraulicLoadsCalculationInput(long hydraulicBoundaryLocationId, double norm, - HydraRingSection section, + double sectionNormal, IEnumerable profilePoints, IEnumerable forelandPoints, HydraRingBreakWater breakWater, @@ -97,7 +97,7 @@ double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary) : base(hydraulicBoundaryLocationId, norm) { - this.section = section; + section = new HydraRingSection(1, double.NaN, sectionNormal); this.modelFactorCriticalOvertopping = modelFactorCriticalOvertopping; this.factorFbMean = factorFbMean; this.factorFbStandardDeviation = factorFbStandardDeviation; @@ -121,13 +121,7 @@ this.breakWater = breakWater; } - public override HydraRingFailureMechanismType FailureMechanismType - { - get - { - return HydraRingFailureMechanismType.HydraulicLoads; - } - } + public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.HydraulicLoads; public override HydraRingSection Section { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/OvertoppingRateCalculationInput.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/OvertoppingRateCalculationInput.cs (.../OvertoppingRateCalculationInput.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Hydraulics/OvertoppingRateCalculationInput.cs (.../OvertoppingRateCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -38,7 +38,7 @@ /// /// The id of the hydraulic boundary location. /// The norm. - /// The section. + /// The normal of the section. /// The profile points. /// The foreland points. /// The break water. @@ -62,7 +62,7 @@ /// The lower boundary of the exponent model factor shallow. /// The upper boundary of the exponent model factor shallow. public OvertoppingRateCalculationInput(long hydraulicBoundaryLocationId, double norm, - HydraRingSection section, + double sectionNormal, IEnumerable profilePoints, IEnumerable forelandPoints, HydraRingBreakWater breakWater, @@ -78,7 +78,7 @@ double exponentModelFactorShallowMean, double exponentModelFactorShallowStandardDeviation, double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary) : base(hydraulicBoundaryLocationId, norm, - section, + sectionNormal, profilePoints, forelandPoints, breakWater, @@ -96,13 +96,7 @@ this.dikeHeight = dikeHeight; } - public override int VariableId - { - get - { - return 17; - } - } + public override int VariableId { get; } = 17; public override IEnumerable Variables { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Overtopping/OvertoppingCalculationInput.cs =================================================================== diff -u -rf6fcb5ceae11a5799ce77d029c2b332838a46aed -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Overtopping/OvertoppingCalculationInput.cs (.../OvertoppingCalculationInput.cs) (revision f6fcb5ceae11a5799ce77d029c2b332838a46aed) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Overtopping/OvertoppingCalculationInput.cs (.../OvertoppingCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -59,7 +59,7 @@ /// Creates a new instance of the class. /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The profile points. /// The foreland points. /// The break water. @@ -84,7 +84,8 @@ /// The standard deviation of the exponent model factor shallow. /// The lower boundary of the exponent model factor shallow. /// The upper boundary of the exponent model factor shallow. - public OvertoppingCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public OvertoppingCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable profilePoints, IEnumerable forelandPoints, HydraRingBreakWater breakWater, @@ -102,7 +103,7 @@ double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary) : base(hydraulicBoundaryLocationId) { - this.section = section; + section = new HydraRingSection(1, double.NaN, sectionNormal); this.profilePoints = profilePoints; this.forelandPoints = forelandPoints; this.breakWater = breakWater; @@ -129,21 +130,9 @@ this.exponentModelFactorShallowUpperBoundary = exponentModelFactorShallowUpperBoundary; } - public override HydraRingFailureMechanismType FailureMechanismType - { - get - { - return HydraRingFailureMechanismType.DikesOvertopping; - } - } + public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.DikesOvertopping; - public override int VariableId - { - get - { - return 1; - } - } + public override int VariableId { get; } = 1; public override HydraRingSection Section { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureCalculationInput.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureCalculationInput.cs (.../StructuresClosureCalculationInput.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureCalculationInput.cs (.../StructuresClosureCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -57,7 +57,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The gravitational acceleration. @@ -80,7 +80,8 @@ /// The mean of the storm duration. /// The variation of the storm duration. /// The probability or frequency of an open structure before flooding. - protected StructuresClosureCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + protected StructuresClosureCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -99,7 +100,7 @@ double probabilityOrFrequencyOpenStructureBeforeFlooding) : base(hydraulicBoundaryLocationId) { - this.section = section; + section = new HydraRingSection(1, double.NaN, sectionNormal); this.forelandPoints = forelandPoints; this.breakWater = breakWater; this.gravitationalAcceleration = gravitationalAcceleration; @@ -124,21 +125,9 @@ this.probabilityOrFrequencyOpenStructureBeforeFlooding = probabilityOrFrequencyOpenStructureBeforeFlooding; } - public override HydraRingFailureMechanismType FailureMechanismType - { - get - { - return HydraRingFailureMechanismType.StructuresClosure; - } - } + public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.StructuresClosure; - public override int VariableId - { - get - { - return 58; - } - } + public override int VariableId { get; } = 58; public override HydraRingSection Section { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInput.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInput.cs (.../StructuresClosureFloodedCulvertCalculationInput.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInput.cs (.../StructuresClosureFloodedCulvertCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -41,7 +41,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The gravitational acceleration. @@ -70,7 +70,8 @@ /// The standard deviation of the area of flow apertures. /// The mean of the inside water level. /// The standard deviation of the inside water level. - public StructuresClosureFloodedCulvertCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresClosureFloodedCulvertCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -90,7 +91,8 @@ double drainCoefficientMean, double drainCoefficientStandardDeviation, double areaFlowAperturesMean, double areaFlowAperturesStandardDeviation, double insideWaterLevelMean, double insideWaterLevelStandardDeviation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureLowSillCalculationInput.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureLowSillCalculationInput.cs (.../StructuresClosureLowSillCalculationInput.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureLowSillCalculationInput.cs (.../StructuresClosureLowSillCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -45,7 +45,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The gravitational acceleration. @@ -78,7 +78,8 @@ /// The standard deviation of the inside water level. /// The mean of the width flow apertures. /// The variation of the width flow apertures. - public StructuresClosureLowSillCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresClosureLowSillCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -100,7 +101,8 @@ double thresholdHeightOpenWeirMean, double thresholdHeightOpenWeirStandardDeviation, double insideWaterLevelMean, double insideWaterLevelStandardDeviation, double widthFlowAperturesMean, double widthFlowAperturesVariation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs (.../StructuresClosureVerticalWallCalculationInput.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresClosureVerticalWallCalculationInput.cs (.../StructuresClosureVerticalWallCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -45,7 +45,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The gravitational acceleration. @@ -78,7 +78,8 @@ /// The mean of the width flow apertures. /// The variation of the width flow apertures. /// The deviation of the wave direction. - public StructuresClosureVerticalWallCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresClosureVerticalWallCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -101,7 +102,8 @@ double levelCrestStructureNotClosingMean, double levelCrestStructureNotClosingStandardDeviation, double widthFlowAperturesMean, double widthFlowAperturesVariation, double deviationWaveDirection) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresOvertoppingCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresOvertoppingCalculationInput.cs (.../StructuresOvertoppingCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresOvertoppingCalculationInput.cs (.../StructuresOvertoppingCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -62,7 +62,7 @@ /// Creates a new instance of the class. /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The gravitational acceleration. @@ -90,7 +90,8 @@ /// The deviation of the wave direction. /// The mean of the storm duration. /// The variation of the storm duration. - public StructuresOvertoppingCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresOvertoppingCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -110,7 +111,7 @@ double stormDurationMean, double stormDurationVariation) : base(hydraulicBoundaryLocationId) { - this.section = section; + section = new HydraRingSection(1, double.NaN, sectionNormal); this.forelandPoints = forelandPoints; this.breakWater = breakWater; this.gravitationalAcceleration = gravitationalAcceleration; @@ -140,21 +141,9 @@ this.stormDurationVariation = stormDurationVariation; } - public override HydraRingFailureMechanismType FailureMechanismType - { - get - { - return HydraRingFailureMechanismType.StructuresOvertopping; - } - } + public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.StructuresOvertopping; - public override int VariableId - { - get - { - return 60; - } - } + public override int VariableId { get; } = 60; public override HydraRingSection Section { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointCalculationInput.cs (.../StructuresStabilityPointCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointCalculationInput.cs (.../StructuresStabilityPointCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -88,7 +88,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The volumic weight of water. @@ -142,7 +142,8 @@ /// The vertical distance. /// The modification factor waves slowly-varying pressure component. /// The modification factor dynamic or impulsive pressure component. - protected StructuresStabilityPointCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + protected StructuresStabilityPointCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -179,7 +180,7 @@ double modificationFactorDynamicOrImpulsivePressureComponent) : base(hydraulicBoundaryLocationId) { - this.section = section; + section = new HydraRingSection(1, double.NaN, sectionNormal); this.forelandPoints = forelandPoints; this.breakWater = breakWater; this.volumicWeightWater = volumicWeightWater; @@ -235,21 +236,9 @@ this.modificationFactorDynamicOrImpulsivePressureComponent = modificationFactorDynamicOrImpulsivePressureComponent; } - public override HydraRingFailureMechanismType FailureMechanismType - { - get - { - return HydraRingFailureMechanismType.StructuresStructuralFailure; - } - } + public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.StructuresStructuralFailure; - public override int VariableId - { - get - { - return 58; - } - } + public override int VariableId { get; } = 58; public override HydraRingSection Section { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInput.cs (.../StructuresStabilityPointFloodedCulvertLinearCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInput.cs (.../StructuresStabilityPointFloodedCulvertLinearCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -43,7 +43,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The volumic weight of water. @@ -105,7 +105,8 @@ /// The variation of the constructive strength linear load model. /// The mean of the stability linear load model. /// The variation of the stability linear load model. - public StructuresStabilityPointFloodedCulvertLinearCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresStabilityPointFloodedCulvertLinearCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -144,7 +145,8 @@ double areaFlowAperturesMean, double areaFlowAperturesStandardDeviation, double constructiveStrengthLinearLoadModelMean, double constructiveStrengthLinearLoadModelVariation, double stabilityLinearLoadModelMean, double stabilityLinearLoadModelVariation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInput.cs (.../StructuresStabilityPointFloodedCulvertQuadraticCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInput.cs (.../StructuresStabilityPointFloodedCulvertQuadraticCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -43,7 +43,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The volumic weight of water. @@ -105,7 +105,8 @@ /// The variation of the constructive strength quadratic load model. /// The mean of the stability quadratic load model. /// The variation of the stability quadratic load model. - public StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -144,7 +145,8 @@ double areaFlowAperturesMean, double areaFlowAperturesStandardDeviation, double constructiveStrengthQuadraticLoadModelMean, double constructiveStrengthQuadraticLoadModelVariation, double stabilityQuadraticLoadModelMean, double stabilityQuadraticLoadModelVariation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInput.cs (.../StructuresStabilityPointLowSillLinearCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInput.cs (.../StructuresStabilityPointLowSillLinearCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -43,7 +43,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The volumic weight of water. @@ -105,7 +105,8 @@ /// The variation of the stability linear load model. /// The mean of the width flow apertures. /// The variation of the width flow apertures. - public StructuresStabilityPointLowSillLinearCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresStabilityPointLowSillLinearCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -144,7 +145,8 @@ double constructiveStrengthLinearLoadModelMean, double constructiveStrengthLinearLoadModelVariation, double stabilityLinearLoadModelMean, double stabilityLinearLoadModelVariation, double widthFlowAperturesMean, double widthFlowAperturesVariation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInput.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInput.cs (.../StructuresStabilityPointLowSillQuadraticCalculationInput.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInput.cs (.../StructuresStabilityPointLowSillQuadraticCalculationInput.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -43,7 +43,7 @@ /// Creates a new instance of . /// /// The id of the hydraulic boundary location. - /// The section. + /// The normal of the section. /// The foreland points. /// The break water. /// The volumic weight of water. @@ -105,7 +105,8 @@ /// The variation of the stability quadratic load model. /// The mean of the width flow apertures. /// The variation of the width flow apertures. - public StructuresStabilityPointLowSillQuadraticCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public StructuresStabilityPointLowSillQuadraticCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -144,7 +145,8 @@ double constructiveStrengthQuadraticLoadModelMean, double constructiveStrengthQuadraticLoadModelVariation, double stabilityQuadraticLoadModelMean, double stabilityQuadraticLoadModelVariation, double widthFlowAperturesMean, double widthFlowAperturesVariation) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/DikeHeightCalculationInputTest.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/DikeHeightCalculationInputTest.cs (.../DikeHeightCalculationInputTest.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/DikeHeightCalculationInputTest.cs (.../DikeHeightCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -40,8 +40,8 @@ // Setup const double norm = 1.0/10000; const int hydraulicBoundaryLocationId = 1000; - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); + const double sectionNormal = 21.1; const double modelFactorCriticalOvertopping = 1.1; const double factorFbMean = 2.2; const double factorFbStandardDeviation = 3.3; @@ -74,7 +74,7 @@ var expectedRingBreakWater = new HydraRingBreakWater(2, 3.3); // Call - var input = new DikeHeightCalculationInput(hydraulicBoundaryLocationId, norm, section, + var input = new DikeHeightCalculationInput(hydraulicBoundaryLocationId, norm, sectionNormal, expectedRingProfilePoints, expectedRingForelandPoints, expectedRingBreakWater, modelFactorCriticalOvertopping, factorFbMean, factorFbStandardDeviation, @@ -95,13 +95,16 @@ Assert.AreEqual(hydraulicBoundaryLocationId, input.HydraulicBoundaryLocationId); Assert.AreEqual(HydraRingFailureMechanismType.HydraulicLoads, input.FailureMechanismType); Assert.AreEqual(1, input.VariableId); - Assert.IsNotNull(input.Section); HydraRingDataEqualityHelper.AreEqual(GetDefaultDikeHeightVariables().ToArray(), input.Variables.ToArray()); CollectionAssert.AreEqual(expectedRingProfilePoints, input.ProfilePoints); CollectionAssert.AreEqual(expectedRingForelandPoints, input.ForelandsPoints); Assert.AreEqual(expectedRingBreakWater, input.BreakWater); Assert.AreEqual(expectedBeta, input.Beta); - Assert.AreSame(section, input.Section); + + HydraRingSection hydraRingSection = input.Section; + Assert.AreEqual(1, hydraRingSection.SectionId); + Assert.IsNaN(hydraRingSection.SectionLength); + Assert.AreEqual(sectionNormal, hydraRingSection.CrossSectionNormal); } [Test] @@ -111,11 +114,8 @@ [TestCase(104, null)] public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { - // Setup - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); - // Call - var input = new DikeHeightCalculationInput(1, 1.0/1000, section, + var input = new DikeHeightCalculationInput(1, 1.0/1000, double.NaN, new List(), new List(), new HydraRingBreakWater(0, 1.1), Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/HydraulicLoadsCalculationInputTest.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/HydraulicLoadsCalculationInputTest.cs (.../HydraulicLoadsCalculationInputTest.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/HydraulicLoadsCalculationInputTest.cs (.../HydraulicLoadsCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -41,8 +41,8 @@ // Setup const double norm = 1.0/10000; const int hydraulicBoundaryLocationId = 1000; - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); + const double sectionNormal = 19.9; const double modelFactorCriticalOvertopping = 1.1; const double factorFbMean = 2.2; const double factorFbStandardDeviation = 3.3; @@ -73,7 +73,7 @@ var expectedRingBreakWater = new HydraRingBreakWater(2, 3.3); // Call - var input = new HydraulicLoadsCalculationInputImplementation(hydraulicBoundaryLocationId, norm, section, + var input = new HydraulicLoadsCalculationInputImplementation(hydraulicBoundaryLocationId, norm, sectionNormal, expectedRingProfilePoints, expectedRingForelandPoints, expectedRingBreakWater, modelFactorCriticalOvertopping, factorFbMean, factorFbStandardDeviation, @@ -98,7 +98,11 @@ CollectionAssert.AreEqual(expectedRingForelandPoints, input.ForelandsPoints); Assert.AreEqual(expectedRingBreakWater, input.BreakWater); Assert.AreEqual(expectedBeta, input.Beta); - Assert.AreSame(section, input.Section); + + HydraRingSection hydraRingSection = input.Section; + Assert.AreEqual(1, hydraRingSection.SectionId); + Assert.IsNaN(hydraRingSection.SectionLength); + Assert.AreEqual(sectionNormal, hydraRingSection.CrossSectionNormal); } [Test] @@ -108,11 +112,8 @@ [TestCase(104, null)] public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { - // Setup - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); - // Call - var input = new HydraulicLoadsCalculationInputImplementation(1, 1.0/1000, section, + var input = new HydraulicLoadsCalculationInputImplementation(1, 1.0/1000, double.NaN, new List(), new List(), new HydraRingBreakWater(0, 1.1), @@ -136,7 +137,7 @@ private class HydraulicLoadsCalculationInputImplementation : HydraulicLoadsCalculationInput { public HydraulicLoadsCalculationInputImplementation(long hydraulicBoundaryLocationId, double norm, - HydraRingSection section, + double sectionNormal, IEnumerable profilePoints, IEnumerable forelandPoints, HydraRingBreakWater breakWater, @@ -151,7 +152,7 @@ double exponentModelFactorShallowMean, double exponentModelFactorShallowStandardDeviation, double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary) : base(hydraulicBoundaryLocationId, norm, - section, + sectionNormal, profilePoints, forelandPoints, breakWater, @@ -166,13 +167,7 @@ exponentModelFactorShallowMean, exponentModelFactorShallowStandardDeviation, exponentModelFactorShallowLowerBoundary, exponentModelFactorShallowUpperBoundary) {} - public override int VariableId - { - get - { - return -1; - } - } + public override int VariableId { get; } = -1; } } } \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/OvertoppingRateCalculationInputTest.cs =================================================================== diff -u -r4fe5c1139999add996f87b25e9baaff542570a30 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/OvertoppingRateCalculationInputTest.cs (.../OvertoppingRateCalculationInputTest.cs) (revision 4fe5c1139999add996f87b25e9baaff542570a30) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Hydraulics/OvertoppingRateCalculationInputTest.cs (.../OvertoppingRateCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -40,8 +40,8 @@ // Setup const double norm = 1.0/10000; const int hydraulicBoundaryLocationId = 1000; - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); + const double sectionNormal = 20.0; const double dikeHeight = 1.1; const double modelFactorCriticalOvertopping = 2.2; const double factorFbMean = 3.3; @@ -73,7 +73,7 @@ var expectedRingBreakWater = new HydraRingBreakWater(2, 3.3); // Call - var input = new OvertoppingRateCalculationInput(hydraulicBoundaryLocationId, norm, section, + var input = new OvertoppingRateCalculationInput(hydraulicBoundaryLocationId, norm, sectionNormal, expectedRingProfilePoints, expectedRingForelandPoints, expectedRingBreakWater, dikeHeight, modelFactorCriticalOvertopping, @@ -100,7 +100,11 @@ CollectionAssert.AreEqual(expectedRingForelandPoints, input.ForelandsPoints); Assert.AreEqual(expectedRingBreakWater, input.BreakWater); Assert.AreEqual(expectedBeta, input.Beta); - Assert.AreSame(section, input.Section); + + HydraRingSection hydraRingSection = input.Section; + Assert.AreEqual(1, hydraRingSection.SectionId); + Assert.IsNaN(hydraRingSection.SectionLength); + Assert.AreEqual(sectionNormal, hydraRingSection.CrossSectionNormal); } [Test] @@ -110,11 +114,8 @@ [TestCase(104, null)] public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { - // Setup - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); - // Call - var input = new OvertoppingRateCalculationInput(1, 1000, section, + var input = new OvertoppingRateCalculationInput(1, 1000, double.NaN, new List(), new List(), new HydraRingBreakWater(0, 1.1), Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Overtopping/OvertoppingCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Overtopping/OvertoppingCalculationInputTest.cs (.../OvertoppingCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Overtopping/OvertoppingCalculationInputTest.cs (.../OvertoppingCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; @@ -38,8 +39,8 @@ { // Setup int hydraulicBoundaryLocationId = 1000; - HydraRingSection expectedHydraRingSection = new HydraRingSection(1, double.NaN, double.NaN); + const double sectionNormal = 22.2; const double dikeHeight = 1.1; const double modelFactorCriticalOvertopping = 2.2; const double factorFbMean = 3.3; @@ -74,7 +75,7 @@ // Call - OvertoppingCalculationInput overtoppingCalculationInput = new OvertoppingCalculationInput(hydraulicBoundaryLocationId, expectedHydraRingSection, + OvertoppingCalculationInput overtoppingCalculationInput = new OvertoppingCalculationInput(hydraulicBoundaryLocationId, sectionNormal, expectedRingProfilePoints, expectedRingForelandPoints, expectedRingBreakWater, dikeHeight, modelFactorCriticalOvertopping, @@ -96,16 +97,17 @@ Assert.AreEqual(expectedCalculationTypeId, overtoppingCalculationInput.CalculationTypeId); Assert.AreEqual(hydraulicBoundaryLocationId, overtoppingCalculationInput.HydraulicBoundaryLocationId); Assert.AreEqual(HydraRingFailureMechanismType.DikesOvertopping, overtoppingCalculationInput.FailureMechanismType); - Assert.AreEqual(expectedVariableId, overtoppingCalculationInput.VariableId); - Assert.IsNotNull(overtoppingCalculationInput.Section); + Assert.AreEqual(expectedVariableId, overtoppingCalculationInput.VariableId); HydraRingDataEqualityHelper.AreEqual(GetDefaultOvertoppingVariables().ToArray(), overtoppingCalculationInput.Variables.ToArray()); CollectionAssert.AreEqual(expectedRingProfilePoints, overtoppingCalculationInput.ProfilePoints); CollectionAssert.AreEqual(expectedRingForelandPoints, overtoppingCalculationInput.ForelandsPoints); Assert.AreEqual(expectedRingBreakWater, overtoppingCalculationInput.BreakWater); Assert.IsNaN(overtoppingCalculationInput.Beta); - var section = overtoppingCalculationInput.Section; - Assert.AreEqual(expectedHydraRingSection, section); + HydraRingSection hydraRingSection = overtoppingCalculationInput.Section; + Assert.AreEqual(1, hydraRingSection.SectionId); + Assert.IsNaN(hydraRingSection.SectionLength); + Assert.AreEqual(sectionNormal, hydraRingSection.CrossSectionNormal); } [Test] @@ -115,11 +117,8 @@ [TestCase(104, null)] public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { - // Setup - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); - // Call - OvertoppingCalculationInput overtoppingCalculationInput = new OvertoppingCalculationInput(1, section, + OvertoppingCalculationInput overtoppingCalculationInput = new OvertoppingCalculationInput(1, double.NaN, new List(), new List(), new HydraRingBreakWater(0, 1.1), Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureCalculationInputTest.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureCalculationInputTest.cs (.../StructuresClosureCalculationInputTest.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureCalculationInputTest.cs (.../StructuresClosureCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -39,10 +39,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 21.1; const double gravitationalAcceleration = 1.1; const double factorStormDurationOpenStructure = 2.2; const double failureProbabilityOpenStructure = 3.3; @@ -65,7 +65,8 @@ const double probabilityOrFrequencyOpenStructureBeforeFlooding = 20.0; // Call - var input = new TestStructuresClosureCalculationInput(hydraulicBoundaryLocationId, section, + var input = new TestStructuresClosureCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, @@ -88,7 +89,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresClosure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -114,7 +119,8 @@ private class TestStructuresClosureCalculationInput : StructuresClosureCalculationInput { - public TestStructuresClosureCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public TestStructuresClosureCalculationInput(long hydraulicBoundaryLocationId, + double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double gravitationalAcceleration, @@ -131,7 +137,8 @@ double failureProbabilityStructureWithErosion, double stormDurationMean, double stormDurationVariation, double probabilityOrFrequencyOpenStructureBeforeFlooding) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInputTest.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInputTest.cs (.../StructuresClosureFloodedCulvertCalculationInputTest.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureFloodedCulvertCalculationInputTest.cs (.../StructuresClosureFloodedCulvertCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 27.7; const double gravitationalAcceleration = 1.1; const double factorStormDurationOpenStructure = 2.2; const double failureProbabilityOpenStructure = 3.3; @@ -69,7 +69,8 @@ const double insideWaterLevelStandardDeviation = 26.6; // Call - var input = new StructuresClosureFloodedCulvertCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresClosureFloodedCulvertCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, @@ -95,7 +96,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresClosure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -109,7 +114,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresClosureFloodedCulvertCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresClosureFloodedCulvertCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 222, 333, 5.5, 6, 7.7, 8.8, 11, 22, 33, 44, 55, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureLowSillCalculationInputTest.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureLowSillCalculationInputTest.cs (.../StructuresClosureLowSillCalculationInputTest.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureLowSillCalculationInputTest.cs (.../StructuresClosureLowSillCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 31.1; const double gravitationalAcceleration = 1.1; const double factorStormDurationOpenStructure = 2.2; const double failureProbabilityOpenStructure = 3.3; @@ -73,7 +73,8 @@ const double widthFlowAperturesVariation = 30.0; // Call - var input = new StructuresClosureLowSillCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresClosureLowSillCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, @@ -101,7 +102,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresClosure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -115,7 +120,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresClosureLowSillCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresClosureLowSillCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 222, 333, 5.5, 6, 7.7, 8.8, 11, 22, 33, 44, 55, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs (.../StructuresClosureVerticalWallCalculationInputTest.cs) (revision 9a46b1398c3a83b8f5c06254ccb9808f33eb2531) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresClosureVerticalWallCalculationInputTest.cs (.../StructuresClosureVerticalWallCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 31.1; const double gravitationalAcceleration = 1.1; const double factorStormDurationOpenStructure = 2.2; const double failureProbabilityOpenStructure = 3.3; @@ -73,7 +73,8 @@ const double deviationWaveDirection = 30.0; // Call - var input = new StructuresClosureVerticalWallCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresClosureVerticalWallCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, factorStormDurationOpenStructure, @@ -102,7 +103,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresClosure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -116,7 +121,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresClosureVerticalWallCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresClosureVerticalWallCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 222, 333, 5.5, 6, 7.7, 8.8, 11, 22, 33, 44, 55, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresOvertoppingCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresOvertoppingCalculationInputTest.cs (.../StructuresOvertoppingCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresOvertoppingCalculationInputTest.cs (.../StructuresOvertoppingCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -39,10 +39,10 @@ // Setup const int hydraulicBoundaryLocationId = 1000; - HydraRingSection section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 26.6; const double gravitationalAcceleration = 1.1; const double modelFactorOvertoppingFlowMean = 2.2; const double modelFactorOvertoppingFlowStandardDeviation = 3.3; @@ -70,7 +70,8 @@ const double stormDurationVariation = 25.5; // Call - var input = new StructuresOvertoppingCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresOvertoppingCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, modelFactorOvertoppingFlowMean, modelFactorOvertoppingFlowStandardDeviation, @@ -96,7 +97,11 @@ Assert.AreEqual(hydraulicBoundaryLocationId, input.HydraulicBoundaryLocationId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresOvertopping, input.FailureMechanismType); Assert.AreEqual(variableId, input.VariableId); - Assert.AreEqual(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultOvertoppingVariables().ToArray(), input.Variables.ToArray()); Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointCalculationInputTest.cs (.../StructuresStabilityPointCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointCalculationInputTest.cs (.../StructuresStabilityPointCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -39,10 +39,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 52.2; const double volumicWeightWater = 1.1; const double gravitationalAcceleration = 2.2; const double levelCrestStructureMean = 3.3; @@ -96,7 +96,7 @@ const double modificationFactorDynamicOrImpulsivePressureComponent = 51.1; // Call - var input = new TestStructuresStabilityPointCalculationInput(hydraulicBoundaryLocationId, section, + var input = new TestStructuresStabilityPointCalculationInput(hydraulicBoundaryLocationId, sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, @@ -137,7 +137,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresStructuralFailure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -181,7 +185,7 @@ private class TestStructuresStabilityPointCalculationInput : StructuresStabilityPointCalculationInput { - public TestStructuresStabilityPointCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section, + public TestStructuresStabilityPointCalculationInput(long hydraulicBoundaryLocationId, double sectionNormal, IEnumerable forelandPoints, HydraRingBreakWater breakWater, double volumicWeightWater, @@ -216,7 +220,8 @@ double verticalDistance, double modificationFactorWavesSlowlyVaryingPressureComponent, double modificationFactorDynamicOrImpulsivePressureComponent) - : base(hydraulicBoundaryLocationId, section, + : base(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInputTest.cs (.../StructuresStabilityPointFloodedCulvertLinearCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertLinearCalculationInputTest.cs (.../StructuresStabilityPointFloodedCulvertLinearCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 60.0; const double volumicWeightWater = 1.1; const double gravitationalAcceleration = 2.2; const double levelCrestStructureMean = 3.3; @@ -102,7 +102,7 @@ const double stabilityLinearLoadModelVariation = 59.9; // Call - var input = new StructuresStabilityPointFloodedCulvertLinearCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresStabilityPointFloodedCulvertLinearCalculationInput(hydraulicBoundaryLocationId, sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, @@ -147,7 +147,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresStructuralFailure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -163,7 +167,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresStabilityPointFloodedCulvertLinearCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresStabilityPointFloodedCulvertLinearCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInputTest.cs (.../StructuresStabilityPointFloodedCulvertQuadraticCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointFloodedCulvertQuadraticCalculationInputTest.cs (.../StructuresStabilityPointFloodedCulvertQuadraticCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 60.0; const double volumicWeightWater = 1.1; const double gravitationalAcceleration = 2.2; const double levelCrestStructureMean = 3.3; @@ -102,7 +102,7 @@ const double stabilityQuadraticLoadModelVariation = 59.9; // Call - var input = new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(hydraulicBoundaryLocationId, sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, @@ -147,7 +147,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresStructuralFailure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -163,7 +167,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInputTest.cs (.../StructuresStabilityPointLowSillLinearCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillLinearCalculationInputTest.cs (.../StructuresStabilityPointLowSillLinearCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 60.0; const double volumicWeightWater = 1.1; const double gravitationalAcceleration = 2.2; const double levelCrestStructureMean = 3.3; @@ -102,7 +102,7 @@ const double widthFlowAperturesVariation = 59.9; // Call - var input = new StructuresStabilityPointLowSillLinearCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresStabilityPointLowSillLinearCalculationInput(hydraulicBoundaryLocationId, sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, @@ -147,7 +147,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresStructuralFailure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -163,7 +167,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresStabilityPointLowSillLinearCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresStabilityPointLowSillLinearCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInputTest.cs =================================================================== diff -u -r92ce01ec6a2ac8d64f77a2a618c6b6e410a78812 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInputTest.cs (.../StructuresStabilityPointLowSillQuadraticCalculationInputTest.cs) (revision 92ce01ec6a2ac8d64f77a2a618c6b6e410a78812) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Data/Input/Structures/StructuresStabilityPointLowSillQuadraticCalculationInputTest.cs (.../StructuresStabilityPointLowSillQuadraticCalculationInputTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -37,10 +37,10 @@ { // Setup const int hydraulicBoundaryLocationId = 1000; - var section = new HydraRingSection(1, double.NaN, double.NaN); var forelandPoints = Enumerable.Empty(); var breakWater = new HydraRingBreakWater(1, 1.1); + const double sectionNormal = 60.0; const double volumicWeightWater = 1.1; const double gravitationalAcceleration = 2.2; const double levelCrestStructureMean = 3.3; @@ -102,7 +102,7 @@ const double widthFlowAperturesVariation = 59.9; // Call - var input = new StructuresStabilityPointLowSillQuadraticCalculationInput(hydraulicBoundaryLocationId, section, + var input = new StructuresStabilityPointLowSillQuadraticCalculationInput(hydraulicBoundaryLocationId, sectionNormal, forelandPoints, breakWater, volumicWeightWater, gravitationalAcceleration, @@ -147,7 +147,11 @@ Assert.AreEqual(1, input.CalculationTypeId); Assert.AreEqual(58, input.VariableId); Assert.AreEqual(HydraRingFailureMechanismType.StructuresStructuralFailure, input.FailureMechanismType); - Assert.AreSame(section, input.Section); + + HydraRingSection section = input.Section; + Assert.AreEqual(1, section.SectionId); + Assert.IsNaN(section.SectionLength); + Assert.AreEqual(sectionNormal, section.CrossSectionNormal); Assert.AreSame(forelandPoints, input.ForelandsPoints); Assert.AreSame(breakWater, input.BreakWater); HydraRingDataEqualityHelper.AreEqual(GetDefaultVariables().ToArray(), input.Variables.ToArray()); @@ -163,7 +167,7 @@ public void GetSubMechanismModelId_Always_ReturnsExpectedValues(int subMechanismModelId, int? expectedSubMechanismModelId) { // Setup - var input = new StructuresStabilityPointLowSillQuadraticCalculationInput(111, new HydraRingSection(1, double.NaN, double.NaN), + var input = new StructuresStabilityPointLowSillQuadraticCalculationInput(111, double.NaN, Enumerable.Empty(), new HydraRingBreakWater(1, 1.1), 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10, Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Integration/HydraRingConfigurationServiceIntegrationTest.cs =================================================================== diff -u -ra131a156219bcec5b997f17b66db69dbd80b70a6 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Integration/HydraRingConfigurationServiceIntegrationTest.cs (.../HydraRingConfigurationServiceIntegrationTest.cs) (revision a131a156219bcec5b997f17b66db69dbd80b70a6) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Integration/HydraRingConfigurationServiceIntegrationTest.cs (.../HydraRingConfigurationServiceIntegrationTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -217,7 +217,7 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; const double dikeHeight = 4.4; const double modelFactorCriticalOvertopping = 5.5; const double factorFbMean = 6.6; @@ -252,7 +252,7 @@ hydraRingConfigurationService.AddHydraRingCalculationInput( new OvertoppingCalculationInput( - hydraulicBoundaryLocationId, section, + hydraulicBoundaryLocationId, sectionNormal, profilePoints, forelandPoints, breakWater, dikeHeight, modelFactorCriticalOvertopping, @@ -284,7 +284,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 101, 1);" + Environment.NewLine + @@ -369,7 +369,7 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; const double norm = 1.0/1000; const double modelFactorCriticalOvertopping = 4.4; const double factorFbMean = 5.5; @@ -404,7 +404,7 @@ var numericsSetting = new NumericsSetting(1, 9, 150, 0.15, 0.01, 0.01, 0.01, 2, 3000, 10000, 0.1, -6, 6, 25); hydraRingConfigurationService.AddHydraRingCalculationInput( - new DikeHeightCalculationInput(hydraulicBoundaryLocationId, norm, section, + new DikeHeightCalculationInput(hydraulicBoundaryLocationId, norm, sectionNormal, profilePoints, forelandPoints, breakWater, modelFactorCriticalOvertopping, factorFbMean, factorFbStandardDeviation, @@ -435,7 +435,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 101, 1);" + Environment.NewLine + @@ -520,7 +520,7 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; const double norm = 1.0/1000; const double dikeHeight = 4.4; const double modelFactorCriticalOvertopping = 5.5; @@ -554,7 +554,7 @@ var numericsSetting = new NumericsSetting(1, 9, 150, 0.15, 0.01, 0.01, 0.01, 2, 3000, 10000, 0.1, -6, 6, 25); hydraRingConfigurationService.AddHydraRingCalculationInput( - new OvertoppingRateCalculationInput(hydraulicBoundaryLocationId, norm, section, + new OvertoppingRateCalculationInput(hydraulicBoundaryLocationId, norm, sectionNormal, profilePoints, forelandPoints, breakWater, dikeHeight, modelFactorCriticalOvertopping, @@ -585,7 +585,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 101, 1);" + Environment.NewLine + @@ -670,7 +670,7 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) @@ -704,7 +704,8 @@ const double stormDurationMean = 27.27; const double stormDurationVariation = 28.28; - hydraRingConfigurationService.AddHydraRingCalculationInput(new StructuresOvertoppingCalculationInput(hydraulicBoundaryLocationId, section, + hydraRingConfigurationService.AddHydraRingCalculationInput(new StructuresOvertoppingCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, gravitationalAcceleration, modelFactorOvertoppingMean, modelFactorOvertoppingStandardDeviation, @@ -742,7 +743,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 110, 1);" + Environment.NewLine + @@ -1053,15 +1054,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresClosureFloodedCulvertCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresClosureFloodedCulvertCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1079,7 +1081,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 111, 1);" + Environment.NewLine + @@ -1174,15 +1176,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresClosureLowSillCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresClosureLowSillCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1201,7 +1204,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 111, 1);" + Environment.NewLine + @@ -1298,15 +1301,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresClosureVerticalWallCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresClosureVerticalWallCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1325,7 +1329,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 111, 1);" + Environment.NewLine + @@ -1423,15 +1427,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresStabilityPointFloodedCulvertLinearCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresStabilityPointFloodedCulvertLinearCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1458,7 +1463,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 112, 1);" + Environment.NewLine + @@ -1578,15 +1583,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1613,7 +1619,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 112, 1);" + Environment.NewLine + @@ -1733,15 +1739,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + var sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresStabilityPointLowSillLinearCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresStabilityPointLowSillLinearCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1768,7 +1775,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 112, 1);" + Environment.NewLine + @@ -1888,15 +1895,16 @@ var hydraRingConfigurationService = new HydraRingConfigurationService("34-1", HydraRingUncertaintiesType.All); const int hydraulicBoundaryLocationId = 700004; - var section = new HydraRingSection(1, 2.2, 3.3); + const double sectionNormal = 3.3; var forelandPoints = new List { new HydraRingForelandPoint(1.1, 2.2) }; var breakWater = new HydraRingBreakWater(1, 2.2); hydraRingConfigurationService.AddHydraRingCalculationInput( - new StructuresStabilityPointLowSillQuadraticCalculationInput(hydraulicBoundaryLocationId, section, + new StructuresStabilityPointLowSillQuadraticCalculationInput(hydraulicBoundaryLocationId, + sectionNormal, forelandPoints, breakWater, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.0, @@ -1923,7 +1931,7 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 2.2);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 700004, 700004, 100, 3.3, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionCalculationSchemes];" + Environment.NewLine + "INSERT INTO [SectionCalculationSchemes] VALUES (1, 112, 1);" + Environment.NewLine + Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -132,12 +132,8 @@ var calculationName = calculation.Name; - FailureMechanismSection failureMechanismSection = StructuresHelper.GetFailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - StructuresStabilityPointCalculationInput input = CreateStructuresStabilityPointCalculationInput(calculation, failureMechanism, - failureMechanismSection, hydraulicBoundaryDatabaseFilePath); string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); @@ -232,7 +228,6 @@ private StructuresStabilityPointCalculationInput CreateStructuresStabilityPointCalculationInput( StructuresCalculation calculation, StabilityPointStructuresFailureMechanism failureMechanism, - FailureMechanismSection failureMechanismSection, string hydraulicBoundaryDatabaseFilePath) { StructuresStabilityPointCalculationInput input; @@ -244,13 +239,11 @@ case LoadSchematizationType.Linear: input = CreateLowSillLinearCalculationInput( calculation, - failureMechanismSection, failureMechanism.GeneralInput); break; case LoadSchematizationType.Quadratic: input = CreateLowSillQuadraticCalculationInput( calculation, - failureMechanismSection, failureMechanism.GeneralInput); break; default: @@ -265,13 +258,11 @@ case LoadSchematizationType.Linear: input = CreateFloodedCulvertLinearCalculationInput( calculation, - failureMechanismSection, failureMechanism.GeneralInput); break; case LoadSchematizationType.Quadratic: input = CreateFloodedCulvertQuadraticCalculationInput( calculation, - failureMechanismSection, failureMechanism.GeneralInput); break; default: @@ -291,12 +282,11 @@ } private StructuresStabilityPointLowSillLinearCalculationInput CreateLowSillLinearCalculationInput(StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralStabilityPointStructuresInput generalInput) { var structuresStabilityPointLowSillLinearCalculationInput = new StructuresStabilityPointLowSillLinearCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), calculation.InputParameters.VolumicWeightWater, @@ -364,12 +354,11 @@ private StructuresStabilityPointLowSillQuadraticCalculationInput CreateLowSillQuadraticCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralStabilityPointStructuresInput generalInput) { return new StructuresStabilityPointLowSillQuadraticCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), calculation.InputParameters.VolumicWeightWater, @@ -435,12 +424,11 @@ private StructuresStabilityPointFloodedCulvertLinearCalculationInput CreateFloodedCulvertLinearCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralStabilityPointStructuresInput generalInput) { return new StructuresStabilityPointFloodedCulvertLinearCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), calculation.InputParameters.VolumicWeightWater, @@ -506,12 +494,11 @@ private StructuresStabilityPointFloodedCulvertQuadraticCalculationInput CreateFloodedCulvertQuadraticCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralStabilityPointStructuresInput generalInput) { return new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput( calculation.InputParameters.HydraulicBoundaryLocation.Id, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), calculation.InputParameters.StructureNormalOrientation), + calculation.InputParameters.StructureNormalOrientation, HydraRingInputParser.ParseForeshore(calculation.InputParameters), HydraRingInputParser.ParseBreakWater(calculation.InputParameters), calculation.InputParameters.VolumicWeightWater, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs =================================================================== diff -u -r5fcfd3d73f28585c211086ad413fc5d177ecd6b2 -r2a896243ca24205f8e98db1b61e8148d1d9b9062 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision 5fcfd3d73f28585c211086ad413fc5d177ecd6b2) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision 2a896243ca24205f8e98db1b61e8148d1d9b9062) @@ -876,11 +876,6 @@ { // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); @@ -901,8 +896,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -923,7 +916,7 @@ StabilityPointStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresStabilityPointLowSillLinearCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, input.VolumicWeightWater, @@ -1001,11 +994,6 @@ { // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); @@ -1026,8 +1014,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -1048,7 +1034,7 @@ StabilityPointStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresStabilityPointLowSillQuadraticCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, input.VolumicWeightWater, @@ -1126,11 +1112,6 @@ { // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); @@ -1151,8 +1132,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -1173,7 +1152,7 @@ StabilityPointStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresStabilityPointFloodedCulvertLinearCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, input.VolumicWeightWater, @@ -1251,11 +1230,6 @@ { // Setup var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.AddSection(new FailureMechanismSection("test section", new[] - { - new Point2D(0, 0), - new Point2D(1, 1) - })); var mockRepository = new MockRepository(); IAssessmentSection assessmentSectionStub = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); @@ -1276,7 +1250,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); using (new HydraRingCalculatorFactoryConfig()) { @@ -1298,7 +1271,7 @@ StabilityPointStructuresInput input = calculation.InputParameters; var expectedInput = new StructuresStabilityPointFloodedCulvertQuadraticCalculationInput( 1300001, - new HydraRingSection(1, failureMechanismSection.GetSectionLength(), input.StructureNormalOrientation), + input.StructureNormalOrientation, useForeshore ? input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)) : new HydraRingForelandPoint[0], useBreakWater ? new HydraRingBreakWater((int) input.BreakWater.Type, input.BreakWater.Height) : null, input.VolumicWeightWater,