// 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.Collections.Generic; using Ringtoets.HydraRing.Calculation.Data; using Ringtoets.HydraRing.Calculation.Data.Defaults; namespace Ringtoets.HydraRing.Calculation.Providers { /// /// Provider of . /// public class FailureMechanismDefaultsProvider { private readonly IDictionary failureMechanismDefaults; /// /// Creates a new instance of the class. /// /// /// The default settings should not be overruled and just reflect: /// - some supported ids within Hydra-Ring; /// - a WTI 2017 specific configuration of Hydra-Ring. /// public FailureMechanismDefaultsProvider() { failureMechanismDefaults = new Dictionary { { HydraRingFailureMechanismType.AssessmentLevel, new FailureMechanismDefaults(1, new[] { 1 }, 1, 9) }, { HydraRingFailureMechanismType.WaveHeight, new FailureMechanismDefaults(11, new[] { 11 }, 11, 9) }, { HydraRingFailureMechanismType.WavePeakPeriod, new FailureMechanismDefaults(11, new[] { 14 }, 14, 9) }, { HydraRingFailureMechanismType.WaveSpectralPeriod, new FailureMechanismDefaults(11, new[] { 16 }, 16, 9) }, { HydraRingFailureMechanismType.QVariant, new FailureMechanismDefaults(3, new[] { 5 }, 6, 10) }, { HydraRingFailureMechanismType.DikeHeight, GetOvertoppingDefaults() }, { HydraRingFailureMechanismType.DikesOvertopping, GetOvertoppingDefaults() }, { HydraRingFailureMechanismType.StructuresOvertopping, new FailureMechanismDefaults(110, new[] { 421, 422, 423 }, 4404, 9) }, { HydraRingFailureMechanismType.StructuresClosure, new FailureMechanismDefaults(111, new[] { 422, 424, 425, 426, 427 }, 4505, 9) }, { HydraRingFailureMechanismType.StructuresStructuralFailure, new FailureMechanismDefaults(112, new[] { 422, 424, 425, 430, 431, 432, 433, 434, 435 }, 4607, 9) }, { HydraRingFailureMechanismType.DunesBoundaryConditions, new FailureMechanismDefaults(1, new[] { 6 }, 8, 9) }, { HydraRingFailureMechanismType.OvertoppingRate, GetOvertoppingDefaults() } }; } /// /// Returns based on the provided . /// /// The to obtain the for. /// The corresponding to the provided . public FailureMechanismDefaults GetFailureMechanismDefaults(HydraRingFailureMechanismType failureMechanismType) { return failureMechanismDefaults[failureMechanismType]; } private static FailureMechanismDefaults GetOvertoppingDefaults() { return new FailureMechanismDefaults(101, new[] { 102, 103 }, 1017, 9); } } }