// Copyright (C) Stichting Deltares 2016. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// All names, logos, and references to "Deltares" are registered trademarks of
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
using System;
using Core.Common.Base.Data;
using Ringtoets.Revetment.Data;
namespace Ringtoets.Revetment.IO
{
///
/// Class for storing the wave conditions data to be exported.
///
public class ExportableWaveConditions
{
///
/// Creates a new instance of .
///
/// The name of the parent calculation.
/// The input parameters of the parent calculation.
/// The output parameters of the parent calculation.
/// The type of dike cover.
/// Thrown when , , or
/// is null.
/// Thrown when
/// is null for .
public ExportableWaveConditions(string name, WaveConditionsInput waveConditionsInput, WaveConditionsOutput waveConditionsOutput, CoverType coverType)
{
if (name == null)
{
throw new ArgumentNullException(nameof(name));
}
if (waveConditionsInput == null)
{
throw new ArgumentNullException(nameof(waveConditionsInput));
}
if (waveConditionsOutput == null)
{
throw new ArgumentNullException(nameof(waveConditionsOutput));
}
if (waveConditionsInput.HydraulicBoundaryLocation == null)
{
throw new ArgumentException(@"HydraulicBoundaryLocation is null.", nameof(waveConditionsInput));
}
CalculationName = name;
LocationName = waveConditionsInput.HydraulicBoundaryLocation.Name;
LocationXCoordinate = waveConditionsInput.HydraulicBoundaryLocation.Location.X;
LocationYCoordinate = waveConditionsInput.HydraulicBoundaryLocation.Location.Y;
if (waveConditionsInput.ForeshoreProfile != null)
{
ForeshoreName = waveConditionsInput.ForeshoreProfile.Name;
}
UseForeshore = waveConditionsInput.UseForeshore;
UseBreakWater = waveConditionsInput.UseBreakWater;
CoverType = coverType;
WaterLevel = waveConditionsOutput.WaterLevel;
WaveHeight = waveConditionsOutput.WaveHeight;
WavePeriod = waveConditionsOutput.WavePeakPeriod;
WaveAngle = waveConditionsOutput.WaveAngle;
WaveDirection = waveConditionsOutput.WaveDirection;
}
///
/// Gets the wave angle with respect to the dike normal.
///
public RoundedDouble WaveAngle { get; private set; }
///
/// Gets the wave direction with respect to North.
///
public RoundedDouble WaveDirection { get; private set; }
///
/// Gets the wave period.
///
public RoundedDouble WavePeriod { get; private set; }
///
/// Gets the wave height.
///
public RoundedDouble WaveHeight { get; private set; }
///
/// Gets the water level.
///
public RoundedDouble WaterLevel { get; private set; }
///
/// Gets the type of dike cover.
///
public CoverType CoverType { get; private set; }
///
/// Gets the name of the foreshore.
///
public string ForeshoreName { get; private set; }
///
/// Gets a value indicating whether a foreshore profile was used in the calculation.
///
public bool UseForeshore { get; private set; }
///
/// Gets a value indicating whether a break water was used in the calculation.
///
public bool UseBreakWater { get; private set; }
///
/// Gets the y coordinate of the location.
///
public double LocationYCoordinate { get; private set; }
///
/// Gets the x coordinate of the location.
///
public double LocationXCoordinate { get; private set; }
///
/// Gets the name of the location.
///
public string LocationName { get; private set; }
///
/// Gets the name of the calculation.
///
public string CalculationName { get; private set; }
}
}