Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs
===================================================================
diff -u -ree1f859cae82b4321da205d5e1fd339b021f2d7d -r1ba24804e524f95f26c795226aa7d9a4c33a2424
--- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision ee1f859cae82b4321da205d5e1fd339b021f2d7d)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 1ba24804e524f95f26c795226aa7d9a4c33a2424)
@@ -187,7 +187,8 @@
///
/// Performs a calculation for the wave height.
///
- /// The calculation wrapper to use.
+ /// The hydraulic boundary location the belongs to.
+ /// The hydraulic boundary location calculation to perform.
/// The path which points to the hydraulic boundary database file.
/// Indicator whether to use the preprocessor in the calculation.
/// The norm of the assessment section.
@@ -200,13 +201,14 @@
/// - Unable to read required data from database file.
///
/// Thrown when an error occurs while performing the calculation.
- private void PerformCalculation(HydraulicBoundaryCalculationWrapper calculationWrapper,
+ private void PerformCalculation(HydraulicBoundaryLocation hydraulicBoundaryLocation,
+ HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation,
string hydraulicBoundaryDatabaseFilePath,
bool usePreprocessor,
double norm,
ICalculationMessageProvider messageProvider)
{
- WaveHeightCalculationInput calculationInput = CreateInput(calculationWrapper, norm, hydraulicBoundaryDatabaseFilePath, usePreprocessor);
+ WaveHeightCalculationInput calculationInput = CreateInput(hydraulicBoundaryLocation.Id, norm, hydraulicBoundaryDatabaseFilePath, usePreprocessor);
calculator.Calculate(calculationInput);
@@ -218,21 +220,21 @@
GeneralResult generalResult = null;
try
{
- generalResult = calculationWrapper.CalculateIllustrationPoints
+ generalResult = hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated
? GetGeneralResult(calculator.IllustrationPointsResult)
: null;
}
catch (ArgumentException e)
{
log.Warn(string.Format(Resources.CalculationService_Error_in_reading_illustrationPoints_for_CalculationName_0_with_ErrorMessage_1,
- calculationWrapper.Name,
+ hydraulicBoundaryLocation.Name,
e.Message));
}
HydraulicBoundaryLocationOutput hydraulicBoundaryLocationOutput = CreateHydraulicBoundaryLocationOutput(
- messageProvider, calculationWrapper.Name, calculationInput.Beta, norm, calculator.Converged, generalResult);
+ messageProvider, hydraulicBoundaryLocation.Name, calculationInput.Beta, norm, calculator.Converged, generalResult);
- calculationWrapper.Output = hydraulicBoundaryLocationOutput;
+ hydraulicBoundaryLocationCalculation.Output = hydraulicBoundaryLocationOutput;
}
///
@@ -299,8 +301,7 @@
///
/// Creates the input for an wave height calculation.
///
- /// The
- /// to create the input from.
+ /// The id of the hydraulic boundary location.
/// The norm to use during the calculation.
/// The file path to the hydraulic
/// boundary database.
@@ -316,12 +317,12 @@
/// - Unable to read required data from database file.
///
///
- private static WaveHeightCalculationInput CreateInput(HydraulicBoundaryCalculationWrapper calculationWrapper,
+ private static WaveHeightCalculationInput CreateInput(long hydraulicBoundaryLocationId,
double norm,
string hydraulicBoundaryDatabaseFilePath,
bool usePreprocessor)
{
- var waveHeightCalculationInput = new WaveHeightCalculationInput(1, calculationWrapper.Id, norm);
+ var waveHeightCalculationInput = new WaveHeightCalculationInput(1, hydraulicBoundaryLocationId, norm);
HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(waveHeightCalculationInput, hydraulicBoundaryDatabaseFilePath, usePreprocessor);