Multigrid Intro
Multigrid Intro
Introduction to
Multigrid Methods
Brown University
AM194 1 of 312
Luke Olson
Office: Rm. 323, 182 George St.
Phone: X3-1834
Email: [email protected]
http://dam.brown.edu/people/lolson/2004spring/AM194
Brown University
AM194 2 of 312
APPM 7400-003
Syllabus
• Coursework
– No exams
– Homework exercises & computing assignments
– Project & presentation--joint is OK
– Can tailor some or all work & later lectures to your interests
• Philosophy
– Big on fundamentals, principles, & simple ideas
– Think about the scientific method in general
– Understand by concrete examples & experience
– Know the whole picture
– Ask questions & interject comments
– Make sure I explain what you need
• Text
– A Multigrid Tutorial, 2nd edition, 2nd printing
– Supplemental material as needed
Brown University
AM194 3 of 312
Sources
MGNet http://www.mgnet.org/
Newsletter
Software repository
Other texts:
Multigrid, by Trottenburg, et al.
Brown University
AM194 4 of 312
Homework exercises
Due 1 week after the relevant chapter is covered.
[note: these are very much subject to change…see the web for updates!]
1: 3,4
Brown University
AM194 5 of 312
Computing assignments
•Due 2 weeks after the relevant chapter is covered.
2: 20 4: 13, 15 6: 6 by computer!!!
Brown University
AM194 6 of 312
Project & presentation
Due at the end of the semester.
Brown University
AM194 7 of 312
A Multigrid Tutorial
2nd Edition, 2nd Printing
By
William L. Briggs
CU-Denver
Van Emden Henson
LLNL ← THANKS!
Brown University
AM194 8 of 312
Outline
by chapter
Brown University
AM194 9 of 312
Suggested reading
CHECK MY MG LIBRARY & MGNET REPOSITORY
Brown University
AM194 10 of 312
Multilevel methods have been
developed for...
• PDEs, CFD, porous media, elasticity, electromagnetics.
• Purely algebraic problems, with no physical grid; for
example, network & geodetic survey problems.
• Image reconstruction & tomography.
• Optimization (e.g., the traveling salesman & long
transportation problems).
• Statistical mechanics, Ising spin models.
• Quantum chromo dynamics.
• Quadrature & generalized FFTs.
• Integral equations.
Brown University
AM194 11 of 312
Everyone uses multilevel methods
• Multigrid, multilevel, multiscale, multiphysics, …
Use local “governing rules” on the finest level to
resolve the state of the system at these detailed
scales, but--recognizing that these “rules” have
broader implications that are hard to determine
there--use coarser levels to resolve larger scales.
Continual feedback is essential because improving
one scale impacts other scales.
• Common uses
Sight, art, politics, thinking (scientific research),
cooking, team sports, …
Brown University
AM194 12 of 312
1. Model problems
• 1-D boundary value problem:
, xi = ih , i = 0, 1 , . . . N
1
h =
N
x =0 x =1
x0 x1 x2 xi xN
• Let & for .
v i ≈ u( x i ) f i ≈ f ( xi ) i = 0, 1, . . . N
u( x i + 1 ) − 2 u( x i ) + u( x i − 1 )
u″ ( x i ) = + O( h 2)
h2
Brown University
AM194 14 of 312
Approximate equation via
finite differences
• Approximate the BVP
− vi − 1 + 2 vi − vi + 1
+ σ vi = f i i = 1, 2, . . . N − 1
2
h
v0 = vN = 0
Brown University
AM194 15 of 312
Discrete model problem
Letting T&
v = ( v 1, v 2, . . . , v N − 1 )
T
f = ( f 1, f 2, . . . , f N − 1 )
we obtain the matrix equation Av = f, where A
is (N-1) x (N-1), symmetric, positive definite, &
⎛ 2 + σh2 −1 ⎞ ⎛ f1 ⎞
⎜ ⎟ ⎛ v1 ⎞
⎜ − 1 2 + σh 2 ⎟ ⎜ v2 ⎟ ⎜ f ⎟
−1 ⎜ 2 ⎟
⎜ ⎟ ⎜ ⎟
1 ⎜ 2
− 1 2 + σh − 1 ⎟ ⎜ v3 ⎟ ⎜ f ⎟
A= ⎟, v= ⎜ ⎟, f =⎜ 3 ⎟
2 ⎜
h ⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎜ 2 ⎟ ⎜ N −2⎟
v ⎜ f N −2⎟
⎜ − 1 2 + σ h − 1 ⎟ ⎜v ⎟ ⎜ ⎟
⎜ ⎟ ⎝ N − 1 ⎠ f
⎝ − 1 2 + σh2 ⎠ ⎝ N −1⎠
Brown University
AM194 16 of 312
Stencil notation
A = [-1 2 -1]
dropping h -2 & σ for convenience
Q
-1 Q
-1 Q
Brown University
AM194 17 of 312
Basic solution methods
Method # Ops (2D)
• Direct Gaussian O(N2)
– Gaussian elimination
– Factorization
Elimination
– Fast Poisson solvers (FFT- Jacobi Iter. O(N2 log ε)
based, reduction-based, …)
• Iterative Gauss-Seidel O(N2 log ε)
– Richardson, Jacobi, Gauss-
Seidel, … SOR O(N3/2 log ε)
– Steepest Descent, Conjugate
Gradients, …
– Incomplete Factorization, ... Conjugate O(N3/2 log ε)
Gradient
ICCG O(N5/4 log ε)
Brown University
MG-Full(FMG) O(N)
AM194 18 of 312
2-D model problem
• Consider the problem
− v i − 1, j + 2v i j − v i + 1, j − v i , j − 1 + 2v i j − v i , j + 1
+ + σ vi j = f i j
hx2 hy2
v i j = 0 , i = 0, i = M , j = 0, j = M
• Ordering the unknowns (& also the vector f )
lexicographically by y-lines:
T
v = (v1,1 , v1,2 ,..., v1,N −1 , v2 ,1 , v2 , 2 ,..., v2 ,N−1 ,..., vM−1,1 ,vM−1,2 ,..., vM−1,N−1 )
Brown University
AM194 20 of 312
Resulting linear system
• We obtain a block-tridiagonal system Av = f :
⎛ A1 − Iy ⎞ v1 ⎛ f1 ⎞
⎜ −I A ⎟ ⎛ ⎞ ⎜ ⎟
− I ⎜ 2 ⎟
⎜ y 2 y ⎟ v f
⎜ 2 ⎟
⎜ − Iy A3 − Iy ⎟ ⎜ v3 ⎟ ⎜ f ⎟
⎜ ⎟ ⎜ ⎟ = ⎜ 3 ⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎜ − Iy AN − 2 − Iy ⎟ ⎜ ⎟ ⎜ ⎟
⎜ ⎟ ⎝ vN − 1 ⎠ ⎜f ⎟
⎝ − I y A N −1 ⎠ ⎝ N −1 ⎠
1
where Iy is a diagonal matrix with on the diagonal
hy2
& 2 2 ⎛ + +σ1
− ⎞
⎜ hx2 hy2 hx2 ⎟
⎜ 1 2 2 1 ⎟
⎜ − 2 2 + 2 +σ − ⎟
⎜ h x hx hy hx2 ⎟
Ai = ⎜ 1 2 2 1 ⎟
− 2 + +σ −
⎜ hx hx2 hy2 hx2 ⎟
⎜ ⎟
⎜ ⎟
⎜ 1 2 2 ⎟
Brown University
− 2 + 2 +σ
AM194
⎝ hx2 hx hy ⎠ 21 of 312
Stencils
preferred for grid issues
Brown University
AM194 22 of 312
M-Matrices
Let A with elements aij be a matrix
∑| a
i≠ j
ij |≤|a ii |
Brown University
AM194 23 of 312