// 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; } } }
// 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)); } }