// Copyright (C) Stichting Deltares 2017. 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.WaveImpactAsphaltCover.Data.Properties;
namespace Ringtoets.WaveImpactAsphaltCover.Data
{
///
/// The general input parameters that apply to each wave impact asphalt cover calculation.
///
public class GeneralWaveImpactAsphaltCoverInput
{
private RoundedDouble deltaL;
///
/// Initializes a new instance of the class.
///
public GeneralWaveImpactAsphaltCoverInput()
{
deltaL = new RoundedDouble(2, 1000.0);
SectionLength = double.NaN;
}
///
/// Gets or sets the 'ΔL' parameter used to determine the length effect parameter.
///
/// Thrown when the
/// is or is not larger than 0.
public RoundedDouble DeltaL
{
get
{
return deltaL;
}
set
{
RoundedDouble newValue = value.ToPrecision(deltaL.NumberOfDecimalPlaces);
if (newValue <= 0.0 || double.IsNaN(newValue))
{
throw new ArgumentOutOfRangeException(nameof(value), Resources.DeltaL_Value_should_be_larger_than_zero);
}
deltaL = newValue;
}
}
///
/// Gets or sets the length of the assessment section.
///
public double SectionLength { get; set; }
///
/// Gets or sets the 'N' parameter used to factor in the 'length effect'.
///
public double N
{
get
{
return SectionLength / deltaL;
}
}
}
}