// 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 Core.Common.Base.Geometry; using Ringtoets.Common.Data; using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Data.Placeholders; using Ringtoets.Integration.Data.Properties; using Ringtoets.Piping.Data; namespace Ringtoets.Integration.Data { /// /// The dike-based section to be assessed by the user for safety in regards of various failure mechanisms. /// public sealed class DikeAssessmentSection : AssessmentSectionBase { /// /// Initializes a new instance of the class. /// public DikeAssessmentSection() { Name = Resources.DikeAssessmentSection_DisplayName; PipingFailureMechanism = new PipingFailureMechanism { Contribution = 24 }; GrassErosionFailureMechanism = new FailureMechanismPlaceholder(Resources.GrassErosionFailureMechanism_DisplayName) { Contribution = 24 }; MacrostabilityInwardFailureMechanism = new FailureMechanismPlaceholder(Resources.MacrostabilityInwardFailureMechanism_DisplayName) { Contribution = 4 }; OvertoppingFailureMechanism = new FailureMechanismPlaceholder(Resources.OvertoppingFailureMechanism_DisplayName) { Contribution = 2 }; ClosingFailureMechanism = new FailureMechanismPlaceholder(Resources.ClosingFailureMechanism_DisplayName) { Contribution = 4 }; FailingOfConstructionFailureMechanism = new FailureMechanismPlaceholder(Resources.FailingOfConstructionFailureMechanism_DisplayName) { Contribution = 2 }; StoneRevetmentFailureMechanism = new FailureMechanismPlaceholder(Resources.StoneRevetmentFailureMechanism_DisplayName) { Contribution = 4 }; AsphaltRevetmentFailureMechanism = new FailureMechanismPlaceholder(Resources.AsphaltRevetmentFailureMechanism_DisplayName) { Contribution = 3 }; GrassRevetmentFailureMechanism = new FailureMechanismPlaceholder(Resources.GrassRevetmentFailureMechanism_DisplayName) { Contribution = 3 }; FailureMechanismContribution = new FailureMechanismContribution(GetFailureMechanisms(), 30, 30000); } public override ReferenceLine ReferenceLine { get { return base.ReferenceLine; } set { PipingFailureMechanism.GeneralInput.SectionLength = Math2D.Length(value.Points); base.ReferenceLine = value; } } /// /// Gets the "Piping" failure mechanism. /// public PipingFailureMechanism PipingFailureMechanism { get; private set; } /// /// Gets the "Graserosie kruin en binnentalud" failure mechanism. /// public FailureMechanismPlaceholder GrassErosionFailureMechanism { get; private set; } /// /// Gets the "Macrostabiliteit binnenwaarts" failure mechanism. /// public FailureMechanismPlaceholder MacrostabilityInwardFailureMechanism { get; private set; } /// /// Gets the "Overslag en overloop" failure mechanism. /// public FailureMechanismPlaceholder OvertoppingFailureMechanism { get; private set; } /// /// Gets the "Niet sluiten" failure mechanism. /// public FailureMechanismPlaceholder ClosingFailureMechanism { get; private set; } /// /// Gets the "Constructief falen" failure mechanism. /// public FailureMechanismPlaceholder FailingOfConstructionFailureMechanism { get; private set; } /// /// Gets the "Steenbekledingen" failure mechanism. /// public FailureMechanismPlaceholder StoneRevetmentFailureMechanism { get; private set; } /// /// Gets the "Asfaltbekledingen" failure mechanism. /// public FailureMechanismPlaceholder AsphaltRevetmentFailureMechanism { get; private set; } /// /// Gets the "Grasbekledingen" failure mechanism. /// public FailureMechanismPlaceholder GrassRevetmentFailureMechanism { get; private set; } public override IEnumerable GetFailureMechanisms() { yield return PipingFailureMechanism; yield return GrassErosionFailureMechanism; yield return MacrostabilityInwardFailureMechanism; yield return OvertoppingFailureMechanism; yield return ClosingFailureMechanism; yield return FailingOfConstructionFailureMechanism; yield return StoneRevetmentFailureMechanism; yield return AsphaltRevetmentFailureMechanism; yield return GrassRevetmentFailureMechanism; } } }