Review
Iterative Methods
Relaxation
Summary
I TERATIVE M ETHOD FOR E LLIPTIC PDE S
Dr. Johnson
School of Mathematics
Semester 1 2008
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods
Relaxation
Summary
O UTLINE
1 R EVIEW
2 I TERATIVE M ETHODS
Point Iteration
Residual
Gauss-Siedel iteration
3 R ELAXATION
Relaxation and SOR
Line Relaxation
4 S UMMARY
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods
Relaxation
Summary
We have shown how to discretise a model elliptic problem.
∂2 φ ∂2 φ
+ 2 = f (x, y ),
∂x 2 ∂y
The discretised equations can be expressed as the matrix
equation.
Aw = f
Usually solve using iterative techniques.
The matrix form helps us think about methods in an abstract
way.
The matrix form will allow us to analyse the stability and
convergence of schemes. university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
I TERATIVE M ETHODS
Point relaxation. Jacobi, Gauss-Seidel, SOR
Line Relaxation
Conjugate gradient and PCG methods
Minimal residual methods
Multigrid
Fast Direct Methods (FFT)
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
J ACOBI M ETHOD
Rewrite the discrete equations
wi +1,j − 2wi,j + wi −1,j wi,j +1 − 2wi,j + wi,j −1
2
+ = fi,j ,
∆x ∆y 2
for 1 ≤ i ≤ N − 1, and 1 ≤ j ≤ M − 1.
as
1
wi +1,j + wi −1,j + β2 (wi,j +1 + wi,j −1 ) − ∆x 2 fi,j
£ ¤
wi,j = 2
2 + 2β
with β = ∆x /∆y .
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
J ACOBI M ETHOD
This suggests the iterative scheme
q +1 1 h
q q 2 q q 2
i
wi,j = w i +1,j + w i −1,j + β ( w i,j +1 + w i,j −1 ) − ∆x fi,j
2 + 2β2
q
here wi,j is the qth guess at the solution.
How do we know when we have the real solution?
We must define some convergence criteria.
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
E RRORS IN THE SCHEME
Suppose we write the linear system as
Av = f
where v is the exact solution of the linear system.
If w is an approximate solution, the error e is defined by
e = v − w.
Thus
Ae = A(v − w) = f − Aw.
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
D EFINING THE RESIDUAL
The residual is defined by
r = f − Aw.
We don’t know the exact solution...
but we can calculate the residual.
The residual is related to the error,
e = 0 if and only if r = 0
So, we choose the magnitude of the residual as the
convergence criteria.
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
J ACOBI R ESIDUAL
For the Jacobi scheme the residual is given by
ri,j = wi +1,j + wi −1,j − (2 + 2β2 )wi,j + β2 (wi,j +1 + wi,j −1 ) − ∆x 2 fi,j
Suitable stopping conditions might be
r
max |ri,j | < ǫ,
i,j
or ∑ ri,j2 < ǫ
i,j
university-logo
Dr. Johnson MATH65241
Review
Point Iteration
Iterative Methods
Residual
Relaxation
Gauss-Siedel iteration
Summary
G AUSS -S IEDEL M ETHOD
In this iterative scheme we use the most up-to-date values of
w
q +1 1 h
q q +1 2 q q +1 2
i
wi,j = w i +1,j + w i −1,j + β ( w i,j +1 + w i,j −1 ) − ∆x fi,j
2 + 2β2
q
here wi,j is again the qth guess at the solution,
and we have already calculated w at (i − 1, j ) and (i, j − 1)
Gauss-Siedel will usually converge faster than Jacobi iteration.
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods Relaxation and SOR
Relaxation Line Relaxation
Summary
FASTER C ONVERGENCE WITH R ELAXATION
Point iteration can be slow to converge.
A faster way to find the solution is overestimate the correction
at each point.
We call this relaxation.
We define
q +1 q ∗
wi,j = (1 − ω )wi,j + ωwi,j
∗ is the solution from the iteration scheme.
where wi,j
ω is the relaxation factor.
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods Relaxation and SOR
Relaxation Line Relaxation
Summary
S UCCESSIVE O VER R ELAXATION
If ω = 1 we just have the Jacobi or Gauss-Seidel scheme.
If ω > 1 with Gauss-Seidel then it is called successive
overrelaxation ot the SOR scheme
Theorems can show that 0 < ω < 2 is a condition for a
scheme to converge.
If we choose ω < 1 then we under-relax, and the convergence
will be slower.
This can be used to bound errors in unstable schemes.
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods Relaxation and SOR
Relaxation Line Relaxation
Summary
M ORE D IRECT M ETHODS
The Jacobi, Gauss-Seidel and SOR schemes are called point
relaxation methods.
We can compute a whole line of new values using a direct
method,
this leads to line-relaxation methods.
y
x
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods Relaxation and SOR
Relaxation Line Relaxation
Summary
L INE R ELAXATION
Keeping i constant, we may write the system of equations
q +1 q +1 2 q +1 q q +1
β2 wi,j 2 2
+1 − (2 + 2β )wi,j + β wi,j −1 = ∆x fi,j − (wi +1,j + wi −1,j )
for 1 ≤ j ≤ M − 1.
We can solve this system using a direct-solver.
We can also over-relax
wqi +1 = (1 − ω )wqi + ωwi∗
university-logo
Dr. Johnson MATH65241
Review
Iterative Methods
Relaxation
Summary
R ELAXATION M ETHODS
The model equations can be rewritten
wi +1,j − 2wi,j + wi −1,j wi,j +1 − 2wi,j + wi,j −1
+ = fi,j ,
∆x 2 ∆y 2
How up-to-date the values are define different schemes
We can over-relax to improve convergence
q +1 q ∗
wi,j = (1 − ω )wi,j + ωwi,j
and also solve a line (or block) using a direct method.
Next up - convergence properties...
university-logo
Dr. Johnson MATH65241