public static UniversalElement CreateDefault3Point()
        {
            double p1      = -Math.Sqrt(3 / 5d);
            double p2      = 0;
            double p3      = Math.Sqrt(3 / 5d);
            double w1      = 5 / 9d;
            double w2      = 8 / 9d;
            double w3      = 5 / 9d;
            var    element = new UniversalElement(
                new[] {
                new IntegrationPoint(p1, p1, w1, w1),
                new IntegrationPoint(p2, p1, w2, w1),
                new IntegrationPoint(p3, p1, w3, w1),

                new IntegrationPoint(p1, p2, w1, w2),
                new IntegrationPoint(p2, p2, w2, w2),
                new IntegrationPoint(p3, p2, w3, w2),

                new IntegrationPoint(p1, p3, w1, w3),
                new IntegrationPoint(p2, p3, w2, w3),
                new IntegrationPoint(p3, p3, w3, w3),
            }
                );

            return(element);
        }
예제 #2
0
 public Element(int id, int x, int y, Node[] nodes, UniversalElement universalElement, GlobalData globalData)
 {
     Id               = id;
     X                = x;
     Y                = y;
     Nodes            = nodes;
     UniversalElement = universalElement;
     _globalData      = globalData;
     Init();
 }
        /// <summary>
        /// Pomocnicza metoda tworzaca element uniwersalny dla dwupunktowego schematu calkowania
        /// -1/√3; 1/√3; waga 1; 1
        /// </summary>
        /// <returns></returns>
        public static UniversalElement CreateDefault2Point()
        {
            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(p1, p2, 1, 1),     //lewy gorny
                new IntegrationPoint(p2, p2, 1, 1),     //prawy gorny
            }
                );

            return(element);
        }
예제 #4
0
        public Grid(GlobalData globalData, bool gaussian3Point)
        {
            _globalData = globalData;
            Elements    = new Element[globalData.ElementsCount];
            Nodes       = new Node[globalData.NodesCount];

            UniversalElement = gaussian3Point ? UniversalElement.CreateDefault3Point()
                : UniversalElement.CreateDefault2Point();

            int dof = Nodes.Length;

            HGlobalMatrix = new double[dof, dof];
            CGlobalMatrix = new double[dof, dof];
            PGlobalVector = new double[dof, 1];
        }