Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs =================================================================== diff -u -r5251 -r5265 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 5251) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 5265) @@ -402,28 +402,8 @@ { plLine.Points.Add(new PlLinePoint(SurfaceLine.Geometry.Points.First().X, headInPlLine2.Value)); plLine.Points.Add(new PlLinePoint(SurfaceLine.Geometry.Points.Last().X, headInPlLine2.Value)); - - SoilLayer1D separationLayer = (from SoilLayer1D layer in infiltrationLayers - where layer.TopLevel >= separationLevel - select layer).Last(); - - if (separationLevel < separationLayer.TopLevel) - { - // Split layer at separation level - var extraLayer = new SoilLayer1D - { - Name = separationLayer.Name + "extra" - }; - extraLayer.Assign(separationLayer); - extraLayer.TopLevel = separationLevel; - - SoilProfile.Layers.Insert(relevantSoilProfile.Layers.IndexOf(separationLayer) + 1, extraLayer); - relevantSoilProfile = GetRelevantSoilProfileForAquiferLayersSearch(); - } } } - - SoilProfile.DetermineInfiltrationLayer(penetrationLength, relevantSoilProfile); } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile1D.cs =================================================================== diff -u -r5250 -r5265 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile1D.cs (.../SoilProfile1D.cs) (revision 5250) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile1D.cs (.../SoilProfile1D.cs) (revision 5265) @@ -361,38 +361,6 @@ } /// - /// Determines the infiltration layer. - /// - /// Length of the penetration. - public void DetermineInfiltrationLayer(double penetrationLength, SoilProfile1D relevantSoilProfileForAquifersSearch) - { - InfiltrationLayer = null; - - SoilLayer1D bottomAquiferLayer = BottomAquiferLayer; - - if (penetrationLength > 0 && bottomAquiferLayer != null) - { - SoilLayer1D inBetweenAquiferLayer = InBetweenAquiferLayer; - - double aquiferBottom = inBetweenAquiferLayer == null ? double.PositiveInfinity : inBetweenAquiferLayer.BottomLevel; - - IList infiltrationLayers = - relevantSoilProfileForAquifersSearch.Layers.Where(l => l.TopLevel <= aquiferBottom && l.TopLevel > bottomAquiferLayer.TopLevel) - .ToList(); - - if (infiltrationLayers.Count > 0) - { - double separationLevel = bottomAquiferLayer.TopLevel + penetrationLength; - - if (separationLevel <= infiltrationLayers.First().TopLevel) - { - InfiltrationLayer = layers.Last(l => l.TopLevel >= separationLevel); - } - } - } - } - - /// /// Validates this instance (using validator mechanism). /// /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/PlLinesCreator/PlLinesCreatorTest.cs =================================================================== diff -u -r5250 -r5265 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/PlLinesCreator/PlLinesCreatorTest.cs (.../PlLinesCreatorTest.cs) (revision 5250) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/PlLinesCreator/PlLinesCreatorTest.cs (.../PlLinesCreatorTest.cs) (revision 5265) @@ -1269,19 +1269,15 @@ PenetrationLength = cPenetrationLength } }; - int originalLayerCount = plLineCreator.SoilProfile.Layers.Count; - + PlLine plLine = plLineCreator.CreatePlLineByExpertKnowledge(PlLineType.Pl2, 0.02); Assert.Multiple(() => { Assert.That(plLine.Exists(), Is.True); Assert.That(plLine.Points[0].LocationEquals(new PlLinePoint(1.0, cHeadPl2)), Is.True); Assert.That(plLine.Points[1].LocationEquals(new PlLinePoint(21.0, cHeadPl2)), Is.True); - // Check if extra layer is added to soil profile - Assert.That(plLineCreator.SoilProfile.Layers, Has.Count.EqualTo(originalLayerCount + 1)); }); - Assert.That(plLineCreator.SoilProfile.Layers[originalLayerCount - 1].TopLevel, Is.EqualTo(-2.0).Within(0.01)); } [Test] @@ -1312,7 +1308,6 @@ PenetrationLength = cPenetrationLength } }; - int originalLayerCount = plLineCreator.SoilProfile.Layers.Count; PlLine plLine = plLineCreator.CreatePlLineByExpertKnowledge(PlLineType.Pl2, 0.02); @@ -1321,18 +1316,14 @@ Assert.That(plLine.Exists(), Is.True); Assert.That(plLine.Points[0].LocationEquals(new PlLinePoint(1.0, cHeadPl2)), Is.True); Assert.That(plLine.Points[1].LocationEquals(new PlLinePoint(21.0, cHeadPl2)), Is.True); - // Check if extra layer is added to soil profile - Assert.That(plLineCreator.SoilProfile.Layers, Has.Count.EqualTo(originalLayerCount + 1)); - Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer, Is.Not.Null); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer, Is.Not.Null); - Assert.That(plLineCreator.SoilProfile.InfiltrationLayer, Is.Not.Null); + Assert.That(plLineCreator.SoilProfile.InfiltrationLayer, Is.Null); }); Assert.Multiple(() => { Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer.TopLevel, Is.EqualTo(-5.0)); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer.TopLevel, Is.EqualTo(1.0)); - Assert.That(plLineCreator.SoilProfile.InfiltrationLayer.TopLevel, Is.EqualTo(-3.0)); }); } @@ -1364,7 +1355,6 @@ PenetrationLength = cPenetrationLength } }; - int originalLayerCount = plLineCreator.SoilProfile.Layers.Count; PlLine plLine = plLineCreator.CreatePlLineByExpertKnowledge(PlLineType.Pl2, 0.02); @@ -1373,17 +1363,14 @@ Assert.That(plLine.Exists(), Is.True); Assert.That(plLine.Points[0].LocationEquals(new PlLinePoint(1.0, cHeadPl2)), Is.True); Assert.That(plLine.Points[1].LocationEquals(new PlLinePoint(21.0, cHeadPl2)), Is.True); - // Check if no extra layer is added to soil profile - Assert.That(plLineCreator.SoilProfile.Layers, Has.Count.EqualTo(originalLayerCount)); Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer, Is.Not.Null); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer, Is.Not.Null); - Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer, Is.Not.Null); + Assert.That(plLineCreator.SoilProfile.InfiltrationLayer, Is.Null); }); Assert.Multiple(() => { Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer.TopLevel, Is.EqualTo(-5.0)); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer.TopLevel, Is.EqualTo(1.0)); - Assert.That(plLineCreator.SoilProfile.InfiltrationLayer.TopLevel, Is.EqualTo(-2.3)); }); } @@ -1415,7 +1402,6 @@ PenetrationLength = cPenetrationLength } }; - int originalLayerCount = plLineCreator.SoilProfile.Layers.Count; PlLine plLine = plLineCreator.CreatePlLineByExpertKnowledge(PlLineType.Pl2, 0.02); @@ -1424,18 +1410,14 @@ Assert.That(plLine.Exists(), Is.True); Assert.That(plLine.Points[0].LocationEquals(new PlLinePoint(1.0, cHeadPl2)), Is.True); Assert.That(plLine.Points[1].LocationEquals(new PlLinePoint(21.0, cHeadPl2)), Is.True); - // Check if no extra layer is added to soil profile - Assert.That(plLineCreator.SoilProfile.Layers, Has.Count.EqualTo(originalLayerCount)); - Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer, Is.Not.Null); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer, Is.Not.Null); - Assert.That(plLineCreator.SoilProfile.InfiltrationLayer, Is.Not.Null); + Assert.That(plLineCreator.SoilProfile.InfiltrationLayer, Is.Null); }); Assert.Multiple(() => { Assert.That(plLineCreator.SoilProfile.BottomAquiferLayer.TopLevel, Is.EqualTo(-5.0)); Assert.That(plLineCreator.SoilProfile.InBetweenAquiferLayer.TopLevel, Is.EqualTo(1.0)); - Assert.That(plLineCreator.SoilProfile.InfiltrationLayer.TopLevel, Is.EqualTo(-1.5)); }); }