Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 1
Jacobi and Gauss Seidel Methods To Solve Elliptic
Partial Differential Equations
Mohamed Mohamed Elgezzon
Higher Institute for Engineering Technology-- Zliten
Abstract
Solving elliptic partial differential equations manually takes
long time. Computer plays an important role to solve this kind
of equations. Finite element method is used to solve elliptic
partial differential equations by reducing these equations to
linear system Ax = b using iterative methods as Jacobi and
Gauss Seidel methods.
These methods are applied for two examples in this paper.
Keywords: iterative methods – elliptic partial differential
equation – finite element method.
الملخص:
انحاسىب حيث اٌ ، حم انًعادالت انتفاضهية انجزئية اننالصة يذوياً تأخذ ولتاً طىيلً
)انكًثيىتز( يهعة دوراً يهًاً نحم هذا اننىع يٍ انًعادالت وتستخذو طزيمة انعنصز
انًحذد نحم انًعادالت انتفاضهية انجزئية اننالصة تىاسطة تخفيض هذه انًعادالت إنى
تىاسطة استخذاو طزق انتكزار يثم طزيمة جاكىتي Ax = bطزق اننظاو انخطي
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 2
ىرلة انثحثية يتى تطثيك انطزيمتيٍ يٍ خلل يثانيٍ وطزيمة جاوس . و في هذه ان
نذراستهًا في هذا انثحث.
Introduction.
Let be a bounded domain in Rd, with boundary . It is
assumed that f and g are continuous on . So a unique solution
exists
- = f(x,y) For(x,y) (1)
u(x,y) = g(x,y) in
= {(x,y) : a < x < b,c < y < d}.
The concept of the finite element is to apply this to equation
(1).
First, the test function v is picked where v satisfies the
boundary condition v = 0 on and multiply the first
equation by v. Finally, we integrate the equation over , using
Green's formula as
∫
= - ∫
v ds + ∫
.
A finite element discretization of (1) is based on the weak
formulation:[2] seek u V = [H
( )]
d such that.
A(u, v) = (f,v) V (2)
Where a(u, v) = ∫
, (f,v) = ∫
The approximate solution uh Vh V satisfies
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 3
a(uh, v) = (f,v) Vh (3)
we define uh = ∑ ui i (x), thus, we substitute uh in the
following equations.[3]
a(uh, k) = (f, k) k = 1, …, N
We obtain
∑ ui .a( I, k) = (f, k) k = 1, …, N
(*)
We could write the formula in (*) as:
Ax = b. (4)
Where A Rn×n
is symmetric matrix, b Rn , and x R
n
is the request.
To solve (4) we use the iterative technique as follows
solution[4]
Xk+1
= Txk + C, k= 0,1, ….., (5)
Where x0 is given
For the convergence it is required that for all x0 R
n the
vector sequence produced by the iteration (5) should be
convergent to the same vector x* R
n. And x
* would be
approximate solution of x in (4), that is, Ax* = b.
The following two theorems are needed for the seek of
completeness.[5]
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 4
Theorem 1. Assume that (M,N) is a splitting of the regular
matrix A, such that T = M-1
N is convergent matrix. Then the
iterative method (5) based on this splitting is convergent to the
solution of the system of linear algebraic equations Ax = b.
Theorem 2. Assume that A is monotone matrix, Then any
regular splitting of A generates a convergent iterative method,
that is, if (M,N) is a regular splitting of A then p(M-1
N) < 1.
In the following, some well-known iterative methods are
considered to the solution of (4) such as, Jacobi method and
Gauss Seidel method.
(1) Jacobi iterative method (JIM).
The Jacobi iteration of the form:
X
=
bi - ∑
aij X
i = 1,2,……,n,
k= 0,1,2,….. (6)
Is considered, where it is assumed that aii 0. Introducing the
notations[6]
D = diag A;
-U = upper triangular part of A;
-L = lower triangular part of A;
We have the obvious relation
A = D – U – L.
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 5
Then the Jacobi iterative method (6) can be rewritten in the
matrix form
Xk+1
= D-1
(b + (U + L) xk), (7 )
That is,
Xk+1
= D-1
(U+L)xk + D
-bb.
Obviously, this is a BIM with GJ = D-1
(U+L) and cJ = D-1
b.
On the other hand,
Dxk+1
= (U+L) XK + b.
That is, if MJ = D and NJ = U+L is defined then
MJ xk+1
= NJ xk + b.
Moreover, the relation MJ – NJ = D – U – L = A holds.
Consequently, the iterative method of the form (7) is BIM
based on the splitting
A = MJ – NJ.
(2) Gauss Seidel iterative method (GSIM).
The Gauss Seidel iteration of the form
Xik+1
=
bi - ∑
aij x Xj
k+1 - ∑ aij x Xj
k i=
1,2,….n, k= 0,1,2 …. (8)
The Gauss Seidel method can be rewritten in the matrix form
Dxk+1
= Lxk+1
+ Uxk + b.
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 6
It can be remarked that the main difference between the Gauss-
Seidel method and the Jacobi method is the following:[7][8]
Using the Jacobi method for the computation of the new
iteration the previous approximations are applied in each
equation, while in Gauss Seidel the new already computer in
more suitable form is rewritten as
(D - L)xk+1
= Uxk + b. (9)
Introducing the notations
MGS = D – L, NGS = U,
We obtain
MGS – NGS = D – L – U = A.
That is, MGS – NGS is a splitting of A. Then (9) can be rewritten
in the form
MGSXK+1
= NGSXK + b; or
Xk+1
= TGSXK + CGS;
Where, we have used the notations
TGS = MGS-1
NGS = (D-L)-1
U, CGS = MGS-1
b = (D-L)-1
b.
Example 1
Consider the follows problem with boundary conditions and
given domain
- = 2 – (x2 + y
2) 0 x,y 1
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 7
u(x,y) = 0 when x= 1, y = 1;
u(x,y) =
(1-y
2) when x=0;
u(x,y) =
(1-x
2) when y=0;
Example 2
Consider the follows problem with boundary conditions and
given domain
- = 2 – (x2 + y
2) 0 x,y 1
u(x,y) = 0 in boundary
Briefly the solution of the given problem by theoretical
methods is applied as defining step size h and partitioning the
intervals [a,b] and [c,d] into n equal parts and the finite
element method.[9]
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 8
Figure 1. The shape of example 1 where n=25
Figure 2. The final shape of matrix A of example 1 where n= 10
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 9
For example 1 Ax = b when n = 2
A=
[ ]
, b =
[
]
x =
[
]
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 11
Figure 3. The shape of example 2 where = 25
Figure.4. The final shape of matrix A of example 2 where n = 20
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 11
For example 2 Ax = b when n = 2
=
[ ]
, b =
[
]
x =
[
]
The results of numerical tests of the Jacobi an gauss seidel
iterative methods for example 1 and example 2 are given in the
following tables:
Table 1 Iteration and residual of matrix A by Jacobi and Gauss
Seidel method of example 1
20/1 10/1 5/1 h
Residual Iteration Residual Iteration Residual Iteration
9.931e-4 525 9.875e-4 131 9.592e-4 32 JIM
9.779e-4 288 9.590e-4 51 6.611e-4 18 GSIM
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 12
Table 2 Iteration and residual of matrix A by Jacobi and Gauss
Seidel method of example 2
20/1 10/1 5/1 h
Residual Iteration Residual Iteration Residual Iteration
9.931e-4 525 9.868e-4 109 9.965e-4 22 JIM
9.779e-4 288 9.670e-4 22 7.071e-4 12 GSIM
References
[1]. Aleyan O. A.: On matrix splitting and application into
iterative methods for linear systems An Academic. Intellectual,
Cultural, Comprehensive and Arbitrated Journal Issued by the
Faculty of Arts and Sciences in Zliten, Al- Merqab. Issue No.
18 2009 (JUNE) 1377.
[2]. Berman, A. and plemmons, R. Nonnegative matrices in
the mathematical sciences, Academic press, New York, 1979.
[3]. Hom, R.A. and Johnson, C.R. Matrix analysis, Cambridge
University press, Cambridge, 1986.
[4]. Ortega, J.M. and Rheinboldt, W.C. Iterative solution of
linear systems, plenum press, New York, 1988.
[5]. Miroslav Fiedler., Special matrices and their applications
in numerical mathematics, Kluwer, 1986.
[6]. Miroslav Fiedler and Vlastimil ptak, On matrices with
non- positive off- diagonal elements and positive principal
minors, Czechosl. Math. Journal (87) 12, 1962, pp 382-400.
Volume 15 العذد
2018October اكتوبر
International
Science and Technology Journal
المجلة الدولية للعلوم والتقنية
حقوق الطبع محفوظة للمجلة الدولية للعلوم والتقنية
Copyright © ISTJ 13
[7]. Varga, R.S. Matrix iterative analysis, prentice Hall, New
York, 1962.
[8]. Young, D. Iterative solution of large linear systems,
Academic press, New York, 1977.
[9]. Richard L. Burden and J. Donglas Faires Numerical
analysis, third edition prindle, weber & Schmidt, Boston, 1985.