Beispiel #1
0
 public DelaunayTet(DelaunayTet el)
 {
     for (int i = 0; i < 4; i++)
     {
         pnums[i] = el[i];
     }
 }
Beispiel #2
0
        // add element with 4 nodes
        public void Add(int elnr)
        {
            DelaunayTet el = tets.Elem(elnr);

            for (int i = 0; i < 4; i++)
            {
                INDEX_3 i3 = INDEX_3.Sort(el.GetFace(i));

                int posnr;

                if (!faces.PositionCreate(i3, ref posnr))
                {
                    // face already in use
                    int othertet = faces.GetData(posnr);

                    el.NB(i) = othertet;
                    if (othertet != 0)
                    {
                        int fnr = tets.Get(othertet).FaceNr(i3);
                        tets.Elem(othertet).NB(fnr) = elnr;
                    }
                }
                else
                {
                    faces.SetData(posnr, elnr);
                    el.NB(i) = 0;
                }
            }
        }
Beispiel #3
0
        // delete element with 4 nodes
        public void Delete(int elnr)
        {
            DelaunayTet el = tets.Elem(elnr);

            for (int i = 0; i < 4; i++)
            {
                faces.Set(el.GetFace(i).Sort(), el.NB(i));
            }
        }