Face swapping is used to improve the quality of a triangular or tetrahedral grid.
To perform face swapping, click on the Swap button in the Smooth/Swap Grid panel until the reported Number Swapped is 0. The Number Visited indicates the total number of faces that were visited and tested for possible face swapping.
Face swapping is applicable only to grids with triangular or tetrahedral cells.
The approach for triangular grids is to use the Delaunay circle test to decide if a face shared by two triangular cells should be swapped. A pair of cells sharing a face satisfies the circle test if the circumcircle of one cell does not contain the unshared node of the second cell. Figure 26.13.5 illustrates cell neighbors in the circle test. In cases where the circle test is not satisfied, the diagonal or face is swapped, as illustrated in Figure 26.13.6.
Repeated application of the face-swapping technique will produce a constrained Delaunay mesh. If you have a Delaunay grid, it is a unique triangulation that maximizes the minimum angles in the mesh. Thus, the triangulation tends toward equilateral cells, providing the most equilateral grid for the given node distribution. For more information on Delaunay mesh generation, see the Theory chapter in the TGrid User's Guide.
For tetrahedral grids, face swapping consists of searching for configurations of three cells sharing an edge and converting them into two cells sharing a face to decrease skewness and the cell count (see Figure 26.13.7).