Beispiel #1
0
        private NearBoundaryElement2DFirstOrder NearGetElementA(Point3D start, bool isInverted)
        {
            var vectorNearElementA = new Point3D(hRightLeft, 0, 0);

            if (isInverted)
            {
                vectorNearElementA *= -1;
            }
            var firstPoint3D   = start + new Point3D(0, 0, -h3);
            var secondPoint3D  = start + new Point3D(0, h2, -h3);
            var thirdPoint3D   = start + new Point3D(0, h2, 0);
            var fourthPoint3D  = start + vectorNearElementA;
            var fifthPoint3D   = firstPoint3D + vectorNearElementA;
            var sixthPoint3D   = secondPoint3D + vectorNearElementA;
            var seventhPoint3D = thirdPoint3D + vectorNearElementA;
            var center         = start + new Point3D(0, h2 / 2, -h3 / 2);
            var normal         = new Point3D(1, 0, 0);

            if (isInverted)
            {
                normal *= -1;
            }
            var element = new NearBoundaryElement2DFirstOrder(
                start,
                firstPoint3D,
                secondPoint3D,
                thirdPoint3D,
                fourthPoint3D,
                fifthPoint3D,
                sixthPoint3D,
                seventhPoint3D,
                center,
                normal);

            return(element);
        }
Beispiel #2
0
        private NearBoundaryElement2DFirstOrder NearGetElementC(Point3D start, bool isInverted)
        {
            var vectorNearElementC = new Point3D(0, 0, hFrontBack);

            if (isInverted)
            {
                vectorNearElementC *= -1;
            }
            var firstPoint3D   = start + new Point3D(h1, 0, 0);
            var secondPoint3D  = start + new Point3D(h1, h2, 0);
            var thirdPoint3D   = start + new Point3D(0, h2, 0);
            var fourthPoint3D  = start + vectorNearElementC;
            var fifthPoint3D   = firstPoint3D + vectorNearElementC;
            var sixthPoint3D   = secondPoint3D + vectorNearElementC;
            var seventhPoint3D = thirdPoint3D + vectorNearElementC;
            var center         = start + new Point3D(h1 / 2, h2 / 2, 0);
            var normal         = new Point3D(0, 0, 1);

            if (isInverted)
            {
                normal *= -1;
            }
            var element = new NearBoundaryElement2DFirstOrder(
                start,
                firstPoint3D,
                secondPoint3D,
                thirdPoint3D,
                fourthPoint3D,
                fifthPoint3D,
                sixthPoint3D,
                seventhPoint3D,
                center,
                normal);

            return(element);
        }