Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/SoilProfile2DHelper.cs =================================================================== diff -u -r5940 -r5953 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/SoilProfile2DHelper.cs (.../SoilProfile2DHelper.cs) (revision 5940) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/SoilProfile2DHelper.cs (.../SoilProfile2DHelper.cs) (revision 5953) @@ -271,17 +271,24 @@ { SoilProfile1D crossSection = soilProfile.GetSoilProfile1D(xCoordinate); int count = layerType == LayerType.InBetweenAquiferCluster ? crossSection.GetInBetweenAquiferClusters.Count : 1; - for (var i = 0; i < count; i++) + if (count == 0) { - if (HasAquiferAVerticalPartAtGivenX(layerType, xCoordinate, soilProfile, i)) + xCoordinatesAll.Add(xCoordinate); + } + else + { + for (var i = 0; i < count; i++) { - xCoordinatesAll.Add(xCoordinate - deviationX); - xCoordinatesAll.Add(xCoordinate + deviationX); + if (HasAquiferAVerticalPartAtGivenX(layerType, xCoordinate, soilProfile, i)) + { + xCoordinatesAll.Add(xCoordinate - deviationX); + xCoordinatesAll.Add(xCoordinate + deviationX); + } + else + { + xCoordinatesAll.Add(xCoordinate); + } } - else - { - xCoordinatesAll.Add(xCoordinate); - } } } return xCoordinatesAll.ToArray();