Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs =================================================================== diff -u -rd641f7a03b05f5d7e48f9adeffabafdcb48e1c14 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision d641f7a03b05f5d7e48f9adeffabafdcb48e1c14) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Service/ClosingStructuresCalculationService.cs (.../ClosingStructuresCalculationService.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -27,15 +27,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; @@ -75,12 +72,8 @@ { var calculationName = calculation.Name; - FailureMechanismSection failureMechanismSection = StructuresHelper.FailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - StructuresClosureCalculationInput input = CreateStructuresClosureCalculationInput(calculation, failureMechanism, - failureMechanismSection, hydraulicBoundaryDatabaseFilePath); string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); @@ -148,10 +141,7 @@ /// public void Cancel() { - if (calculator != null) - { - calculator.Cancel(); - } + calculator?.Cancel(); canceled = true; } @@ -176,20 +166,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, hydraulicBoundaryDatabaseFilePath); + input = CreateClosureVerticalWallCalculationInput(calculation, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); break; case ClosingStructureInflowModelType.LowSill: - input = CreateLowSillCalculationInput(calculation, failureMechanismSection, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); + input = CreateLowSillCalculationInput(calculation, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); break; case ClosingStructureInflowModelType.FloodedCulvert: - input = CreateFloodedCulvertCalculationInput(calculation, failureMechanismSection, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); + input = CreateFloodedCulvertCalculationInput(calculation, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); break; default: throw new InvalidEnumArgumentException("calculation", @@ -201,13 +190,12 @@ private static StructuresClosureVerticalWallCalculationInput CreateClosureVerticalWallCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var structuresClosureVerticalWallCalculationInput = 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, @@ -238,13 +226,12 @@ private static StructuresClosureLowSillCalculationInput CreateLowSillCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var structuresClosureLowSillCalculationInput = 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, @@ -274,13 +261,12 @@ private static StructuresClosureFloodedCulvertCalculationInput CreateFloodedCulvertCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, GeneralClosingStructuresInput generalInput, string hydraulicBoundaryDatabaseFilePath) { var structuresClosureFloodedCulvertCalculationInput = 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 -rd641f7a03b05f5d7e48f9adeffabafdcb48e1c14 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision d641f7a03b05f5d7e48f9adeffabafdcb48e1c14) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -517,12 +517,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); @@ -541,8 +536,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -563,7 +556,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, @@ -602,11 +595,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, @@ -627,8 +615,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -649,7 +635,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, @@ -687,11 +673,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, @@ -712,8 +693,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = closingStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresClosureCalculator; @@ -734,7 +713,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 -rdee01f6d6c15af0cc124816bfe99c7658af8995d -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision dee01f6d6c15af0cc124816bfe99c7658af8995d) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -55,27 +55,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 FailureMechanismSectionForCalculation(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 that have the /// assigned, or should have the assigned. /// Index: Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs (.../StructuresHelperTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Ringtoets/Common/test/Ringtoets.Common.Utils.Test/StructuresHelperTest.cs (.../StructuresHelperTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -103,96 +103,6 @@ } [Test] - public void FailureMechanismSectionForCalculation_SectionsNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => StructuresHelper.FailureMechanismSectionForCalculation(null, calculationInSectionA); - - // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("sections", paramName); - } - - [Test] - public void FailureMechanismSectionForCalculation_SectionElementsNull_ThrowsArgumentException() - { - // Call - TestDelegate test = () => StructuresHelper.FailureMechanismSectionForCalculation( - new FailureMechanismSection[] - { - null, - null - }, - calculationInSectionA); - - // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("sections", exception.ParamName); - } - - [Test] - public void FailureMechanismSectionForCalculation_CalculationNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => StructuresHelper.FailureMechanismSectionForCalculation(oneSection, null); - - // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("calculation", paramName); - } - - [Test] - public void FailureMechanismSectionForCalculation_ValidSectionWithoutCalculationStructureSet_ReturnsNull() - { - // Setup - var calculation = new StructuresCalculation(); - - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.FailureMechanismSectionForCalculation(oneSection, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_EmptySectionWithoutCalculationStructureSet_ReturnsNull() - { - // Setup - var emptySections = new FailureMechanismSection[0]; - var calculation = new StructuresCalculation(); - - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.FailureMechanismSectionForCalculation(emptySections, calculation); - - // Assert - Assert.IsNull(failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_FirstSectionContainsCalculation_FailureMechanismSectionOfFirstSection() - { - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.FailureMechanismSectionForCalculation(twoSections, calculationInSectionA); - - // Assert - Assert.AreSame(twoSections[0], failureMechanismSection); - } - - [Test] - public void FailureMechanismSectionForCalculation_SecondSectionContainsCalculation_FailureMechanismSectionOfSecondSection() - { - // Call - FailureMechanismSection failureMechanismSection = - StructuresHelper.FailureMechanismSectionForCalculation(twoSections, calculationInSectionB); - - // Assert - Assert.AreSame(twoSections[1], failureMechanismSection); - } - - [Test] public void Update_SectionResultsNull_ThrowsArgumentNullException() { // Call Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs =================================================================== diff -u -r533cc8038f03f3acb30f4db787a3d583f93f7008 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -24,21 +24,17 @@ using System.Linq; 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; -using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.HeightStructures.Service @@ -77,10 +73,7 @@ /// public void Cancel() { - if (calculator != null) - { - calculator.Cancel(); - } + calculator?.Cancel(); canceled = true; } @@ -101,12 +94,9 @@ string hydraulicBoundaryDatabaseFilePath) { var calculationName = calculation.Name; + + StructuresOvertoppingCalculationInput input = CreateInput(calculation, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); - FailureMechanismSection failureMechanismSection = StructuresHelper.FailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - - StructuresOvertoppingCalculationInput input = CreateInput(calculation, failureMechanismSection, failureMechanism.GeneralInput, hydraulicBoundaryDatabaseFilePath); - string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); calculator = HydraRingCalculatorFactory.Instance.CreateStructuresOvertoppingCalculator(hlcdDirectory, assessmentSection.Id); @@ -168,13 +158,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 -r8905298103eb01ce13dd5c1a2f267f879d4fda3e -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision 8905298103eb01ce13dd5c1a2f267f879d4fda3e) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -627,11 +627,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); @@ -650,8 +645,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = heightStructuresFailureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var testStructuresOvertoppingCalculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresOvertoppingCalculator; @@ -672,7 +665,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/Structures/StructuresClosureCalculationInput.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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/Structures/StructuresClosureCalculationInputTest.cs =================================================================== diff -u -r9a46b1398c3a83b8f5c06254ccb9808f33eb2531 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- 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 df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -r644164b33ae8789eab8d1c8ffd84aafe45b19d44 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Integration/HydraRingConfigurationServiceIntegrationTest.cs (.../HydraRingConfigurationServiceIntegrationTest.cs) (revision 644164b33ae8789eab8d1c8ffd84aafe45b19d44) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Integration/HydraRingConfigurationServiceIntegrationTest.cs (.../HydraRingConfigurationServiceIntegrationTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -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 -r533cc8038f03f3acb30f4db787a3d583f93f7008 -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision 533cc8038f03f3acb30f4db787a3d583f93f7008) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Service/StabilityPointStructuresCalculationService.cs (.../StabilityPointStructuresCalculationService.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -96,12 +96,8 @@ { var calculationName = calculation.Name; - FailureMechanismSection failureMechanismSection = StructuresHelper.FailureMechanismSectionForCalculation(failureMechanism.Sections, - calculation); - StructuresStabilityPointCalculationInput input = CreateStructuresStabilityPointCalculationInput(calculation, failureMechanism, - failureMechanismSection, hydraulicBoundaryDatabaseFilePath); string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); @@ -167,18 +163,13 @@ /// public void Cancel() { - if (calculator != null) - { - calculator.Cancel(); - } - + calculator?.Cancel(); canceled = true; } private StructuresStabilityPointCalculationInput CreateStructuresStabilityPointCalculationInput( StructuresCalculation calculation, StabilityPointStructuresFailureMechanism failureMechanism, - FailureMechanismSection failureMechanismSection, string hydraulicBoundaryDatabaseFilePath) { StructuresStabilityPointCalculationInput input; @@ -190,16 +181,12 @@ case LoadSchematizationType.Linear: input = CreateLowSillLinearCalculationInput( calculation, - failureMechanismSection, - failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath); + failureMechanism.GeneralInput); break; case LoadSchematizationType.Quadratic: input = CreateLowSillQuadraticCalculationInput( calculation, - failureMechanismSection, - failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath); + failureMechanism.GeneralInput); break; default: throw new InvalidEnumArgumentException("calculation", @@ -213,16 +200,12 @@ case LoadSchematizationType.Linear: input = CreateFloodedCulvertLinearCalculationInput( calculation, - failureMechanismSection, - failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath); + failureMechanism.GeneralInput); break; case LoadSchematizationType.Quadratic: input = CreateFloodedCulvertQuadraticCalculationInput( calculation, - failureMechanismSection, - failureMechanism.GeneralInput, - hydraulicBoundaryDatabaseFilePath); + failureMechanism.GeneralInput); break; default: throw new InvalidEnumArgumentException("calculation", @@ -236,17 +219,17 @@ typeof(StabilityPointStructureInflowModelType)); } + HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(input, hydraulicBoundaryDatabaseFilePath); + return input; } private StructuresStabilityPointLowSillLinearCalculationInput CreateLowSillLinearCalculationInput(StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, - GeneralStabilityPointStructuresInput generalInput, - string hydraulicBoundaryDatabaseFilePath) + 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, @@ -309,20 +292,16 @@ calculation.InputParameters.WidthFlowApertures.Mean, calculation.InputParameters.WidthFlowApertures.CoefficientOfVariation); - HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(structuresStabilityPointLowSillLinearCalculationInput, hydraulicBoundaryDatabaseFilePath); - return structuresStabilityPointLowSillLinearCalculationInput; } private StructuresStabilityPointLowSillQuadraticCalculationInput CreateLowSillQuadraticCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, - GeneralStabilityPointStructuresInput generalInput, - string hydraulicBoundaryDatabaseFilePath) + GeneralStabilityPointStructuresInput generalInput) { var structuresStabilityPointLowSillQuadraticCalculationInput = 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, @@ -385,20 +364,16 @@ calculation.InputParameters.WidthFlowApertures.Mean, calculation.InputParameters.WidthFlowApertures.CoefficientOfVariation); - HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(structuresStabilityPointLowSillQuadraticCalculationInput, hydraulicBoundaryDatabaseFilePath); - return structuresStabilityPointLowSillQuadraticCalculationInput; } private StructuresStabilityPointFloodedCulvertLinearCalculationInput CreateFloodedCulvertLinearCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, - GeneralStabilityPointStructuresInput generalInput, - string hydraulicBoundaryDatabaseFilePath) + GeneralStabilityPointStructuresInput generalInput) { var structuresStabilityPointFloodedCulvertLinearCalculationInput = 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, @@ -461,20 +436,16 @@ calculation.InputParameters.StabilityLinearLoadModel.Mean, calculation.InputParameters.StabilityLinearLoadModel.CoefficientOfVariation); - HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(structuresStabilityPointFloodedCulvertLinearCalculationInput, hydraulicBoundaryDatabaseFilePath); - return structuresStabilityPointFloodedCulvertLinearCalculationInput; } private StructuresStabilityPointFloodedCulvertQuadraticCalculationInput CreateFloodedCulvertQuadraticCalculationInput( StructuresCalculation calculation, - FailureMechanismSection failureMechanismSection, - GeneralStabilityPointStructuresInput generalInput, - string hydraulicBoundaryDatabaseFilePath) + GeneralStabilityPointStructuresInput generalInput) { var structuresStabilityPointFloodedCulvertQuadraticCalculationInput = 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, @@ -537,8 +508,6 @@ calculation.InputParameters.StabilityQuadraticLoadModel.Mean, calculation.InputParameters.StabilityQuadraticLoadModel.CoefficientOfVariation); - HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(structuresStabilityPointFloodedCulvertQuadraticCalculationInput, hydraulicBoundaryDatabaseFilePath); - return structuresStabilityPointFloodedCulvertQuadraticCalculationInput; } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs =================================================================== diff -u -r8905298103eb01ce13dd5c1a2f267f879d4fda3e -rdf9261fbb60c129167c1d6a2ca9aed6dc0885f07 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision 8905298103eb01ce13dd5c1a2f267f879d4fda3e) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision df9261fbb60c129167c1d6a2ca9aed6dc0885f07) @@ -783,11 +783,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); @@ -808,8 +803,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -830,7 +823,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, @@ -908,11 +901,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); @@ -933,8 +921,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -955,7 +941,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, @@ -1033,11 +1019,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); @@ -1058,8 +1039,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); - using (new HydraRingCalculatorFactoryConfig()) { var calculator = ((TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance).StructuresStabilityPointCalculator; @@ -1080,7 +1059,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, @@ -1158,11 +1137,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); @@ -1183,7 +1157,6 @@ calculation.InputParameters.ForeshoreProfile = new TestForeshoreProfile(useBreakWater); } - FailureMechanismSection failureMechanismSection = failureMechanism.Sections.First(); using (new HydraRingCalculatorFactoryConfig()) { @@ -1205,7 +1178,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,