Esempio n. 1
0
        private void SetTri(FEWorld world, uint valueId)
        {
            System.Diagnostics.Debug.Assert(Type == ElementType.Tri);
            if (Type != ElementType.Tri)
            {
                return;
            }

            FieldValue fv         = world.GetFieldValue(valueId);
            uint       quantityId = fv.QuantityId;
            int        feOrder;

            {
                uint feId = world.GetTriangleFEIdFromMesh(quantityId, MeshId, 0); // 先頭の要素
                System.Diagnostics.Debug.Assert(feId != 0);
                TriangleFE triFE = world.GetTriangleFE(quantityId, feId);
                feOrder     = triFE.Order;
                ElemPtCount = triFE.NodeCount;
            }

            Indexs = new uint[ElemPtCount * ElemCount];
            for (int iTri = 0; iTri < ElemCount; iTri++)
            {
                uint feId = world.GetTriangleFEIdFromMesh(quantityId, MeshId, (uint)iTri);
                System.Diagnostics.Debug.Assert(feId != 0);
                TriangleFE triFE = world.GetTriangleFE(quantityId, feId);
                for (int iPt = 0; iPt < ElemPtCount; iPt++)
                {
                    Indexs[iTri * ElemPtCount + iPt] = (uint)triFE.NodeCoordIds[iPt];
                }
            }
        }