/// <summary>
        /// Create the output of the calculation.
        /// </summary>
        /// <param name="duneLocationName">The name of the location.</param>
        /// <param name="targetReliability">The target reliability for the calculation.</param>
        /// <param name="targetProbability">The target probability for the calculation.</param>
        /// <param name="messageProvider">The object which is used to build log messages.</param>
        /// <returns>A <see cref="DuneLocationCalculationOutput"/>.</returns>
        /// <exception cref="ArgumentOutOfRangeException">Thrown when <paramref name="targetProbability"/>
        /// or the calculated probability falls outside the [0.0, 1.0] range and is not <see cref="double.NaN"/>.</exception>
        private DuneLocationCalculationOutput CreateDuneLocationCalculationOutput(string duneLocationName,
                                                                                  double targetReliability,
                                                                                  double targetProbability,
                                                                                  ICalculationMessageProvider messageProvider)
        {
            double reliability = calculator.ReliabilityIndex;
            double probability = StatisticsConverter.ReliabilityToProbability(reliability);

            CalculationConvergence converged = RiskeerCommonDataCalculationService.GetCalculationConvergence(calculator.Converged);

            if (converged != CalculationConvergence.CalculatedConverged)
            {
                log.WarnFormat(messageProvider.GetCalculatedNotConvergedMessage(duneLocationName));
            }

            return(new DuneLocationCalculationOutput(converged,
                                                     new DuneLocationCalculationOutput.ConstructionProperties
            {
                WaterLevel = calculator.WaterLevel,
                WaveHeight = calculator.WaveHeight,
                WavePeriod = calculator.WavePeriod,
                TargetProbability = targetProbability,
                TargetReliability = targetReliability,
                CalculatedProbability = probability,
                CalculatedReliability = reliability
            }));
        }
        /// <summary>
        /// Creates the output of the calculation.
        /// </summary>
        /// <param name="messageProvider">The object which is used to build log messages.</param>
        /// <param name="hydraulicBoundaryLocationName">The name of the hydraulic boundary location.</param>
        /// <param name="targetReliability">The target reliability for the calculation.</param>
        /// <param name="targetProbability">The target probability for the calculation.</param>
        /// <param name="calculatorConverged">The value indicating whether the calculation converged.</param>
        /// <param name="generalResult">The general result with illustration points.</param>
        /// <returns>A <see cref="HydraulicBoundaryLocationCalculationOutput"/>.</returns>
        /// <exception cref="ArgumentOutOfRangeException">Thrown when <paramref name="targetProbability"/>
        /// or the calculated probability falls outside the [0.0, 1.0] range and is not <see cref="double.NaN"/>.</exception>
        private HydraulicBoundaryLocationCalculationOutput CreateOutput(ICalculationMessageProvider messageProvider,
                                                                        string hydraulicBoundaryLocationName,
                                                                        double targetReliability,
                                                                        double targetProbability,
                                                                        bool?calculatorConverged,
                                                                        GeneralResult <TopLevelSubMechanismIllustrationPoint> generalResult)
        {
            double waveHeight  = calculator.WaveHeight;
            double reliability = calculator.ReliabilityIndex;
            double probability = StatisticsConverter.ReliabilityToProbability(reliability);

            CalculationConvergence converged = RiskeerCommonDataCalculationService.GetCalculationConvergence(calculatorConverged);

            if (converged != CalculationConvergence.CalculatedConverged)
            {
                log.Warn(messageProvider.GetCalculatedNotConvergedMessage(hydraulicBoundaryLocationName));
            }

            return(new HydraulicBoundaryLocationCalculationOutput(waveHeight, targetProbability,
                                                                  targetReliability, probability, reliability,
                                                                  converged, generalResult));
        }