PDF only - at www.arxiv.org.

T-Base: A Triangle-Based Iterative Algorithm
for Smoothing Quadrilateral Meshes
Gang Mei1, John C.Tipper1 and Nengxiong Xu2
Abstract We present a novel approach named T-Base for smoothing planar and
surface quadrilateral meshes. Our motivation is that the best shape of quadrilateral
element – square – can be virtually divided into a pair of equilateral right triangles
by any of its diagonals. When move a node to smooth a quadrilateral, it is optimal
to make a pair of triangles divided by a diagonal be equilateral right triangles
separately. The finally smoothed position is obtained by weighting all individual
optimal positions. Three variants are produced according to the determination of
weights. Tests by the T-Base are given and compared with Laplacian smoothing:
The Vari.1 of T-Base is effectively identical to Laplacian smoothing for planar
quad meshes, while Vari.2 is the best. For the quad mesh on underlying parametric
surface and interpolation surface, Vari.2 and Vari.1 are best, respectively.
Keywords Mesh smoothing • Iterative smoothing • Quad meshes • Laplacian
smoothing • Length-weighted
1 Introduction
The quality of meshes is critical to obtain reliable simulation results in finite element analyses. Usually after generating computational meshes, it is necessary to
improve the quality of meshes in further. There are two important categories of
quality improvement methods. One is called clear-up techniques, which alters the
connectivity between elements. The other is called mesh smoothing, which only
relocates the nodes. There are numerous publications on the topic of mesh
smoothing. And we just refer some popular and representative ones.
Gang Mei, John C.Tipper ( )
Institut für Geowissenschaften – Geologie, Albert-Ludwigs-Universität Freiburg, Albertstr. 23B,
D-79104, Freiburg im Breisgau, Germany
e-mail: {gang.mei, john.tipper}@geologie.uni-freiburg.de
Nengxiong Xu ( )
School of Engineering and Technology, China University of Geosciences, Beijing,100083, China
e-mail: [email protected]
2
G. Mei, J.C.Tipper and N. Xu
The most popular smoothing methods is Laplacian smoothing [5, 7], which repositions each node at the centroid of its neighbouring nodes in one iteration. The
popularity of this method comes from its efficiency and effectiveness. A simpler
but more effective method is angle-based approach [16], in which new locations
are calculated by conforming specific angle ratios in surrounding polygons.
A geometric element transformation method [14], which is based on a simple
geometric transformation, is proposed and applied to polygons. Shimada et al [12]
proposed a method which treats nodes as the centre of bubbles and nodal locations
are obtained by deforming bubbles with each other.
A projecting/smoothing method is proposed for smoothing surface meshes [4],
where the new position of each free node is obtained by minimizing the mean ratio
of all triangles sharing the free node. Based on quadric surface fitting and by combining vertex projecting, curvature estimating and mesh labelling, Wang and Yu
[15] proposed a novel method and applied it in biomedical modelling.
A variational method for smoothing surface and volume triangulations is proposed by Jiao [9], where the discrepancies between actual and target elements is
reduced by minimizing two energy functions. Also, a general-purpose algorithm
called the target-matrix paradigm is introduced in [10], and can be applied to a
wide variety of mesh and element types.
To smooth meshes better, two or more basic methods can be combined into a
hybrid approach [1,2,6], i.e., an analytical framework for mesh quality metrics and
optimization direction computation in physical and parametric space are proposed
for smoothing surface quad meshes in [13].
In this paper we introduce a novel iterative method named T-Base to smooth
planar and surface quad meshes. The best shape of a quadrilateral element is
square, which can be virtually divided into a pair of equilateral right triangles by
any of its diagonals. Hence, when move a node to smooth a quad element, it is optimal to make the two triangles divided the diagonal consisted by the node and its
opposite one be equilateral right triangles separately. The final smoothed position
is obtained by weighting all the separate optimal positions.
When smooth surface quad meshes, we firstly compute the local coordinates
system for each virtual triangle and then calculate the optimal position, and finally
obtain the smoothed node by transforming it from local coordinates to the global
coordinates and weighting all individual optimal positions.
After generating the optimal smoothed positions, they should be moved again in
order to preserve the features of initial surfaces. For quad mesh on parametric surfaces, we project the smoothed node onto the original parametric surface along the
normal. For quad mesh on interpolation surfaces, we re-interpolate the smoothed
nodes to fit them with the initial surfaces.
The rest of this paper is organized as follows. Sect.2 describes the details of the
T-Base including its three variants for smoothing planar quad meshes. In Sect.3,
we simply extend T-Base to smooth surface quad meshes. Then we give several
examples in Sect.4 to test the performance of the T-Base and compare it with
Laplacian smoothing. Finally, Sect.5 concludes this work.
T-Base: A Triangle-Based Iterative Algorithm for Smoothing Quadrilateral Meshes
3
2 T-Base for Planar Quad Meshes
The best shape of a quadrilateral element is square, which can be virtually divided
into a pair of equilateral right triangles by any of its diagonals. When move a node
in order to smooth a quadrilateral, it is optimal to make the two triangles divided
by the diagonal consisted with the node and its opposite one be equilateral right
triangles separately (Fig.1).
A
A
A*
A
A*
D
B
+
B
C
C
D
C
Fig. 1 Smoothing of quad element ABCD based on a pair of virtual triangles
Consider a single quadrilateral element ABCD shown in Fig.1. It is virtually
divided into a pair of triangles ABC and CDA. A*s are the positions to which node
A would have to be moved to make ABC and CDA be equilateral right triangles,
assuming that nodes B , C and D were fixed. The coordinates of A* in triangles
ABC and CDA are:
 X *A = X B + YB − YC
 X * = X D − YD + YC
,  *A
 *
YA = − X B + YB + X C YA = X D + YD − X C
(1)
Now assume ABCD is part of a quadrilateral mesh. Each node of ABCD –for
instance node A – is then shared with several other elements, and A* can be calculated for each of these. The final position of A – its optimal smoothed position – is
obtained by considering all the separately calculated A*’s (Fig.2).
The traditional Laplacian smoothing assumes that the new position of a node
should be an average of the positions calculated for it for each of the elements of
which it is part (Fig.2). This assumption is not essential, however, and it can be relaxed by making that new position a weighted average of those positions, with the
weights being proportional to the lengths of the opposite edges. Then, for node A:
2n
XA =
∑ (w ⋅ X
i
i =1
2n
∗
Ai ) ,
YA =
∑ (w ⋅ Y
i
i =1
∗
Ai )
(2)
4
G. Mei, J.C.Tipper and N. Xu
,where n is the number of elements of which node A is part, and wi is the weight
of the ith separate position A* which can be calculated according to the length li of
relevant ith edge.
8
9
7
10
A
6
A*
1
5
4
2
3
Fig. 2 Node A belongs to 5 quad elements. A* can be calculated for each triangle separately
(black circles). Optimal smoothed position for A is produced from all A*s
According to the determination of the weights wi, we produce three variants:
Variant 1. This variant is termed as the average version of the T-Base:
wi =
1
= li0
2n
2n
∑l
0
i
(3)
i =1
The averaging process is effectively identical to that used in the traditional
Laplacian smoothing, which explains why test results obtained using Laplacian
smoothing are identical to that of T-Base for planar quad meshes (see Figs 3, 4).
But the above conclusion is no longer true for surface quadrilateral meshes.
Variant 2. This variant is termed as the (−1/2) inverse-length version:
wi =
1
li
2n
∑
i =1
1
= li−1 / 2
li
2n
∑l
−1 / 2
i
(4)
i =1
Variant 3. This variant is termed as the (−1) inverse-length version:
wi =
1
li
2n
∑
i =1
1
= li−1
li
2n
∑l
−1
i
(5)
i =1
The introduction of inverse-length weighting is in many respects advantageous,
because high quality elements such as equilateral quadrilateral element or even
square generally have nearly or exactly same-length edges. In order to transform
T-Base: A Triangle-Based Iterative Algorithm for Smoothing Quadrilateral Meshes
5
quadrilateral elements to be equilateral as more as possible, we let longer edges of
an element have less importance in the smoothing than shorter ones.
The disadvantage of inverse-length versions (Vari.2 and 3) over the average
version (Vari.1) is of course that it brings a time penalty, as the weights have to be
calculated afresh at each iteration step. This is also the reason why inverse-length
versions need more iteration steps to converge than that of the average version.
The implementation of T-Base for planar quadrilateral meshes is very simple:
(1) search all incident elements for each node; (2) calculate of smoothed positions
of each node by making relevant virtual triangles be equilateral right; (3) iterate
previous step until a tolerance distance is reached.
3 T-Base for Surface Quad Meshes
Eq.1 computes the optimal position for a virtual triangle in 2D. For surface quad
meshes, we firstly compute the local coordinates system for each virtual triangle
and then calculate the optimal position via Eq.1, and finally obtain the smoothed
nodal position by recovering it to global coordinates and weighting all A*s.
After obtaining the optimal smoothed positions, updating should be done for
different type of discrete surfaces in order to preserve the shape of initial surfaces.
For quad mesh on parametric surfaces, we compute the normal at each vertex and
then project the smoothed node onto the original parametric surface along the
normal to obtain final position (Fig.5). For quad mesh on interpolation surfaces,
we re-interpolate the smoothed nodes to fit them with the initial surfaces (Fig.6).
Flow of the T-Base for surface quad meshes is listed in Algorithm.1.
Algorithm 1 T-Base for Smoothing Surface Quad Meshes
Input: An original surface quad mesh
Output: A smoothed surface quad mesh
1: Search the incident elements for each node vi .
2: while iterations not terminate do
3: for each node vi do
4:
for each incident element Qj (0 ≤ j < n) of vi do
5:
Divide Qj into two triangles and calculate local coordinates separately.
6:
Obtain a pair of A*’s locally and transform them back to global.
7:
Calculate a pair of weights w’s in Qj.
8:
end for
9:
Obtain optimal smoothed position of vi :
2n
XA =
∑ (w ⋅ X
i
i =1
2n
∗
Ai ) , Y A
=
∑ (w ⋅ Y
i
i =1
2n
∗
Ai ) , Z A
=
∑ (w ⋅ Z
i
∗
Ai )
i =1
10:
Update vi by projecting it to initial parametric surface or re-interpolating.
11: end for
12: end while
6
G. Mei, J.C.Tipper and N. Xu
4 Applications and Discussion
4.1 Mesh Quality
The simplest way to measure mesh quality is to calculate the distortion values for
each of the mesh elements separately, and then to compare the distributions, including mean quality (MQ) and mean square error (MSE), of those values. For a
quad ABCD, we use the measure λ [8], shown in Eq.6. The value of λ lies between
0 and 1; λ = 0 when any three nodes are collinear; λ = 1 when ABCD is square.
AB × AD ⋅ BC × BA ⋅ CD × CB ⋅ DA × DC
λ = 24
2
2
2
2
2
2
2
2
(6)
( AB + AD )( BC + BA )( CD + CB )( DA + DC )
For a quad element in 3D, it’s warped generally. In this paper, we propose a
new measurement γ in which shape and warpage are taken into account. A quad
ABCD can be divided into four triangles: ABC, BCD, CDA and DAB. We firstly
calculate the local coordinates system of these triangles and project the original
quad element ABCD onto each local coordinates system to obtain four planar
quads ABCDP, BCDAP, CDABP and DABCP, respectively. Let λ1, λ2, λ3 and λ4
denote the λ values of the four planar quads, then γ = (λ1 + λ2 + λ3 + λ4) / 4. The
value of γ also lies between 0 and 1; we specially set λ = 0 when any three nodes
are collinear; λ = 1 when ABCD is coplanar square. Thus, we have:
MQ =
1
n
n
∑
γ i , MSE =
i =1
1
n
n
∑ (γ
i
− MQ) 2
(7)
i =1
, where n is the number of elements in a quad mesh.
4.2 Tests of Smoothing Planar Quad Meshes
(a) Original
(b) By Vari.1/LS
(c) By Vari.2
(d) By Vari.3
Fig. 3 Test 1 of smoothing planar quad mesh by T-Base and Laplacian smoothing (LS)
T-Base: A Triangle-Based Iterative Algorithm for Smoothing Quadrilateral Meshes
7
These two original quad meshes are generated by Q-Morph [11]. Fig.3 and
Fig.4 display the results of the two planar quad meshes by Laplacian smoothing
and T-Base. From the comparison of mesh quality listed in Table.1, we can learn
that Vari.1 is effectively identical to Laplace smoothing, Vari.3 and Vari.2 are better than Vari.1, but Vari.2 is best.
Convergence We do not give the algebraic proof of convergence for T-Base in
theory. But our tests show that T-Base does converge for planar meshes, and the
numbers of iteration steps of Vari.1, 2 and 3 always increases when it converges.
(a) Original
(b) By Vari.1/LS
.
(c) By Vari.2
(d) By Vari.3
Fig. 4 Test 2 of smoothing planar quad mesh by T-Base and Laplacian smoothing (LS)
4.3 Tests of Smoothing Surface Quad Meshes
We firstly generate the planar meshes in a circular area, and then project it onto
the parametric surface z = 200 − 0.02(x2+ y2) to obtain the mesh in Fig.5a. The
original mesh in Fig.6a is for height interpolation by Kriging method [3]; only z value/height is interpolated while coordinates x and y are fixed.
Fig.5 shows the results of quad meshes on a underlying parametric surface. Noticeably, only Laplacian smoothing converges after 49 iterations. We just let TBase iterate 49 times as that of Laplacian smoothing. From the comparison of
mesh quality in Table.1, we can learn that T-Base is better than Laplacian smoothing. In further, Vari.2 is the best, and the Vari.1 is better than Vari.3 since the distribution of element qualities is better than that of Vari.3.
In Fig.6, all optimal smoothed by only Laplacian smoothing or T-Base is generated firstly, and then z -value is re-interpolated by Kriging method. Due to the expensive cost of re-interpolation, we only iterate 10 times. Similar to the quad mesh
on parametric surface, T-Base is better than Laplacian smoothing. But Vari.1 is
the best, and then the Vari.2, while Vari.3 is the worst.
8
G. Mei, J.C.Tipper and N. Xu
(a) Original
(b) By LS
(d) By Vari.2
(c) By Vari.1
(e) By Vari.3
Fig. 5 Smoothing results of surface quad mesh on underlying parametric surface
(a) Original
(b) By LS
(c) By Vari.1
(d) By Vari.2
(e) By Vari.3
Fig. 6 Smoothing results of surface quad mesh on interpolation surface
T-Base: A Triangle-Based Iterative Algorithm for Smoothing Quadrilateral Meshes
9
Convergence Only Laplacian smoothing converges for the quad meshes on parametric underlying surface. According to the convergence analysis for planar
quad meshes, T-Base needs to iterate more times than Laplacian smoothing,
hence, we can firstly record the iteration number of Laplacian smoothing for surface quad meshes, and then set the number from Laplacian smoothing to be the
maximum iterations in T-Base. This is the reason we only iterate 49 times in TBase. When smooth quad meshes on interpolation surface, since re-interpolation is
too expensive, we just test the results after a specified-number of iterations. This
solution of ending iterations is acceptable and valuable in practical applications.
Table 1 Mesh quality results of smoothing planar and surface quad meshes
Mesh
Fig.3
Fig.4
Fig.5
Fig.6
Algorithm
Element quality (0.0~1.0)
0.0~0.2
0.2~0.4
0.4~0.6
0.6~0.8
0.8~1.0
MQ
MSE
Original
0.00%
0.00%
1.13%
6.53%
92.34%
0.9327
0.0860
Vari.1/LS
0.00%
0.00%
0.00%
2.93%
97.07%
0.9514
0.0543
Vari.2
0.00%
0.00%
0.00%
3.15%
96.85%
0.9528
0.0520
Vari.3
0.00%
0.00%
0.00%
3.60%
96.40%
0.9525
0.0535
Original
0.00%
0.00%
0.45%
6.47%
93.08%
0.9277
0.0781
Vari.1/LS
0.00%
0.00%
0.30%
6.47%
93.23%
0.9348
0.0764
Vari.2
0.00%
0.00%
0.45%
5.86%
93.69%
0.9369
0.0722
Vari.3
0.00%
0.00%
0.90%
4.81%
94.29%
0.9357
0.0753
Original
0.00%
0.99%
67.26%
18.81%
12.94%
0.5916
0.1457
LS
0.00%
0.00%
62.45%
26.03%
11.53%
0.6021
0.1380
Vari.1
0.00%
0.00%
0.64%
75.74%
23.62%
0.7392
0.1020
Vari.2
0.00%
0.00%
3.18%
61.10%
35.71%
0.7565
0.1107
Vari.3
0.14%
1.13%
10.04%
48.30%
40.38%
0.7558
0.1356
Original
0.00%
0.00%
2.40%
9.47%
88.12%
0.9191
0.1020
LS
0.00%
0.00%
1.98%
8.01%
90.01%
0.9309
0.0959
Vari.1
0.00%
0.00%
0.14%
5.70%
94.16%
0.945
0.0727
Vari.2
0.00%
0.00%
0.99%
5.04%
93.97%
0.9447
0.0803
Vari.3
0.00%
0.28%
1.37%
4.90%
93.45%
0.9434
0.0902
5 Conclusion
We present a novel iterative smoothing algorithm called T-Base for planar and
surface quad meshes based on virtually dividing a quad element into a pair of triangles by its diagonal. We relocate a node by making all of the incident virtual triangles be equilateral right triangles separately, and then weighting all separate
smoothed positions. According to the determination of weights based on length of
10
G. Mei, J.C.Tipper and N. Xu
relevant edges, three variants of T-Base are produced. The T-Base is applied on
planar and surface quad meshes, and compared with Laplacian smoothing. The
Vari.1 of T-Base is effectively identical to Laplacian smoothing for planar quad
meshes, while Vari.2 and 3 are better. For the quad mesh on a underlying parametric surface, Vari.2 is the best; and Vari.1 is the best for the quad mesh on a interpolation surface. Tests also show that T-Base always converges for planar meshes.
Acknowledgments. This research was supported by the Natural Science Foundation of China
(Grant Numbers 40602037 and 40872183) and the Fundamental Research Funds for the Central
Universities of China.
References
1. Canann, S.A., Tristano, J.R., Staten, M.L. (1998). An approach to combined Laplacian and
optimization-based smoothing for triangular, quadrilateral and quad-dominant meshes. In:
Proceedings of 7th international meshing roundtable, pp. 479–494.
2. Chen, Z., Tristano, J.R., Kwok, W. (2003). Combined Laplacian and optimization-based
smoothing for quadratic mixed surface meshes. In: Proceedings of 12th international meshing roundtable, pp. 361–370.
3. Chiles, J.P., Delfiner, P. (2012). Geostatistics: Modeling Spatial Uncertainty (2nd edition).
Wiley-Interscience.
4. Escobar, J.M., Montenegro, R., Rodriguez, E., Montero, G. (2011). Simultaneous aligning
and smoothing of surface triangulations. Eng. Comput. 27, 17–29.
5. Field, D.A. (1988). Laplacian smoothing and Delaunay triangulation. Commun. Appl. Numer. Methods. 4, 709–712.
6. Freitag, L.A. (1997). On combining Laplacian and optimization-based mesh smoothing techniques. AMD trends in unstructured mesh generation. ASME. 220, 37–43.
7. Herrman, L.R. (1976). Laplacian-isoparametric grid generation scheme. J. Eng. Mech. EM5.
749–756.
8. Hua, L. (1995). Automatic generation of quadrilateral mesh for arbitrary planar domains.
Ph.D. thesis, Dalian University of Technology, China (In Chinese).
9. Jiao, X., Wang, D., Zha, H. (2011). Simple and effective variational optimization of surface
and volume triangulations. Eng. Comput. 27, 81–94.
10. Knupp, P.M. (2010). Introducing the target-matrix paradigm for mesh optimization via nodemovement. In: Proceedings of 19th international meshing roundtable, pp. 67–83.
11. Owen, S.J., Staten, M.L., Canann, S.A., Saigal, S. (1999). Q-Morph: an indirect approach to
advancing front quad meshing. Int. J. Numer. Meth. Eng. 44(9), 1317–1340.
12. Shimada, K. (1997). Anisotropic triangular meshing of parametric surfaces via close packing
of ellipsoidal bubbles. In: Proceedings of 6th international meshing roundtable, pp. 375–390.
13. Shivanna, K., Grosland, N., Magnotta, V. (2010). An analytical framework for quadrilateral
surface mesh improvement with an underlying triangulated surface definition. In: Proceedings of 19th international meshing roundtable, pp. 85–102.
14. Vartziotis, D., Wipper, J. (2009). The geometric element transformation method for mixed
mesh smoothing. Eng. Comput. 25, 287–301.
15. Wang, J., Yu, Z. (2009). A novel method for surface mesh smoothing: applications in biomedical modeling. In: Proceedings of 18th international meshing roundtable, pp. 195–210.
16. Zhou, T., Shimada, K. (2000). An angle-based approach to two-dimensional mesh smoothing. In: Proceedings of 9th international meshing roundtable, pp. 373–384.