Beispiel #1
0
        public CircularSurface(List <Point> surface, double yBoundMin,
                               List <double> radiusBreaks, SoilMovement soilDirection,
                               double x, double y, double r, List <double> limits,
                               double sf, double xEnter, double yEnter,
                               double xExit, double yExit)
        {
            random = new Random();

            this.x             = x;
            this.y             = y;
            this.r             = r;
            this.SF            = sf;
            this.surface       = surface;
            this.yBoundMin     = yBoundMin;
            this.radiusBreaks  = radiusBreaks;
            this.soilDirection = soilDirection;
            this.height        = Math.Abs(surface[0].Y - surface[surface.Count - 1].Y);

            this.xMin = limits[0];
            this.xMax = limits[1];
            this.yMin = limits[2];
            this.yMax = limits[3];
            this.rMin = limits[4];
            this.rMax = limits[5];

            this.XEnter = xEnter;
            this.YEnter = yEnter;
            this.XExit  = xExit;
            this.YExit  = yExit;
        }
Beispiel #2
0
        public CircularSurface( List<Point> surface , double yBoundMin ,
                                List<double> radiusBreaks , SoilMovement soilDirection )
        {
            random = new Random();

            this.x = 0.0;
            this.y = 0.0;
            this.r = 0.0;
            this.SF = 0.0;
            this.surface = surface;
            this.yBoundMin = yBoundMin;
            this.radiusBreaks = radiusBreaks;
            this.soilDirection = soilDirection;

            this.height = Math.Abs( surface[0].Y - surface[surface.Count - 1].Y );
        }
Beispiel #3
0
        public CircularSurface(List <Point> surface, double yBoundMin,
                               List <double> radiusBreaks, SoilMovement soilDirection)
        {
            random = new Random();

            this.x             = 0.0;
            this.y             = 0.0;
            this.r             = 0.0;
            this.SF            = 0.0;
            this.surface       = surface;
            this.yBoundMin     = yBoundMin;
            this.radiusBreaks  = radiusBreaks;
            this.soilDirection = soilDirection;

            this.height = Math.Abs(surface[0].Y - surface[surface.Count - 1].Y);
        }
Beispiel #4
0
        public int CheckYMax( double xMin , double xMax , double yMin )
        {
            upperSurface.Clear();

            int countDir = 1;
            double x = xMin , y = yMin;
            double toler = 1e-5;
            int icurr = 0 , inext = 0 , maxIndex = boundaryPoints.Count - 1;

            soilDir = SoilMovement.None;

            for ( int i = 0 ; i < boundaryPoints.Count ; i++ )
            {
                if ( Math.Abs( x - boundaryPoints[i].Point.X ) < toler )
                {
                    if ( boundaryPoints[i].Point.Y <= y )
                    {
                        icurr = i;
                        y = boundaryPoints[i].Point.Y;
                    }
                }
            }

            upperSurface.Add( new Point( x , y ) );

            while ( (xMax - x) > toler )
            {
                if ( icurr == maxIndex && countDir == 1 ) inext = 0;
                else if ( icurr == 0 && countDir == -1 ) inext = maxIndex;
                else inext = icurr + countDir;

                if ( x == xMin )
                {
                    if ( Math.Abs( x - boundaryPoints[inext].Point.X ) < toler )
                    {
                        countDir = -1;
                        if ( icurr == 0 ) inext = maxIndex;
                        else inext = icurr + countDir;

                        // minimum X boundary does not have a non-vertical exit line
                        if ( Math.Abs( x - boundaryPoints[inext].Point.X ) < toler ) return -2;
                    }
                }

                if ( (x - boundaryPoints[inext].Point.X) > toler ) return -3; // upper surface direction inconsistent

                x = boundaryPoints[inext].Point.X;

                if ( (y - boundaryPoints[inext].Point.Y) < -toler )
                {
                    if ( soilDir == SoilMovement.None ) soilDir = SoilMovement.LtoR;
                    else if ( soilDir == SoilMovement.RtoL ) return -4;  // soil direction inconsistent
                }
                else if ( (y - boundaryPoints[inext].Point.Y) > toler )
                {
                    if ( soilDir == SoilMovement.None ) soilDir = SoilMovement.RtoL;
                    else if ( soilDir == SoilMovement.LtoR ) return -4;   // soil direction inconsistent
                }

                y = boundaryPoints[inext].Point.Y;

                upperSurface.Add( new Point( x , y ) );

                icurr = inext;
            }

            return soilDir == SoilMovement.LtoR ? 1 : (soilDir == SoilMovement.RtoL ? -1 : 0);
        }
Beispiel #5
0
        public CircularSurface( List<Point> surface , double yBoundMin ,
                                List<double> radiusBreaks , SoilMovement soilDirection ,
                                double x , double y , double r , List<double> limits )
        {
            random = new Random();

            this.x = x;
            this.y = y;
            this.r = r;
            this.SF = 0;
            this.surface = surface;
            this.yBoundMin = yBoundMin;
            this.radiusBreaks = radiusBreaks;
            this.soilDirection = soilDirection;
            this.height = Math.Abs( surface[0].Y - surface[surface.Count - 1].Y );

            this.xMin = limits[0];
            this.xMax = limits[1];
            this.yMin = limits[2];
            this.yMax = limits[3];
            this.rMin = limits[4];
            this.rMax = limits[5];
        }