Two Full Multigrid Algorithms in Cartesian and Polar
Two Full Multigrid Algorithms in Cartesian and Polar
Abstract
In this paper we introduce two full multigrid algorithms in a Cartesian and a Polar coor-
dinate system that have been modified to treat the elliptic partial differential equations with
a mixed derivative term, in the two dimensional space in a quarter of a unit circle, special
modification for the points in the neighborhood of the curved boundary has been done. An
advantage of the two algorithms is that the extension from two to three space dimensions is
straightforward. numerical examples have been given.
Index terms— Multigrid method, Numerical Analysis, Elliptic PDE, Cartesian and Polar Co-
ordinate Systems.
1 Full Multigrid Algorithms in Cartesian Coordinates
1.1 Introduction
Consider the general linear elliptic partial differential equation:
2
LU = AUxx + 2BUxy + CUyy + F = 0 ∈Ω⊂R (1.1a)
2
with Dirichlet boundary conditions U = F ∈ ∂Ω ⊂ R (1.1b)
where ∂Ω is a quarter of a unit circle. p A difference approximation Lh of L in equation 1.1a
is said to be of order p if Lh(U) = O(h ), where h is the mesh size. In our case p = 2, so we
shall use the 6-point difference equation to the mixed derivative term Uxy to avoid the absent
points in our grids because of the curved boundary see [3] and [4]
∗aDepartment of Basic Science, Modern Academy for Engineering and Technology in Maadi, Cairo, Egypt.
osama996@hotmail.com
1
2. Curved boundary points: These points are points that laying near the curved boundary:
see [4] and Figure 1 When the boundary is curved and intersects the rectangular grid at
points that are not grid points, so we shall
give the finite difference approximation to the derivatives at the points in the neighborhood
of the curved boundary thus:
2 2 2
U h 2 u j 1, j u i 1, j u
xx
1 (1 ) i , j
2 2 2 (1.4)
U h 2 u i , j 1 u i , j 1 u i, j
yy
(1 ) 1
−2
Uxy = h (ui,j − ui−1,j − ui,j−1 + ui−1,j−1)
substituting 1.4 into 1.1a we get a system of linear equations for the points in the
neighborhood of the curved boundary given by:
2 ai , j a 2 ci, j
u i 1 , j 2 i , j b i , j u i 1 , j u i , j 1
1 1 1
ci, j
2 bi, j
a c
u i , j 1 2 i , j i , j b i , j
u i , j 2 b i , j u i 1 , j 1 h 2 f i , j
(1.5)
1
where 1 i,j N – 1 , h 1
, N is the number of interior points in each direction
N 1
h, h are the distances from the point in the neighborhood of the boundary and the
curve boundary in direction of the x-coordinate and the y-coordinate respectively.
2
Figure 2: FMG V(2, 1)
u
h
2 i 1 , 2 j
1
h
u
2h
i, j
hu
2h
i 1 , j
for odd points in the x direction, (point 14)
u
h
1
u
2h
hu
2h for odd points in the direction, (point 19) (1.7)
2 i , 2 j 1
h i, j i , j 1
3
to the rule: I h2 h R h R 2 h where the components of Rij2 h of R 2 h are given by the following
two schemes- see [2] and [3]:
(a) Half-weight: If B = 0 in equation 1.1a, we use the red-black Gauss-Seidel relaxation
it is better to use the half-weight operator since the residual at the black (odd) points
must vanish and the stencil of the half-weight operator takes the form:
2h
0 1 0
1 ( 1.8 )
1 1
2h
I h
8
4
0 1 0 h
2h
1 2 1
1
2 ( 1.9 )
2h
I h
16
2 4
1 2 1 h
2
AUxx + 2BUxy + CUyy + F = 0 ∈Ω⊂R
1 2xy
Uexact = e2xy , F (x,y) = 4(x2 + y2 + xy + )e (1.11a)
2
Uexact = sin(3x + y), F (x, y) = −13 sin(3x + y)
(1.11b)
3. Test Problem 3: Let A = C = B = 1, using full-weight restriction:
1 2xy
Uexact = e2xy , F (x,y) = 4(x2 + y2 + xy + )e (1.12a)
Uexact = sin(3x + y), F (x, y) = −13 sin(3x + y) 2 (1.12b)
4
Test Problem 1: Equation 1.10a and equation 1.10b
5
Test Problem 3: Equation 1.12a and equation 1.12b
1 1
( 1 + sin cos ) Urr + ( 1 – sin cos ) Ur + 2 ( 1 – sin cos ) U
r r
1
r2
1
sin 2 cos 2 U cos 2 sin 2 U r F ( r , ),
r
(2.1)
U g (2.2)
6
Figure 4 : Descritization of a quarter of a unit circle
substitute these values in equation 2.1 we get the following system of linear equations:
D1 B1 0 ... 0
C u1 b1
1 D 1 B1 ... 0 u b
0 C D B1 0 2 2 ( 2.4 )
1 1
... ... ... ... 0
0 ... C D B1
1 1
u N 1 b N 1
0 ... 0 C1 D 1
1 1
where 1 I, j N – 1 , h , = , are the mesh size and
N 1 2 N 1
D1 = 2 1 1 sin 2 1 1
1 sin 2
2 i 2
2
B1= 1 1 cos 2 ( 2.5 )
1 sin 2
i 2 2 2 i 2
C1= 1 1 cos 2
1 sin 2
i 2 2 2 i 2
where N is the number of interior points in each direction
7
( b ) Radial points
u
h
2 i 1, 2 j
1
2
u h
2 i 1 , 2 j
u
2h
i 1 , j
(points 4 , 6) (2.7)
( c ) Angle points
u
h
2 i , 2 j 1
1
4
u h
2 i 1, 2 j
h h
u 2 i 1, 2 j u 2 i 1, 2 j 2 u 2 i 1, 2 j 2
h
(points 2 , 8) (2.8)
u
h
2 i 1 , 2 j 1
1
4
u 2h
i, j
2h 2h 2h
u i 1 , j u i , j 1 u i 1 , j 1 (points 3, 9) (2.9)
u
h
2 i 1, 2 j 1
1
3
u 2h
i, j
2h
ui 1, j ui 1, j 1
2h
(points 1, 7) (2.10)
3. Restriction operator I h2 h :It takes fine grid vectors Rh defined on Gh and produces coarse
grid vectors R2h defined on G2h using I h2 h R h = R 2 h since we use the line relaxation for
every grid it is better to use the full-weight restriction operator whose stencil takes the
form:
2h
s 1
1 i 2
i 2
(2.11)
2h
1 21 1 2 1
1
21
1
I h
1
2i i 2
2i
8 i
i
1 2 1
i i 2
2
h
1. Test Problem 1:
0.5r2 sinθcosθ 2
Uexact = 3e + 2r sin θ cos θ (2.12)
2 (2.14)
3. Test Problem 3: Uexact = sin (r sinθ cos θ + 1)
4. Test Problem 4:
6 3 4 2 2
Uexact = r (sin θ cos θ) + 3r (sin θ cos θ) +6r (sin θ cos θ) + 2 (2.15)
5. Test Problem 5:
2 sinθcosθ
Uexact = e r ( ) (2.16)
8
Test Problem 1: Equation 2.12
9
Test Problem 5: Equation 2.16
3 Conclusion
The implementation of an elliptic partial differential equation in the 2-dimensional space in a
quarter of a unit circle have been shown to be an efficient method. The convergence rate of the
method in Cartesian coordinates has been improved as we increase the number of relaxation
steps before coarse grid correction, in the polar coordinates we should use the W-cycle instead
of V-cycle to achieve almost the same or a little bit better convergence rate than that of the
method in Cartesian coordinates. The other advantage of the two algorithms in Cartesian and
in Polar coordinates is that the extension from two to three space dimensions is straightforward.
References
[1] Brandt A., “Multi-level adaptive technique (MLAT) for fast numerical solution to bound-
ary value problem,” Springer, Berlin - 1973.
[2] Briggs L., “A Multigrid Tutorial,” Society for Industrial and applied mathematics - 2000.
[3] Hackbucsh W., “ Multigrid Methods and applications,” Springer Berlin Heidelberg Berlin,-
2003.
[4] G. D. Smith, “ Numerical Solution of Partial Differential Equations: Finite Difference
Methods.”, Oxford Applied Mathematics & Computing Science Series, - January 16, 1986.
[5] McCormick S. F., “Mulitigrid Methods ,” SIAM, Phildelphia-Pennsylvania - 1987
[6] Briggs W. L, “Mulitigrid tutorial ,” SIAM, Phildelphia-Pennsylvania - 1987
[7] John D. Anderson, Jr. “Computational Fluid Dynamics: The Basics with Applications
”, McGraw-Hill Inc, - 1995.
[8] J.E. Dennis and R.B. Schnabel, “Numerical Methods for Unconstrained Optimization
and Nonlinear Equations”, SIAM Books, Philadelphia, - 1996.
[9] J.C. Tannehill, D.A. Anderson, “Computational Fluid Mechanics and Heat Transfer, Sec-
ond Edition ”, Series in Computational and Physical Processes in Mechanics and Thermal
Sciences. , - April 1, 1997.
[10] W. L. Briggs, V. E. Henson, and S. F. McCormick, “A Multigrid Tutorial, Second Edition”
SIAM Books, Philadelphia - 2000
[11] Bobby Philip, “An Introduction to Multigrid Techniques” The Institute for Mathematics
and Its Applications, Minnesota - January 11, 2008.
10