Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs
===================================================================
diff -u -ree1f859cae82b4321da205d5e1fd339b021f2d7d -r1b27e514649c647165943d41ddb6bd6be619df77
--- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision ee1f859cae82b4321da205d5e1fd339b021f2d7d)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationService.cs (.../DesignWaterLevelCalculationService.cs) (revision 1b27e514649c647165943d41ddb6bd6be619df77)
@@ -187,7 +187,8 @@
///
/// Performs a calculation for the design water level.
///
- /// 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)
{
- AssessmentLevelCalculationInput calculationInput = CreateInput(calculationWrapper, norm, hydraulicBoundaryDatabaseFilePath, usePreprocessor);
+ AssessmentLevelCalculationInput 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;
}
///
@@ -300,8 +302,7 @@
///
/// Creates the input for a design water level 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.
@@ -317,12 +318,12 @@
/// - Unable to read required data from database file.
///
///
- private static AssessmentLevelCalculationInput CreateInput(HydraulicBoundaryCalculationWrapper calculationWrapper,
+ private static AssessmentLevelCalculationInput CreateInput(long hydraulicBoundaryLocationId,
double norm,
string hydraulicBoundaryDatabaseFilePath,
bool usePreprocessor)
{
- var assessmentLevelCalculationInput = new AssessmentLevelCalculationInput(1, calculationWrapper.Id, norm);
+ var assessmentLevelCalculationInput = new AssessmentLevelCalculationInput(1, hydraulicBoundaryLocationId, norm);
HydraRingSettingsDatabaseHelper.AssignSettingsFromDatabase(assessmentLevelCalculationInput, hydraulicBoundaryDatabaseFilePath, usePreprocessor);