Index: Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs =================================================================== diff -u -rb6432b2cbcb2db9bd326d9f006fb2d8b2528d263 -r2363244674e6b7b97bead9a6855806420d368d80 --- Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs (.../PipingSoilProfile.cs) (revision b6432b2cbcb2db9bd326d9f006fb2d8b2528d263) +++ Ringtoets/Piping/src/Ringtoets.Piping.Primitives/PipingSoilProfile.cs (.../PipingSoilProfile.cs) (revision 2363244674e6b7b97bead9a6855806420d368d80) @@ -94,6 +94,8 @@ /// public SoilProfileType SoilProfileType { get; private set; } + public long StorageId { get; set; } + /// /// Gets the thickness of the given layer in the . /// Thickness of a layer is determined by its top and the top of the layer below it. @@ -116,51 +118,6 @@ throw new ArgumentException("Layer not found in profile."); } - /// - /// Retrieves the thickness of the consecutive aquifer layers (if any) under a certain . - /// Only the thickness of the part of the aquifer layer under the level is determined. - /// Aquifer layers above are not considered. - /// - /// The level under which the aquifer layer is sought. - /// The thickness of the part of the consecutive aquifer layer(s) under the . - /// is less than . - public double GetTopmostConsecutiveAquiferLayerThicknessBelowLevel(double level) - { - ValidateLevelToBottom(level); - - PipingSoilLayer previousAquiferLayer = null; - var aquiferLayerThickness = 0.0; - foreach (var pipingSoilLayer in Layers) - { - if (pipingSoilLayer.Top > level) - { - previousAquiferLayer = null; - if (!pipingSoilLayer.IsAquifer) - { - aquiferLayerThickness = 0.0; - } - } - - if (!pipingSoilLayer.IsAquifer) - { - if (previousAquiferLayer != null) - { - break; - } - continue; - } - - previousAquiferLayer = pipingSoilLayer; - var layerThickness = GetLayerThicknessBelowLevel(pipingSoilLayer, level); - if (!double.IsNaN(layerThickness)) - { - aquiferLayerThickness += layerThickness; - } - } - - return previousAquiferLayer == null ? double.NaN : aquiferLayerThickness; - } - public override string ToString() { return Name; @@ -193,27 +150,5 @@ throw new ArgumentException(Resources.PipingSoilProfile_Layers_Layer_top_below_profile_bottom); } } - - private void ValidateLevelToBottom(double level) - { - if (level < Bottom) - { - var message = string.Format(Resources.PipingSoilProfile_GetTopAquiferLayerThicknessBelowLevel_Level_0_below_Bottom_1_, level, Bottom); - throw new ArgumentException(message); - } - } - - private double GetLayerThicknessBelowLevel(PipingSoilLayer layer, double level) - { - var thickness = double.NaN; - if (layer != null) - { - double thicknessAboveLevel = Math.Max(0, layer.Top - level); - thickness = GetLayerThickness(layer) - thicknessAboveLevel; - } - return thickness; - } - - public long StorageId { get; set; } } } \ No newline at end of file