## 3 Block Iteration with Parallelization
### Mesh Quality and Three-Dimensional Undulating Fish  
#### 4.1.1 Mesh Quality Results  
We define a quality metric for each of the mesh cells to assess the mesh quality results after deformation. Actually, the method we proposed is to improve the computational efficiency and its simulation results should be theoretically the same as the original results. Therefore, we just need to compare whether the results of the block iteration with parallelization method are equal to the original results or not. To make the mesh deformation results more intuitive, we adopt the two-dimensional undulating fish models as showed in Figure 2, in which the mesh is discretized with triangular cells.  
[PERSON] [27] proposed that size and shape are the two main metrics for a triangle cell. The size metric is to judge whether the cells are too large or too small compared to the reference. In addition, the reference is the area of the cell before the deformation. The formulation of the size metric is expressed as:  
\[f_{size}=min(\gamma,\frac{1}{\gamma}), \tag{29}\]  
where \(\gamma\) is the ratio of the area of the deformed cell to the area of the original cell. The \(f_{size}=1\) means that if and only if the physical triangle has the same area as the reference triangle, and the \(f_{size}=0\) means if and only if the physical triangle is degenerate.  
The shape metric is to analyse distortions with the equilateral triangles reference. For two-dimensional models, a triangular cell contains three nodes that could be coordinated as \((x_{(k)},y_{(k)}),k=0,1,2\). In addition, the formulation of the _Jacobian_ matrix \(A^{(k)}\):  
\[A^{(k)}=\left[\begin{array}{cc}x_{k+1}-x_{k}&x_{k+2}-x_{k}\\ y_{k+1}-y_{k}&y_{k+2}-y_{k}\\ \end{array}\right]. \tag{30}\]  
Make \(a^{(k)}_{i,j},i,j=1,2\) be the \(ij^{th}\) component of the \(k^{th}\) metric tensor. For any \(k\), a node independent shape metric is expressed as:  
\[f_{shape}=\frac{\sqrt{3}v^{(k)}}{a^{(k)}_{1,1}+a^{(k)}_{2,2}-a^{(k)}_{1,2}}, \tag{31}\]  
where \(v^{(k)}=det(A^{(k)})\). \(f_{shape}=1\) means if and only if the physical triangle is equilateral and \(f_{shape}=0\) means if and only if the physical triangle is degenerate. In addition, the value of \(f_{shape}\) is independent from a uniform scaling of the element.  
In general, to measure both size and shape simultaneously with different weights, a size-shape quality metric for triangles is adopted in this paper, considering that the shape metric plays a more important role than the size metric:  
\[f_{size\text{-}shape}=\sqrt{f_{size}}f_{shape}. \tag{32}\]  
Figure 2: The mesh around two-dimensional undulating fish.  
According to the method above, we test the two-dimensional undulating fish model, controlled by Equation (33). In addition, the results are shown in Table 3. _Original_ means the original greedy selection. _Block_ means that computation procedure only adopts the block iteration method. _BwithP_ means both block iteration and parallelization method are adopted with a parallelism increment of 12 cores.  
We conducted undulation from \(time=0.00T\) to \(time=0.50T\) and \(time=1.00T\). It obviously shows that the proposed methods could obtain the same mesh quality results as the original one. In addition, according to the average \(f_{size\text{-}shape}\), their mesh cells remain well.