示例#1
0
        private static IEnumerable <PipingSoilLayer> GetConsecutiveAquiferLayers(PipingInput input)
        {
            PipingSurfaceLine surfaceLine = input.SurfaceLine;
            PipingSoilProfile soilProfile = input.StochasticSoilProfile?.SoilProfile;
            RoundedDouble     exitPointL  = input.ExitPointL;

            if (surfaceLine != null && soilProfile != null && !double.IsNaN(exitPointL))
            {
                return(soilProfile.GetConsecutiveAquiferLayersBelowLevel(surfaceLine.GetZAtL(exitPointL)).ToArray());
            }

            return(new PipingSoilLayer[0]);
        }
示例#2
0
        private static void AssertExitPointLPointchartData(PipingInput pipingInput, PipingSurfaceLine surfaceLine, ChartData chartData)
        {
            Assert.IsInstanceOf <ChartPointData>(chartData);
            var exitPointChartData = (ChartPointData)chartData;

            Assert.AreEqual(1, exitPointChartData.Points.Count());
            var exitPoint = new Point2D(pipingInput.ExitPointL, surfaceLine.GetZAtL(pipingInput.ExitPointL));

            CollectionAssert.AreEqual(new[]
            {
                exitPoint
            }, exitPointChartData.Points);
            Assert.AreEqual("Uittredepunt", exitPointChartData.Name);
        }
示例#3
0
        private static double GetThicknessCoverageLayers(PipingSoilProfile soilProfile, PipingSurfaceLine surfaceLine, RoundedDouble exitPointL)
        {
            try
            {
                double zAtL = surfaceLine.GetZAtL(exitPointL);
                return(soilProfile.GetConsecutiveCoverageLayerThicknessBelowLevel(zAtL));
            }
            catch (Exception e)
            {
                if (e is MechanismSurfaceLineException || e is InvalidOperationException || e is ArgumentException)
                {
                    return(double.NaN);
                }

                throw;
            }
        }