// 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 Ringtoets.Common.Data.Calculation;
namespace Ringtoets.MacroStabilityInwards.Data
{
///
/// Simple class containing the results of a macro stability inwards calculation.
///
public class MacroStabilityInwardsOutput : CloneableObservable, ICalculationOutput
{
///
/// Creates a new instance of .
///
/// The sliding curve result.
/// The slip plane Uplift Van result.
/// The container of the properties for the
/// .
/// Thrown when any parameter
/// is null.
public MacroStabilityInwardsOutput(MacroStabilityInwardsSlidingCurve slidingCurve,
MacroStabilityInwardsSlipPlaneUpliftVan slipPlane,
ConstructionProperties properties)
{
if (slidingCurve == null)
{
throw new ArgumentNullException(nameof(slidingCurve));
}
if (slipPlane == null)
{
throw new ArgumentNullException(nameof(slipPlane));
}
if (properties == null)
{
throw new ArgumentNullException(nameof(properties));
}
SlidingCurve = slidingCurve;
SlipPlane = slipPlane;
FactorOfStability = properties.FactorOfStability;
ZValue = properties.ZValue;
ForbiddenZonesXEntryMin = properties.ForbiddenZonesXEntryMin;
ForbiddenZonesXEntryMax = properties.ForbiddenZonesXEntryMax;
}
public override object Clone()
{
var clone = (MacroStabilityInwardsOutput) base.Clone();
clone.SlidingCurve = (MacroStabilityInwardsSlidingCurve) SlidingCurve.Clone();
clone.SlipPlane = (MacroStabilityInwardsSlipPlaneUpliftVan) SlipPlane.Clone();
return clone;
}
///
/// Container for properties for constructing a .
/// s
public class ConstructionProperties
{
///
/// Creates a new instance of .
///
public ConstructionProperties()
{
FactorOfStability = double.NaN;
ZValue = double.NaN;
ForbiddenZonesXEntryMin = double.NaN;
ForbiddenZonesXEntryMax = double.NaN;
}
///
/// Gets or sets the factor of stability of the Uplift Van calculation.
///
public double FactorOfStability { internal get; set; }
///
/// Gets or sets the z value.
///
public double ZValue { internal get; set; }
///
/// Gets or sets the forbidden zones x entry min.
///
public double ForbiddenZonesXEntryMin { internal get; set; }
///
/// Gets or sets the forbidden zones x entry max.
///
public double ForbiddenZonesXEntryMax { internal get; set; }
}
#region Properties
///
/// Gets the sliding curve.
///
public MacroStabilityInwardsSlidingCurve SlidingCurve { get; private set; }
///
/// Gets the slip plane.
///
public MacroStabilityInwardsSlipPlaneUpliftVan SlipPlane { get; private set; }
///
/// Gets the factor of stability of the Uplift Van calculation.
///
public double FactorOfStability { get; }
///
/// Gets the z value.
///
public double ZValue { get; }
///
/// Gets the forbidden zones x entry min.
///
public double ForbiddenZonesXEntryMin { get; }
///
/// Gets the forbidden zones x entry max.
///
public double ForbiddenZonesXEntryMax { get; }
#endregion
}
}