## 4 Examples
### Quadilateral Mesh Example  
We first consider a square quadrilateral mesh with a hole. The initial mesh is shown in Figure 5(a). The mesh has 168 nodes and 140 quadrilateral elements, including 23 inverted elements. There are 56 boundary nodes in the mesh, and they are fixed during the optimization process. The three default untanglers in Mesquite and the proposed approach (EEGT) in this paper are used to optimize the initial tangled mesh. Table 1 shows mesh quality statistics and the number of inverted elements of the initial mesh and output meshes, and Figure 6 shows output meshes obtained by different methods.  
The Untangle-Beta untangler successfully eliminates all inverted elements in the initial mesh. The average quality of the mesh is also high enough, but the worst quality of mesh elements is only 0.0207. There are many low-quality elements near the left inner boundary, which can be seen in Figure 5(b). Such a mesh can not be directly used in numerical simulations, so the Shape Improve Wrapper in Mesquite is used to optimize the output mesh. The resulting mesh is shown in Figure 5(f). The average quality of the mesh is improved to 0.6312, and the quality of the worst element is improved to 0.2297. It can be seen from Figure 5(f) that after further optimization, the distribution of mesh elements is more uniform in the calculation domain. In this example, the Size untangler does not eliminate all inverted elements, and the resulting mesh still contains 4 inverted elements. The Size untangler tries to make the size of the mesh elements uniform while untangling the mesh, which can be seen in Figure 5(c). Different form the Size untangler, the Shape-Size untangler considers both the element size and shape, so it can perform mesh untangling and improve the mesh quality at the same time. Figure 5(d) shows that the optimized mesh of the Shape-Size untangler is better than those obtained by the other two untanglers. Nonetheless, the optimized mesh still has some low-quality elements near the left boundary. Figure 5(e) shows the optimized mesh obtained by using the proposed approach. Although the average mesh quality is lower than that obtained by the optimization-based method,  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Methods** & **Time(s)** & \(\mathbf{q_{ave}}\) & \(\mathbf{q_{min}}\) & **Number of Inverted Elements** \\ \hline Initial mesh & \(-\) & 0.6347 & 0 & 23 \\ Untangle-Beta & 0.09 & 0.6003 & 0.0207 & 0 \\ Size & 0.41 & 0.5073 & 0 & 4 \\ Shape-Size & 0.239 & 0.5634 & 0.0953 & 0 \\ Untangle-Beta + Shape Improve Wrapper & 0.525 & 0.6312 & 0.2297 & 0 \\ EEGT & 0.006 & 0.5844 & 0.2502 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Mesh quality statistics and the number of inverted elements for quadrilateral mesh example. The mean ratio quality metric is used to measure the mesh quality.  
the quality of the worst element is higher. In addition, the distribution of elements in the calculation domain is sufficiently uniform.  
Figure 6: (**a**) Initial quadrilateral mesh with 23 inverted elements. (**b**) Optimized mesh using the Untangle-Beta untangler. (**c**) Optimized mesh using the Size untangler. (**d**) Optimized mesh using the Shape-Size untangler. (**e**) Optimized mesh using the proposed approach. (**f**) Optimized mesh using the Untangle-Beta untangler and the Shape Improve Wrapper.  
The proposed approach has obvious advantages over the optimization-based methods in terms of running time. The Size untangler takes 0.09 s to eliminate inverted elements, while the Shape-Size untangler takes 0.239 s. The Shape Improve Wrapper takes extra 0.435 s to smooth the untangled mesh obtained by the Untangle-Beta untangler, so the total running time is 0.525 s for [PERSON] to optimize the initial mesh. The proposed approach only takes 0.006 s to untangle and smooth the initial mesh, which shows the high efficiency of this method.