// 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.
namespace Ringtoets.MacroStabilityInwards.Primitives
{
///
/// This class represents a preconsolidation stress definition that was imported
/// from D-Soil model.
///
public class MacroStabilityInwardsPreconsolidationStress
{
///
/// Creates a new instance of .
///
/// The x coordinate of the preconsolidation stress location.
/// The z coordinate of the preconsolidation stress location.
/// The mean of the stochastic distribution
/// for the preconsolidation stress.
/// The coefficient of
/// variation of the stochastic distribution for the preconsolidation stress.
/// The shift of the stochastic distribution
/// for the preconsolidation stress
public MacroStabilityInwardsPreconsolidationStress(double xCoordinate,
double zCoordinate,
double preconsolidationStressMean,
double preconsolidationStressCoefficientOfVariation,
double preconsolidationStressShift)
{
XCoordinate = xCoordinate;
ZCoordinate = zCoordinate;
PreconsolidationStressMean = preconsolidationStressMean;
PreconsolidationStressCoefficientOfVariation = preconsolidationStressCoefficientOfVariation;
PreconsolidationStressShift = preconsolidationStressShift;
}
///
/// Gets the value representing the X coordinate of the preconsolidation stress location.
/// [m]
///
public double XCoordinate { get; }
///
/// Gets the value representing the Z coordinate of the preconsolidation stress location.
/// [m]
///
public double ZCoordinate { get; }
///
/// Gets the value representing the mean of the distribution for the preconsolidation stress.
/// [kN/m³]
///
public double PreconsolidationStressMean { get; }
///
/// Gets the value representing the coefficient of variation of the distribution for the preconsolidation stress.
/// [kN/m³]
///
public double PreconsolidationStressCoefficientOfVariation { get; }
///
/// Gets the value representing the shift of the distribution for the preconsolidation stress.
/// [kN/m³]
///
public double PreconsolidationStressShift { get; }
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
{
return false;
}
if (ReferenceEquals(this, obj))
{
return true;
}
if (obj.GetType() != GetType())
{
return false;
}
return Equals((MacroStabilityInwardsPreconsolidationStress) obj);
}
private bool Equals(MacroStabilityInwardsPreconsolidationStress other)
{
return XCoordinate.Equals(other.XCoordinate)
&& ZCoordinate.Equals(other.ZCoordinate)
&& PreconsolidationStressMean.Equals(other.PreconsolidationStressMean)
&& PreconsolidationStressCoefficientOfVariation.Equals(other.PreconsolidationStressCoefficientOfVariation)
&& PreconsolidationStressShift.Equals(other.PreconsolidationStressShift);
}
public override int GetHashCode()
{
unchecked
{
int hashCode = XCoordinate.GetHashCode();
hashCode = (hashCode * 397) ^ ZCoordinate.GetHashCode();
hashCode = (hashCode * 397) ^ PreconsolidationStressMean.GetHashCode();
hashCode = (hashCode * 397) ^ PreconsolidationStressCoefficientOfVariation.GetHashCode();
hashCode = (hashCode * 397) ^ PreconsolidationStressShift.GetHashCode();
return hashCode;
}
}
}
}