예제 #1
0
        public Grid(GlobalData globalData)
        {
            _globalData = globalData;
            Elements    = new Element[globalData.ElementsCount];
            Nodes       = new Node[globalData.NodesCount];

            UniversalElement = UniversalElement.Create2Point();
        }
예제 #2
0
        public static UniversalElement Create2Point()
        {
            double p1      = -1d / Math.Sqrt(3);
            double p2      = 1d / Math.Sqrt(3);
            var    element = new UniversalElement(
                new[] {
                new IntegrationPoint(p1, p1, 1, 1),     //lewy dolny
                new IntegrationPoint(p2, p1, 1, 1),     //prawy dolny
                new IntegrationPoint(p2, p2, 1, 1),     //prawy gorny
                new IntegrationPoint(p1, p2, 1, 1)      //lewy gorny
            }
                );

            return(element);
        }
예제 #3
0
        public IntegrationPoint[][] pc;       // w pierwszym wymiarze brzeg a w drugim wymiarze ksi w 0. elemencie i eta w 1. elemencie tablicy

        public Element(int id, int x, int y, Node[] nodes, UniversalElement universalElement)
        {
            Id               = id;
            X                = x;
            Y                = y;
            Nodes            = nodes;
            UniversalElement = universalElement;
            int pcCount = UniversalElement.PointsCount;

            Jacobians              = new double[pcCount][, ];
            TransposedJacobians    = new double[pcCount][, ];
            JacobianDeterminants2D = new double[pcCount];

            HLocalMatrices = new double[pcCount][, ];
            HLocalMatrix   = new double[4, 4];

            for (int i = 0; i < pcCount; i++)
            {
                Jacobians[i]           = new double[2, 2];
                TransposedJacobians[i] = new double[2, 2];
                HLocalMatrices[i]      = new double[4, 4];
            }
        }