// 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 System.Collections.Generic; using System.Linq; using Core.Common.Base; using Core.Common.Base.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probabilistics; using Ringtoets.HydraRing.Data; namespace Ringtoets.GrassCoverErosionInwards.Data { /// /// Class that holds all grass cover erosion inwards calculation specific input parameters. /// public class GrassCoverErosionInwardsInput : Observable, ICalculationInput { private readonly LogNormalDistribution criticalFlowRate; private RoundedDouble orientation; private RoundedDouble dikeHeight; /// /// Creates a new instance of . /// public GrassCoverErosionInwardsInput() { orientation = new RoundedDouble(2); dikeHeight = new RoundedDouble(2); BreakWater = new BreakWater(BreakWaterType.Caisson, 0); criticalFlowRate = new LogNormalDistribution(4) { Mean = (RoundedDouble) 0.004, StandardDeviation = (RoundedDouble) 0.0006 }; DikeGeometry = Enumerable.Empty(); ForeshoreGeometry = Enumerable.Empty(); } /// /// Gets the dike's geometry (without foreshore geometry). /// public IEnumerable DikeGeometry { get; private set; } /// /// Gets the dike's foreshore geometry. /// public IEnumerable ForeshoreGeometry { get; private set; } /// /// Gets or sets the dike's orientation /// public RoundedDouble Orientation { get { return orientation; } set { orientation = value.ToPrecision(orientation.NumberOfDecimalPlaces); } } /// /// Gets or sets the dike's critical flow rate. /// public LogNormalDistribution CriticalFlowRate { get { return criticalFlowRate; } set { criticalFlowRate.Mean = value.Mean; criticalFlowRate.StandardDeviation = value.StandardDeviation; } } /// /// Gets or sets if needs to be taken into account. /// /// Value of must not be reset when is set to false. public bool UseForeshore { get; set; } /// /// Gets or sets the dike height. /// public RoundedDouble DikeHeight { get { return dikeHeight; } set { dikeHeight = value.ToPrecision(dikeHeight.NumberOfDecimalPlaces); } } /// /// Gets or sets if needs to be taken into account. /// public bool UseBreakWater { get; set; } /// /// Gets the . /// public BreakWater BreakWater { get; private set; } /// /// Gets or set the hydraulic boundary location from which to use the assessment level. /// public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; } /// /// Sets the grass cover erosion inwards dike geometry. /// /// The grass cover erosion inwards geometry points. public void SetDikeGeometry(IEnumerable profileSections) { if (profileSections == null) { throw new ArgumentNullException("profileSections"); } DikeGeometry = profileSections; } /// /// Sets the grass cover erosion inwards foreshore geometry. /// /// The grass cover erosion inwards geometry points. public void SetForeshoreGeometry(IEnumerable profileSections) { if (profileSections == null) { throw new ArgumentNullException("profileSections"); } ForeshoreGeometry = profileSections; } } }