For every vertex in the list:
This algorithm visits all vertices in the mesh and if this is the first time the elements in the vertex group have been visited the local top vertex is orientated to this vertex. If this is the second time the elements in the vertex group have been visited then set the local base vertex to this vertex. To see how this works we can consider the example shown in figure 2.8.
![]() |
Here we assume that we are given a discretization of a box using six tetrahedra as shown in figure 2.8a. Starting our algorithm we begin with vertex A. Since all elements have a tag of zero at this point we go straight to the second part of the algorithm and orientate all elements that touch this vertex so that their local top vertices point to A. Therefore tetrahedra HBDA and BHEA are orientated as shown in figure 2.8b and now have a tag set to one. Continuing to the next vertex B we see that all elements belong to this vertex group. The first part of the algorithm is to orientate the elements with a tag of one to have their local base vertex pointing at B. So the tetrahedra HBDA and BHEA are rotated as shown in figure 2.8c and their tags are set to two. The second part of the algorithm then orientates all the other tetrahedra to have their local top vertex pointing at B. The connectivity is actually satisfied at this point since the orientation the faces have on the boundaries is irrelevant. However, if we continue the algorithm looping through the vertices consecutively we end up with the tetrahedra orientated as shown in figure 2.8c.
Clearly, the connectivity is not unique since any elements that have their local top vertex pointing at E can be rotated about E. We have demonstrated however that it is possible to satisfy the connectivity requirements imposed by the co-ordinate system and thereby imply that the requirement is non-restrictive.