// 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; using Core.Common.Base.Data; using Ringtoets.Common.Data.Calculation; namespace Ringtoets.Piping.Data { /// /// Simple class containing the results of a Piping calculation. /// public class PipingOutput : Observable, ICalculationOutput, ICloneable { /// /// Creates a new instance of . /// /// The container of the properties for the /// . /// Thrown when the /// is null. public PipingOutput(ConstructionProperties constructionProperties) { if (constructionProperties == null) { throw new ArgumentNullException(nameof(constructionProperties)); } HeaveFactorOfSafety = constructionProperties.HeaveFactorOfSafety; HeaveZValue = constructionProperties.HeaveZValue; UpliftFactorOfSafety = constructionProperties.UpliftFactorOfSafety; UpliftZValue = constructionProperties.UpliftZValue; SellmeijerFactorOfSafety = constructionProperties.SellmeijerFactorOfSafety; SellmeijerZValue = constructionProperties.SellmeijerZValue; UpliftEffectiveStress = new RoundedDouble(2, constructionProperties.UpliftEffectiveStress); HeaveGradient = new RoundedDouble(2, constructionProperties.HeaveGradient); SellmeijerCreepCoefficient = new RoundedDouble(1, constructionProperties.SellmeijerCreepCoefficient); SellmeijerCriticalFall = new RoundedDouble(2, constructionProperties.SellmeijerCriticalFall); SellmeijerReducedFall = new RoundedDouble(2, constructionProperties.SellmeijerReducedFall); } /// /// Gets the calculated z-value for the uplift sub calculation. /// public double UpliftZValue { get; } /// /// Gets the factor of safety for the uplift sub calculation. /// public double UpliftFactorOfSafety { get; } /// /// Gets the calculated z-value for the heave sub calculation. /// public double HeaveZValue { get; } /// /// Gets the factor of safety for the heave sub calculation. /// public double HeaveFactorOfSafety { get; } /// /// Gets the calculated z-value for the Sellmeijer sub calculation. /// public double SellmeijerZValue { get; } /// /// Gets the factor of safety for the Sellmeijer sub calculation. /// public double SellmeijerFactorOfSafety { get; } /// /// Gets the effective stress that was calculated for the uplift sub calculation. /// public RoundedDouble UpliftEffectiveStress { get; } /// /// Gets the gradient that was calculated for the heave sub calculation. /// public RoundedDouble HeaveGradient { get; } /// /// Gets the creep coefficient that was calculated for the Sellmeijer sub calculation. /// public RoundedDouble SellmeijerCreepCoefficient { get; } /// /// Gets the critical fall that was calculated for the Sellmeijer sub calculation. /// public RoundedDouble SellmeijerCriticalFall { get; } /// /// Gets the reduced fall that was calculated for the Sellmeijer sub calculation. /// public RoundedDouble SellmeijerReducedFall { get; } public object Clone() { return MemberwiseClone(); } /// /// Container for properties for constructing a . /// public class ConstructionProperties { /// /// Creates a new instance of . /// public ConstructionProperties() { UpliftZValue = double.NaN; UpliftFactorOfSafety = double.NaN; HeaveZValue = double.NaN; HeaveFactorOfSafety = double.NaN; SellmeijerZValue = double.NaN; SellmeijerFactorOfSafety = double.NaN; UpliftEffectiveStress = double.NaN; HeaveGradient = double.NaN; SellmeijerCreepCoefficient = double.NaN; SellmeijerCriticalFall = double.NaN; SellmeijerReducedFall = double.NaN; } /// /// Sets the calculated z-value for the uplift sub calculation. /// public double UpliftZValue { internal get; set; } /// /// Sets the factor of safety for the uplift sub calculation. /// public double UpliftFactorOfSafety { internal get; set; } /// /// Sets the calculated z-value for the heave sub calculation. /// public double HeaveZValue { internal get; set; } /// /// Sets the factor of safety for the heave sub calculation. /// public double HeaveFactorOfSafety { internal get; set; } /// /// Sets the calculated z-value for the Sellmeijer sub calculation. /// public double SellmeijerZValue { internal get; set; } /// /// Sets the factor of safety for the Sellmeijer sub calculation. /// public double SellmeijerFactorOfSafety { internal get; set; } /// /// Gets the effective stress that was calculated for the uplift sub calculation. /// public double UpliftEffectiveStress { internal get; set; } /// /// Sets the gradient that was calculated for the heave sub calculation. /// public double HeaveGradient { internal get; set; } /// /// Sets the creep coefficient that was calculated for the Sellmeijer sub calculation. /// public double SellmeijerCreepCoefficient { internal get; set; } /// /// Sets the critical fall that was calculated for the Sellmeijer sub calculation. /// public double SellmeijerCriticalFall { internal get; set; } /// /// Sets the reduced fall that was calculated for the Sellmeijer sub calculation. /// public double SellmeijerReducedFall { internal get; set; } } } }