Multi Grid Methodscsip/CSIP2007-MG.pdf Tuesday, June 26, 2007 1

Preview:

Citation preview

Multi-Grid Methods

Press et al., “Numerical Recipes in C”, Section 19.6http://www.nrbook.com/a/bookcpdf.php

A Multigrid Tutorial, http://www.llnl.gov/casc/people/henson/mgtut/welcome.html

1Tuesday, June 26, 2007

Multi-Grid Methods

• Introduced by Achi Brandt, “Multi-Level Adaptive Solutions to Boundary Value Problems”, Math. Comp. 1977

• Solve elliptic PDEs (such as the Poisson equation) on N grid points in O(N)

• General framework, whose components must be adjusted to solve specific problems

2Tuesday, June 26, 2007

Motivation• Large sparse linear systems might converge

slowly using standard iterative relaxation methods (such as Jacobi, Gauss-Seidel).

3Tuesday, June 26, 2007

ExampleAu = 0, ui−1−2ui +ui+1 = 0

21 of 119

0 0 . 1 0 . 2 0 . 3 0 . 4 0 . 5 0 . 6 0 . 7 0 . 8 0 . 9 1

- 1

- 0 . 8

- 0 . 6

- 0 . 4

- 0 . 2

0

0 . 2

0 . 4

0 . 6

0 . 8

1

Numerical Experiments• Solve ,

• Use Fourier modes as initial iterate, with N =64:

uA = 0 =!+! uuuiii +! 11

02

vk!"#

"$%&

=)(=N

kiv

kinis 1111 !##,!## NkNi

component mode

k = 3

k = 1

k = 6

23 of 119

0 20 40 6 0 8 0 1 00 1 20

0

0 .1

0 .2

0 .3

0 .4

0 .5

0 .6

0 .7

0 .8

0 .9

1

Convergence rates differ fordifferent error components

• Error, ||e||!!!! , in weighted Jacobi on Au = 0 for100 iterations using initial guesses of v1, v3, and v6

k = 1

k = 3

k = 6

4Tuesday, June 26, 2007

Multi-Grid

• Many relaxation schemes have the smoothing property, where oscillatory modes of the error are eliminated effectively, but smooth modes are damped very slowly!

• Idea: use a sequence of progressively coarser grids in order to quickly get rid of smooth (low-frequency) errors!

5Tuesday, June 26, 2007

Two-Grid Case

• Linear elliptic problem:

• Discretized on a uniform grid with spacing h between grid points:

• Let be an approximate solution.

• Error/correction:

• Residual/defect:

L u = f

Lhuh = fh

uh

vh = uh− uh

dh = Lhuh− fh

6Tuesday, June 26, 2007

Use the result to approximate the correction, and correct the fine grid solution!

Two-Grid Case (continued)

Error may be computed by solving: Lhvh =−dh

Idea: use a coarser grid to solve: LHvH =−dH

unewh = uh + vh

dh = Lhuh− fh

= Lh (uh− vh)− fh

= Lhuh−Lhvh− fh =−Lhvh

7Tuesday, June 26, 2007

Two-Grid Case (continued)

How do we switch between coarse and fine grids?

Need to define two linear operators:• Restriction/injection/fine-to-coarse operator R• Prolongation/interpolation/coarse-to-fine

operator PdH = Rdh

vh = PvH

8Tuesday, June 26, 2007

Two-Grid Case (summary)

Iterate until convergence:

• Relaxation/smoothing on the fine grid

• Compute the defect on fine grid

• Restrict defect to coarse grid

• Solve the coarse problem

• Interpolate the correction to fine grid

• Apply correction to get a new approximation

dh = Lhuh− fh

dH = Rdh

vh = PvH

LHvH =−dH

unewh = uh + vh

9Tuesday, June 26, 2007

Relaxation / SmoothingRelaxation (smoothing) operator: typically a few iterations of Gauss-Seidel:

ui =− 1Lii

(

∑j "=i

Lij u j− fi

)i = 1, . . . ,N

10Tuesday, June 26, 2007

Relaxation / Smoothing

11Tuesday, June 26, 2007

Prolongation

47 of 119

1D Interpolation (Prolongation)

!h

!2h

• Values at points on the coarse grid map unchangedto the fine grid

• Values at fine-grid points NOT on the coarse grid

are the averages of their coarse-grid neighbors

Prolongation operator in 1D: typically linear interpolation.

Specified by the following stencil (symbol):[1/2 1 1/2

]

12Tuesday, June 26, 2007

ExampleThe prolongation operator, written in matrix form (in 1D, for interpolating 3 variables into 7):

1/21

1/2 1/21

1/2 1/21

1/2

7×3

vH,1vH,2vH,3

=

vh,1vh,2vh,3vh,4vh,5vh,6vh,7

13Tuesday, June 26, 2007

Prolongation in 2DProlongation operator in 2D: typically bi-linear interpolation.

0.25 0.5 0.250.5 1 0.5

0.25 0.5 0.25

Specified by the following stencil (symbol), on a 2D grid:

14Tuesday, June 26, 2007

Restriction

Simplest operator: straight injection [1]

52 of 119

1D Restriction by injection• Mapping from the fine grid to the coarse grid:

• Let , be defined on , . Then

where .

vh v2h !h!

2h

vv hi

hi 22 =

Ihhh

h

22!"!:

vvI hhh

h22

=

15Tuesday, June 26, 2007

Restriction

Another operator: full-weighting

53 of 119

1D Restriction by full-weighting

• Let , be defined on , . Then

where

vh v2h !h

!2h

vvvv hi

hi

hi

hi 122122 )++(= 2

4

1

+"

vvI hhh

h22

=

[1/4 1/2 1/4]

16Tuesday, June 26, 2007

ExampleThe restriction operator, written in matrix form (in 1D, for restricting 7 variables into 3):

1/4 1/2 1/4

1/4 1/2 1/41/4 1/2 1/4

3×7

vh,1vh,2vh,3vh,4vh,5vh,6vh,7

=

vH,1vH,2vH,3

17Tuesday, June 26, 2007

Restriction in 2D

Simplest operator: straight injection [1]

Other choices:

Full weighting

Half weighting

1/16 1/8 1/161/8 1/4 1/8

1/16 1/8 1/16

0 1/8 0

1/8 1/2 1/80 1/8 0

18Tuesday, June 26, 2007

Prolongation & Restriction

12

121 1

21 1

21

P cPT

14

1 2 1

1 2 11 2 1

19Tuesday, June 26, 2007

Operator Coarsification

• Discretize the continuous linear operator on progressively coarser grids

• Use the prolongation/restriction operators:LH = RLh P

or

20Tuesday, June 26, 2007

Cycle Strategies: V and W

21Tuesday, June 26, 2007

Cycle Strategies: FMG

22Tuesday, June 26, 2007

Recommended