THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL...
Transcript of THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL...
355
THE APPLICATIONS OF CG AND PCG ON
ELLIPTIC PARTIAL DIFFERENTIAL
EQUATIONS SOLVED BY FINITE ELEMENT
METHOD
Dr. Omar Ali Aleyan
Abstract
We apply the CG and PCG methods to the linear system
.bHx which was derived from elliptic partial differential
equation by using finite element method in order to get the
number of iteration and residual. Two examples will be used
for implications.
Key words
CG and PCG methods, Elliptic partial differential
equations, finite element methods.
Introduction
Let be a bounded domain in ,R d with boundary .
ـــــــــــــــــــــــــــــــــــــــ Mathematics Department, Faculty Of Education, University Of AL Asmarya.
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ435
It is assumed that f and g are continuous on . So a unique
solution exists
y)f(x, u For andy)(x,
u(x,y)=g(x,y) in
.dycb,xa:y)(x,
for the basis of the finite element approximation of (1).
First the test function v is picked where v satisfies the
boundary condition 0v on . Multiply the first equation by
v, and integrate the equation over , and the Green's formula,
is used
dx, vu ds v
n
udx u v
A finite element discretization of (1) is based on the
weak formulation: seek d1
0 )](H[Vu such that
Vv v)(f,p)b(v,v)a(u,
where dx vu v)a(u,
, dx vfv)(f,
.
the approximate solution VVu hh satisfies
hh Vv v)(f,v),a(u
If
N
1i
iih )x(uu and substitutes them in the equations
Dr. Omar Ali Aleyan
31السنة العدد 434
N1,...,k )(f,),a(u kkh
It results in
N1,....,k )(f,),.a(u k
N
1i
kii
It can be rewritten in the following form
bHx .
Here nnRH is the symmetric matrix ,Rb n and for the
solution nRx is obtained
In this paper we will use conjugate gradient method
and preconditioned conjugate gradient methods to solve the
system of linear equations.
bHx
[1] Conjugate gradient method. (CG)
We will use the conjugate gradient method to solve the
system of linear algebraic equations
bHx
We choose an initial approximation0x , put
00 Hxbr , 00 rp
and compute
j
T
j
j
T
j
jHpp
rra ,
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ435
jjj1j paxx
,Hparr jjj1j
j
T
j
1j
T
1j
jrr
rrb
,
.pbrp jj1j1j
[2] Preconditioned Conjugate gradient method. (PCG)
Let us denote B as the preconditioner of the symmetric
positive definite matrix where the matrix B is closed to the
matrix H of the system.
If we put
H=B-E (1.4)
Then we can, e.g., require that the norm HBE to be
small.
It is well known that for every symmetric positive
definite matrix B, there exists just one symmetric positive
definite matrix 2
1
B
(the square root of 1B ) such that
.BBB 2
1
2
1
1
Thus, put
bBb 2
1
and rewrite the system (1) as
Dr. Omar Ali Aleyan
31السنة العدد 436
,bxH
where
,HBBH 2
1
2
1
.xBx 2
1
We now can solve the system (1.6) using the conjugate
gradient method (1.2), (1.3) and the solution x computed from
Notes that, according to (1.4) and (1.7),
,EIEBBIH 2
1
2
1
where we put 2
1
2
1
EBBE
.
After substituting b and x ,H from the formulae (1.5),
(1.7) and (1.8), the algorithm (1.2) and (1.3) for solving the
system (1.6) can be rewritten as follows. Choose the initial
approximation ,x 0 put
,rp ,xBHBBbBr 0002
1
2
1
2
1
2
1
0
and compute
,
pHBBp
rra
j2
1
2
1
T
j
j
T
j
j
,paxBxB jjj2
1
1j2
1
,pHBBarr j
2
1
2
1
jj1j
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ437
,rr
rrb
j
T
j
1j
T
1j
j
.pbrp jj1j1j
Substituting j
2
1
jj2
1
j pBp and rBr
we finally get the
preconditioned algorithm (instead of jj p and r we write
jj p and r ):
Choose the initial approximation ,x 0 put
,rBp ,Hxbr 0
1
000
and compute
,Hpp
rBra
j
T
j
j
1T
j
j
,paxx jjj1j
,Hparr jjj1j
,rBr
rBrb
j
1T
j
1j
1T
1j
j
.pbrBp jj1j
1
1j
How to choose starting and stopping points?
If you have a rough estimate of the value of x, use it as
the starting value0x . If not, set 0.x 0
When CG reaches the
minimum point, the residual becomes zero; we must stop
immediately when the residual is zero.
Dr. Omar Ali Aleyan
31السنة العدد 438
The preconditioners
The preconditioner of tridiagonal of the matrix H ( .BT)
The matrix H is preconditioned by the preconditioner
matrix tridiag(H)BT and HBT 1
TT
is the preconditioned
matrix.
[2]The preconditioner of incomplete LU factorization of the
matrix H )(BILU
The matrix H is preconditioned by the preconditioner
matrix ILUB where L is a lower triangular matrix and U is an
upper triangular matrix and HBT 1
ILUILU
is the preconditioned
matrix.
Results and Applications
We will use two examples for the conjugate gradient
method and preconditioned conjugate gradient method
Example 1
Consider the problem in the given domain with boundary
conditions:
boundaryin 0y)u(x,
1yx,0)y(x2Δu 22
Example 2
Consider the problem in the given domain with boundary
conditions
1yx,06y)y2-(xeΔu 3x
boundaryin 0y)u(x,
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ455
Figure 1.1 The shape of example 1 where n = 20
Figure 1.2 The final shape of matrix H of example 1
where n = 10
00.2
0.40.6
0.81
0
0.2
0.4
0.6
0.8
1
0
0.05
0.1
0.15
0 20 40 60 80 100 120
0
20
40
60
80
100
120
nz = 445
Dr. Omar Ali Aleyan
31السنة العدد 455
Figure 1.3 The shape of example 2 where n = 20
Figure 1.4 The final shape of matrix H of example 2
where n = 10
00.2
0.40.6
0.81
0
0.5
1-0.02
0
0.02
0.04
0.06
0.08
0.1
0 20 40 60 80 100 120
0
20
40
60
80
100
120
nz = 445
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ455
The results of numerical tests of the conjugate gradient
method and preconditioned conjugate gradient method for
example 1 and example 2 are given in the following tables:
Table 1 Iteration and residual of matrix H by the
conjugate gradient method
of example 1
h
8.6261e- 8.7947e- 9.2641e- 6.4411e- Residual CG
Iteration
Table 2 Iteration and residual of matrix H by the
preconditioned conjugate
gradient method of example 1
h
8.0969e- 8.8534e- 7.7129e- 5.4801e- Residual TT
Iteration
1.4968e- 1.5134e- 7.4100e- 3.2854e- Residual ILUT
Iteration
Table 3 Iteration and residual of matrix H by the
conjugate gradient method
of example 2
h
9.6951e- 9.7013e- 9.9616e- 7.4896e- Residual CG
Iteration
Table 4 Iteration and residual of matrix H by the
Dr. Omar Ali Aleyan
31السنة العدد 453
preconditioned conjugate
gradient method of example 2
h
7.7787e- 9.3371e- 7.3937e- 6.4889e- Residual TT
Iteration
1.2640e- 4.7331e- 2.9969e- 3.4696e- Residual ILUT
Iteration
Conclusion. It is shown in this paper that in the CG
method the number of iterations increases when the size of
matrix H increases. The convergent in the preconditioned
matrix is faster than in the non preconditioned one. The best
preconditioner is the incomplete preconditioner.
THE APPLICATIONS OF CG AND PCG ON ELLIPTIC PARTIAL DIFFERENTIAL EQUATIONS
سمرية مجلة الجامعة الأ455
References
Aleyan O. A.: Applications of Finite Element Method to
Solve Elliptic Partial Differential Equations Using
Iterative Methods. An Academic, Intellectual, Cultural,
Comprehensive and Arbitrated Journal Issued by the
Faculty of Arts and Sciences in Zliten, Al-Mergeb. Issue
No. 21 2012 AS –SAYIF (December) .
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 AS –SAYIF
(JUNE) 1377.
Berman, A. and Plemmons, R. Nonnegative matrices in
the mathematical sciences, Academic Press, New York,
Horn, R.A. and Johnson, C.R. Matrix analysis, Cambridge
University Press, Cambridge, 1986.
Ortega, J.M. and Rheinboldt, W.C. Iterative solution of
linear systems, Plenum Press, New York, 1988.
Miroslav Fiedler., Special matrices and their applications
in numerical mathematics, Kluwer, 1986.
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-
Varga, R.S. Matrix iterative analysis, Prentice Hall, New
York, 1962.
Dr. Omar Ali Aleyan
31السنة العدد 454
Young, D. Iterative solution of large linear systems,
Academic Press, New York, 1977.
Richard L. Burden and J. Donglas Faires. Numerical
analysis, third edition prindle, Weber & Schmidt,
Boston, 1985.
المجلة ومعايير النشر مجة الجاعة الأسمسية دوزي ة عي ة داعة محه ة، تصدز ع الجاعة الأسمسي ة يعو الإضلاي ة
بيبيا، وتع عى ػس بحوخ أعطاء يئة ايت دزيظ الجاعي ، وػاطات ايعية ، وتأخر بأضباب
ا الجاعات الأخسى، ع طسيل د دطوز اي وض بايبخح ايعي ، وتطعى إلى زبط الجاعة بغير
ايج كافة والمعسفة، وخل كاط ايتكاء يتعاو فيا بيا، وبين عائسا المجلات، وبخاصة الجاعية
ا.
ايبخوخ المػوزة فيا تعبر ع آزاء أصخابا فكط، و وحد ايري يتخو المطؤويية ايكاوية
وآزائ، وصخة طبتا إلى صادزا، وييطت المجة طؤوية ع غيء ذيو، والأدبية ع أفهاز
ولا يص ػسا أ تهو عبرة ع ودة عسا.
ايبخوخ المكدة يذة حكا، لا تسد إلى أصخابا ػست أو لم تػس، ولا يجوش ػسا، أو
نتابي، إدازة ايتخسيس، ويجوش إعلا الاقتباع ا، أو تكديما يػس إلا بعد الحصو عى إذ
ايباحح بتيذة تكوي بحج، إذا طب ذيو بعد سوز غسي عى الأق تطي ايبخح، نا تخطع
ايبخوخ ايصالحة يػس يطياضة المجة في تطيل تستيبا، وفي ش ػسا.
هسة أو أصية، تػه إضافة يػترط في ايبخوخ ايتي تػس ألا تهو ػوزة قب، وأ تهو بت
وعي ة في اختصاصا، وتتوافس فيا الأصاية وايعل وصخ ة الأضوب، تصة بايكي الإطاي ة وبمعايير
ايبخح ايعي ، ولا ضي ا الابتعاد ع ايتذسيح والإضفاف في ايكو، وايت عسيض بالآخسي، زوعيت فيا
سادع، وتستيب المعوات بطل واحد في ايبخح، وتسقي ايبية المذي ة، واضتخدا المصادز والم
لات يبخح خسائط، أو دداو الهواؼ بأزقا طتك ة ع المصادز والمسادع، وإذا نات اى ه
فيبغي أ تهو في صوزتا الأصي ة، وإذا نا ايبخح ترجما يصخب بأص المترد ع.
ت كد ايبخوخ لإدازة المج ة طختين طبوعة عى وزم، ومحفوظة في قسص حاضوب، ويمه
إزضالها عى عوا الجاعة الإيهتروي ، ويفط إزضا المعوات المتعكة بايط يرة ايعي ة يباحح، في
وزقة طتك ة ع ايبخح.
تاة، تسفع الحسج ع ايباحح والمكو، ي عسض ايبخح عى كو تخصص، وكو يغوي في ضسي ة
وتعو يئة ايتخسيس نجيرا عى توصيات المكوين فيا يتعل بػس ايبخح عد.
د يػس، نا يطتخل المكو والمترد كابلا عى ايتكوي يطتخل ايباحح كابلا ايي ا ع بحج المعت
أو ايترجمة.
يبخوخ، بماقػتا وإثسائا وايسد ايعي عىى ىا وزد فيىا، وتفىتح صىدزا تسحب يئة ايتخسيس، بعد ػس ا
كد ايباء، وبخاصة المتخصصين، وتعد بأ ا يسد إييا يهو وضع ايعاية وايتكديس . لاضتكبا اي