Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilLayer1D.cs =================================================================== diff -u -r3893 -r4000 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilLayer1D.cs (.../SoilLayer1D.cs) (revision 3893) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilLayer1D.cs (.../SoilLayer1D.cs) (revision 4000) @@ -30,16 +30,15 @@ /// public class SoilLayer1D : SoilLayer, ISoilProfileProvider, ICloneable, IComparable { + private double topLevel; + /// /// Function delegate to get layer above/beneath via the 1D Profile /// /// The layer. /// protected delegate SoilLayer1D LayerGetFunction(SoilLayer1D layer); - private SoilProfile1D soilProfile; - private double topLevel; - /// /// Initializes a new instance of the class. /// @@ -96,7 +95,7 @@ // don't do anything if bottom is already value if (Math.Abs(value - BottomLevel) > GeometryConstants.Accuracy) { - var layerBelow = LayerBelow(); + SoilLayer1D layerBelow = LayerBelow(); if (layerBelow != null) { layerBelow.topLevel = value; @@ -131,39 +130,9 @@ /// Gets or sets the soil profile. /// The soil profile is set automatically by the soil layers list in SoilProfile1D - public SoilProfile1D SoilProfile - { - get - { - return soilProfile; - } - set - { - soilProfile = value; - } - } + public SoilProfile1D SoilProfile { get; set; } /// - /// Clones this instance. - /// - /// Clone of this instance - public virtual object Clone() - { - var clone = new SoilLayer1D(); - clone.Assign(this); - return clone; - } - - /// - /// Returns the Layer below. - /// - /// layer below - private SoilLayer1D LayerBelow() - { - return SoilProfile.GetLayerBelow(this); - } - - /// /// Assigns the specified layer. /// /// The layer. @@ -187,13 +156,33 @@ } /// + /// Clones this instance. + /// + /// Clone of this instance + public virtual object Clone() + { + var clone = new SoilLayer1D(); + clone.Assign(this); + return clone; + } + + /// /// Sorting will be applied by the mot uplift layer first /// /// Other soil layer /// Comparable indication public int CompareTo(SoilLayer1D other) { - return - TopLevel.CompareTo(other.TopLevel); - } + return -TopLevel.CompareTo(other.TopLevel); + } + + /// + /// Returns the Layer below. + /// + /// layer below + private SoilLayer1D LayerBelow() + { + return SoilProfile.GetLayerBelow(this); + } } } \ No newline at end of file