private static IEnumerable <string> ValidateCalculationInMultipleSections(ProbabilisticPipingCalculation calculation, PipingFailureMechanism failureMechanism) { int numberOfSections = failureMechanism .Sections .Count(section => calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(Math2D.ConvertPointsToLineSegments(section.Points))); if (numberOfSections > 1) { yield return(Resources.ProbabilisticPipingCalculationService_ValidateCalculationInMultipleSections_Cannot_determine_section_for_calculation); } }
protected override void PerformCalculation() { calculation.ClearOutput(); FailureMechanismSection section = failureMechanism.Sections.Single( s => calculation.IsSurfaceLineIntersectionWithReferenceLineInSection( Math2D.ConvertPointsToLineSegments(s.Points))); service.Calculate(calculation, failureMechanism.GeneralInput, HydraulicBoundaryCalculationSettingsFactory.CreateSettings(assessmentSection.HydraulicBoundaryDatabase), section.Length); }