XXI Congreso de Ecuaciones Diferenciales y Aplicaciones ´ tica Aplicada XI Congreso de Matema Ciudad Real, 21-25 septiembre 2009 (pp. 1–8)
Multigrid finite element methods on semi-structured triangular grids F.J. Gaspar1 , J.L. Gracia1 , F.J. Lisbona1 , C. Rodrigo1 1
Applied Mathematics Department, University of Zaragoza, Pedro Cerbuna 12, 50009 Zaragoza, Spain. E-mails:
[email protected],
[email protected],
[email protected],
[email protected].
Keywords:
Geometric multigrid, Fourier analysis, triangular grids
Abstract We are interested in the design of efficient geometric multigrid methods on hierarchical triangular grids for problems in two dimensions. Fourier analysis is a well-known useful tool in multigrid for the prediction of two-grid convergence rates which has been used mainly for rectangular–grids. This analysis can be extended straightforwardly to triangular grids by using an appropriate expression of the Fourier transform in a new coordinate systems, both in space and frequency variables. With the help of the Fourier Analysis, efficient geometric multigrid methods for the Laplace problem on hierarchical triangular grids are designed. Numerical results show that the Local Fourier Analysis (LFA) predicts with high accuracy the multigrid convergence rates for different geometries.
1.
Introduction
Multigrid methods [3, 7, 8] are among the most efficient numerical algorithms for solving the large algebraic linear equation systems arising from discretizations of partial differential equations. In geometric multigrid, a hierarchy of grids must be proposed. For an irregular domain, it is very common to apply a refinement process to an unstructured input grid, such as Bank’s algorithm, used in the codes PLTMG [1] and KASKADE [5], obtaining a particular hierarchy of globally unstructured grids suitable for use with geometric multigrid. A simpler approach to generating the nested grids consists in carrying out several steps of repeated regular refinement, for example by dividing each triangle into four congruent triangles [4]. An important step in the analysis of PDE problems using finite element methods (FEM) is the construction of the large sparse matrix corresponding to the system of equations to be solved. For discretizations of problems defined on structured grids with constant 1
F.J. Gaspar, J.L. Gracia, F.J. Lisbona, C. Rodrigo
coefficients, explicit assembly of the global matrix for the finite element method is not necessary, and the discrete operator can be implemented using stencil-based operations. For the previously described hierarchical grid, one stencil suffices to represent the discrete operator at nodes inside a triangle of the coarsest grid, and standard assembly process is only used on the coarsest grid. Therefore, this technique is used in this paper since it can be very efficient and is not subject to the same memory limitations as unstructured grid representation. LFA (also called local mode analysis [2]) is a powerful tool for the quantitative analysis and design of efficient multigrid methods for general problems on rectangular grids. Recently, a generalization to structured triangular grids, which is based on an expression of the Fourier transform in new coordinate systems in space and frequency variables, has been proposed in [6]. In that paper some smoothers (Jacobi, Gauss–Seidel, three–color and block–line) have been analyzed and compared by LFA, the three–color smoother turning out to be the best choice for almost equilateral triangles. The organization of the paper is as follows. In Section 2 the way in which Fourier analysis can be extended to multigrid methods for discretizations on regular non-rectangular grids is explained. The proposed relaxation methods are introduced in Section 3. Some Fourier analysis results for Poisson problem are presented in Section 4 in order to justify the choice of the smoothers, and finally, in Section 5 a numerical experiment is performed to show the efficiency of the proposed algorithm.
2.
Fourier analysis on non-orthogonal grids
This analysis is based on the multi-dimensional Fourier transform using coordinates in an orthonormal basis of R2 . We aim for discretizations on triangular grids in the twodimensional case, so the key to accomplishing this is to introduce the two-dimensional Fourier transform using coordinates in non-orthogonal bases fitting the new structure of the grid. Let {e′1 , e′2 } be a unitary basis of R2 , 0 < γ < π the angle between the vectors of the basis and {e′′1 , e′′2 } its reciprocal basis, i.e., e′i ·e′′j = δij , 1 ≤ i, j ≤ 2, where δij is Kronecker’s delta. If {e1 , e2 } is the canonical basis, we will denote by y = (y1 , y2 ), y′ = (y1′ , y2′ ) and y ′′ = (y1′′ , y2′′ ) the coordinates of a point in the bases {e1 , e2 }, {e′1 , e′2 } and {e′′1 , e′′2 }, respectively. By applying variable changes x = F(x′ ) and θ = G(θ ′′ ) to the usual Fourier transform formula, the Fourier transform with coordinates in a non-orthogonal basis results in Z ′′ sin γ ′ ′′ u ˆ(G(θ )) = e−i G(θ )·F(x ) u(F(x′ )) dx′ . 2π R2 In a similar way, the back transformation formula is given by Z ′′ 1 ′ ′ ei G(θ )·F(x ) u ˆ(G(θ ′′ )) dθ ′′ . u(F(x )) = 2π sin γ R2 Since the new bases are reciprocal bases, the inner product G(θ ′′ ) · F(x′ ) is given by θ1′′ x′1 + θ2′′ x′2 . Now using the previous expressions, a discrete Fourier transform for nonrectangular grids can be introduced. Let h = (h1 , h2 ) be a grid spacing and Gh = {x′ = (x′1 , x′2 ) | x′i = ki hi , ki ∈ Z, i = 1, 2} a uniform infinite grid oriented in the directions e′1 and e′2 . 2
Multigrid finite element methods on semi-structured triangular grids
Now, for a grid function uh , the discrete Fourier transform can be defined by u ˆh (θ ′′ ) =
h1 h2 sin γ X −i(θ1′′ x′1 +θ2′′ x′2 ) e uh (x′ ), 2π ′ x ∈Gh
where θ ′′ = (θ1′′ , θ2′′ ) ∈ Θh = (−π/h1 , π/h1 ] × (−π/h2 , π/h2 ] are the coordinates of the point θ1′′ e′′1 + θ2′′ e′′2 in the frequency space. Its back Fourier transformation is given by 1 uh (x ) = 2π sin γ ′
Z
′′ ′
′′ ′
ei(θ1 x1 +θ2 x2 ) u ˆh (θ ′′ )dθ ′′ .
(1)
Θh
From (1), each discrete function uh (x′ ) with x′ ∈ Gh , can be written as a formal linear ′′ ′ ′′ ′ combination of the discrete exponential functions ϕh (θ ′′ , x′ ) = eiθ1 x1 eiθ2 x2 , called Fourier modes, which give rise to the Fourier space, F(Gh ) = span{ϕh (θ ′′ , ·)|θ ′′ ∈ Θh }. Due to the fact that the grid and the frequency space are referred to as reciprocal bases, the Fourier modes have a formal expression, in terms of θ ′′ and x′ , similar to those in Cartesian coordinates. Therefore, the Local Fourier analysis on non–rectangular grids can be performed straightforwardly.
Figure 1: A regular triangular grid on a fixed coarse triangle T and its extension to an infinite grid. Let Th be a regular triangular grid on a fixed coarse triangle T ; see left picture of Figure 1. Th is extended to the infinite grid given before, where e′1 and e′2 are T unit vectors indicating the direction of two of the edges of T , and such that Th = Gh T , see right picture of Figure 1. Neglecting boundary conditions and/or connections with other neighboring triangles on the coarsest grid, the discrete problem Lh uh = fh can be extended to the whole grid Gh . It is straightforward to see that the grid–functions ϕh (θ ′′ , x′ ) are formal eigenfunctions of any discrete operator Lh which can be given in stencil notation. Using standard coarsening, (H = (H1 , H2 ) = (2h1 , 2h2 )), high and low frequency components on Gh are distinguished in the way that the subset of low frequencies is ΘH = (−π/H1 , π/H1 ] × (−π/H2 , π/H2 ], and the subset of high frequencies is Θh \ ΘH . From these definitions, LFA smoothing and two-grid analysis can be performed as in rectangular grids, and smoothing factors for the relaxing methods µ, and two-grid convergence factors ρ, which give the asymptotic convergence behavior of the method, can be well defined. 3
F.J. Gaspar, J.L. Gracia, F.J. Lisbona, C. Rodrigo
3.
Relaxing methods
It is well–known that multicolor relaxation procedures are very efficient smoothers for multigrid methods. Besides, they are well suited for parallel computation. Nevertheless, they have the disadvantage that the Fourier components of Lh are not eigenfunctions of the relaxation operator, what makes their analysis more complicated. Three-color smoother and some line-wise smoothers are proposed as relaxing methods. These smoothers appear as a natural extension to triangular grids of some smoothers widely used on rectangular grids, as red-black Gauss-Seidel and line-wise relaxations of zebra type. To apply three-color smoother, the grid associated with a fixed refinement level η of a triangle T of the coarsest triangulation, GT,h = {x′ = (x′1 , x′2 ) | x′j = kj hj , kj ∈ Z, j = 1, 2, k1 = 0, . . . , 2η , k2 = 0, . . . , k1 }, (2) is split into three disjoint subgrids, GiT,h = {x′ = (x′1 , x′2 ) ∈ GT,h | x′j = kj hj , j = 1, 2, k1 + k2 = i (mod 3)},
i = 0, 1, 2,
each of them associated with a different color, as shown in Figure 2a), so that the unknowns of the same color have no direct connection with each other. The complete three-color smoothing operator is given by the product of three partial operators, Sh = Sh2 Sh1 Sh0 . In each partial relaxation step, only the grid points of GiT,h are processed, whereas the remaining points are not treated. For triangular grids, three different zebra smoothers can be defined on a triangle. We will denote them as zebra-red, zebra-black and zebra-green smoothers, since they correspond to each of the vertices of the triangle which can be associated with these colors. In Figure 2b) the zebra-type smoother corresponding to the red vertex is shown. They consist of two half steps. In the first half-step, odd lines parallel to the edges of the triangle are processed, whereas even lines are relaxed in the second step, in which the updated approximations on the odd lines are used. 1
RED POINTS BLACK POINTS
R
2
GREEN POINTS
1 2 1 2 1 2 1
a)
G
B
b)
Figure 2: a) Three-color smoother. b) Zebra-red smoother: approximations at points marked by 1 are updated in the first half-step of the relaxation, those marked by 2 in the second. In order to perform these smoothers, a splitting of the grid GT,h into two different odd subsets Geven T,h and GT,h is necessary. For each of the zebra smoothers these subgrids are 4
Multigrid finite element methods on semi-structured triangular grids
defined in a different way, and the corresponding distinction between them is specified in Table 1, where k1 , and k2 are the indices of the grid points given in (2). Thus, these three Relaxation Zebra-red Zebra-black Zebra-green
Geven T,h k2 even k1 even k1 + k2 even
Godd T,h k2 odd k1 odd k1 + k2 odd
odd Table 1: Characterization of subgrids Geven T,h and GT,h for different zebra smoothers.
smoothers ShzR , ShzB and ShzG are defined by the product of two partial operators. For example, if zebra-red smoother is considered, ShzR = ShzR−even ShzR−odd where ShzR−even is zR−odd in charge of relaxing the points in Geven is responsible for the points in Godd T,h and Sh T,h . These smoothers are preferred to the lexicographic line-wise Gauss-Seidel because in spite of having the same computational cost, their smoothing factors are better than those of lexicographic line-wise relaxations as we will see further on.
4.
Fourier analysis results for Laplace operator
To analyze the influence of grid-geometry on the properties of multigrid methods, in this section we apply the LFA to discretizations of the Laplace operator by linear finite elements on a regular triangulation of a general triangle. The geometric parameters that we consider are two angles of the triangle, denoted here by α and β and the distance h1 between them. The components of the coarse–grid correction are the standard coarsening, the natural coarse grid discretization, and as transfer operators we consider linear interpolation and 1 h ⋆ ) ) as the restriction. its adjoint (IhH = (IH 4 In Tables 2, 3 and 4 we show the smoothing factors µν1 +ν2 and the two–grid convergence factors ρ for triangles with angles α = β = 600 , α = 900 , β = 450 and α = β = 750 respectively, and for different pre–smoothing (ν1 ) and post–smoothing (ν2 ) steps. We also display in these tables the experimentally measured W –cycle convergence factors, ρh , using nine levels of refinement, obtained with a right–hand side zero and a random initial guess to avoid round-off errors. We have chosen W –cycles to verify two–grid convergence factors since they run at similar rates to the two–grid rates but at less cost. ∗ √ In the case of Jacobi relaxation, we have used the optimal parameters w = 12/(15 − 2 2) for equilateral triangles, which can be analytically calculated, and the well–known w∗ = 0,8 for the five–point discretization of the Laplace operator on rectangular grids. For the last triangle, we have performed an LFA showing that the optimal value is w∗ = 1. From these tables, we can observe that the convergence factors are very well predicted by LFA in all cases. These convergence factors are improved when an equilateral triangle is considered, and we point out the exceptional convergence factors in Table 2 associated with the three-color smoother. On the other hand, the highly satisfactory factors obtained for equilateral triangles worsen in Table 4,where an isosceles triangle with common angle 750 is considered, showing that none of these point-wise smoothers is robust over all angles. It can be seen that the 5
F.J. Gaspar, J.L. Gracia, F.J. Lisbona, C. Rodrigo
ν1 , ν2 1, 0 1, 1 2, 1
Damped Jacobi µν1 +ν2 ρ ρh 0.478 0.437 0.447 0.230 0.217 0.217 0.111 0.102 0.102
Gauss-Seidel µν1 +ν2 ρ ρh 0.416 0.328 0.325 0.173 0.124 0.123 0.072 0.070 0.069
Three-colors µν1 +ν2 ρ ρh 0.230 0.134 0.136 0.053 0.039 0.039 0.029 0.015 0.015
Table 2: LFA results and measured W –cycle convergence rates ρh for equilateral triangles.
ν1 , ν2 1, 0 1, 1 2, 1
Damped Jacobi ρ ρh 0.600 0.600 0.600 0.360 0.360 0.359 0.216 0.260 0.259
µν1 +ν2
Gauss-Seidel ρ ρh 0.500 0.483 0.480 0.250 0.273 0.274 0.125 0.181 0.182
µν1 +ν2
Three-colors ρ ρh 0.298 0.285 0.283 0.089 0.165 0.160 0.031 0.115 0.112
µν1 +ν2
Table 3: LFA results and measured W –cycle convergence rates ρh for α = 900 , β = 450 .
ν1 , ν2 1, 0 1, 1 2, 1
Jacobi ρ 0.773 0.766 0.597 0.600 0.462 0.454
µν1 +ν2
ρh 0.766 0.599 0.453
Gauss-Seidel ρ ρh 0.637 0.631 0.627 0.405 0.393 0.391 0.258 0.242 0.240
µν1 +ν2
Three-colors ρ ρh 0.597 0.588 0.587 0.356 0.346 0.345 0.212 0.203 0.202
µν1 +ν2
Table 4: LFA results and measured W –cycle convergence rates ρh for α = β = 750 .
6
Multigrid finite element methods on semi-structured triangular grids
ν1 , ν2 1, 0 1, 1 2, 1
Equilateral ν 1 µ +ν2 ρ 0.239 0.111 0.053 0.042 0.033 0.027
Isosceles µν1 +ν2 0.125 0.052 0.033
(75o ) ρ 0.097 0.043 0.027
Isosceles µν1 +ν2 0.125 0.052 0.033
(85o ) ρ 0.122 0.051 0.032
Table 5: LFA results obtained with zebra-type smoothers for different triangles. optimal values correspond to the case of almost equilateral triangles and the convergence factors deteriorates when any of the three angles becomes smaller. To overcome this difficulty we have designed three block–line (or coupled) Gauss– Seidel smoothers of zebra-type, introduced in Section 3. For almost equilateral triangles the smoothing and two–grid factors for the point-wise Gauss–Seidel and the zebra-type smoothers are quite similar, and we have obtained different results for non–equilateral triangles. Therefore, these smoother perform very well for small values of its corresponding angle. Then, for each acute triangle we can always activate a zebra–type smoother to have an optimal two–grid convergence factor. This behavior can be seen in Table 5.
5.
Numerical experiment
We consider the model problem −∆u = f. The right-hand side and the Dirichlet boundary conditions are such that the exact solution is u(x, y) = sin(πx) sin(πy). This problem is solved in an A-shaped domain, as it is shown in Figure 3a), and the coarsest mesh is composed of sixty triangles with different geometries, which are also depicted in the same figure. Nested meshes are constructed by regular refinement and the grid resulting after refining each triangle twice is shown in Figure 3b). 0.8
0.8
0.8
0.7 0.6
0.6
0.6 Three-color smoother
0.5 0.4
Block-line smoother
0.4
0.4
0.3 0.2 0
0.2
0.1
Y
Y
Y
0.2 0
0
-0.1 -0.2
-0.2
-0.2
-0.3 -0.4
-0.4
-0.4
-0.5 -0.6
-0.6 -0.4
-0.2
0
0.2
X
a)
0.4
0.6
0.8
1
-0.6 -0.4
-0.2
0
0.2
0.4
X
b)
0.6
0.8
1
-0.5
0
0.5
1
X
c)
Figure 3: a) Computational domain and coarsest grid, b) Hierarchical grid obtained after two refinement levels, c) Different smoothers used in each triangle of the coarsest grid The considered problem has been discretized with linear finite elements, and the corresponding algebraic linear system has been solved with the geometric multigrid method proposed in previous sections, that is, we choose the more suitable smoother for each 7
F.J. Gaspar, J.L. Gracia, F.J. Lisbona, C. Rodrigo
triangle of the coarsest triangulation, as we can see in Figure 3c), depending on the results predicted by LFA. From the local convergence factors predicted by LFA on each triangle, a global convergence factor of 0,144 is predicted by taking into account the worst of them. In order to see the robustness of the multigrid method with respect to the space discretization parameter h, in Figure 4 we show the convergence obtained, with an F(1,1)cycle and the multigrid method proposed, for different numbers of refinement levels. The initial guess is taken as u(x, y) = 1 and the stopping criterion is chosen as the maximum residual to be less than 10−6 . Besides an asymptotic convergence factor about 0,143 has been obtained with a right–hand–side zero and a random initial guess. Note that Fourier two–grid analysis predicts the convergence factors with a high degree of accuracy. 1e+008 6 levels 7 levels 8 levels 9 levels 10 levels
1e+006
maximum residual
10000
100
1
0.01
0.0001
1e-006
1e-008 0
5
10
15
20
25
30
35
cycles
Figure 4: Multigrid convergence F(1,1)-cycle for the model problem.
Acknowledgements This research was partially supported by the project MEC/FEDER MTM2007-63204 and the Diputaci´ on General de Arag´ on. References [1] R. Bank, PLTMG: A software package for solving elliptic partial differential equations. Users’ Guide Version 10.0, Department of Mathematics, University of California, 2007. [2] A. Brandt, Multi-level adaptive solutions to boundary-value problems, Math. Comput., 31 (1977), 333–390. [3] A. Brandt, Multigrid techniques: 1984 guide with applications to fluid dynamics, GMD-Studie Nr. 85, Sankt Augustin, Germany, 1984. [4] B. Bergen, T. Gradl, F. H¨ ulsemann, U. Ruede, A massively parallel multigrid method for finite elements, Comput. Sci. Eng., 8 (2006), 56–62. [5] P. Deuflhard, P. Leinenand, H. Yserentant, Concepts of an adaptive hierarchical finite element code, Impact Comput. Sci. Engrg., 1 (1989), 3–35. [6] F.J. Gaspar, J.L. Gracia and F.J. Lisbona, Fourier analysis for multigrid methods on triangular grids, SIAM J. Sci. Comput., 31 (2009), 2081–2102. [7] W. Hackbusch, Multi-grid methods and applications, Springer, Berlin, 1985. [8] U. Trottenberg, C.W. Oosterlee, A. Sch¨ uller. Multigrid Academic Press, New York, 2001.
8