Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

16
Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado Workshop for Advancing Numerical Modeling of Mantle Convection and Lithospheric Dynamics July 2008, UC-Davis

description

Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado Workshop for Advancing Numerical Modeling of Mantle Convection and Lithospheric Dynamics July 2008, UC-Davis. Numerical modeling. A scientific problem . Partial differential equations - PowerPoint PPT Presentation

Transcript of Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Page 1: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Multigrid Methods

Shijie Zhong

Dept. of PhysicsUniversity of Colorado

Boulder, Colorado

Workshop for Advancing Numerical Modeling of Mantle Convection and Lithospheric Dynamics

July 2008, UC-Davis

Page 2: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Numerical modeling

Discretize PDE using FE, FD,

FV, … on a certain grid

a matrix equation:

Kd=F

A scientific problem

Partial differential equations

within a domain

f=ma

Page 3: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

A toy problem: 1-D heat conduction

0 1 x

Page 4: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Discretize with FE

x=0 x=1

e

Page 5: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

e1

0

Page 6: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Kd=F

Page 7: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Iterative Solvers

A matrix equation:

Kd=F

Iterative solvers: memory usage ~ N (# of unknowns in d), # of flops ~ N (e.g., for multigrid solver), suitable for parallel computing.

Page 8: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Jacobi and Gauss-Seidel methods

Matrix Equation:

Rewrite matrix K:

Jacobi method:

Start with a guessed solution d(0), then update d iteratively to get d(1), … until residual =||Kd(n)-F|| is less than some tolerance.

Gauss-Seidel method:

Page 9: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Jacobi method

Page 10: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Gauss-Seidel Method

Page 11: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

The idea behind multigridGauss-Seidel

Page 12: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

A road map

Page 13: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

A road map continued but reversed

Page 14: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Different cycles

V-cycle

n

n-1

1

W-cycle

Page 15: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

THE method for elliptic equations (i.e., “diffusion” like problems)

Page 16: Multigrid Methods Shijie Zhong Dept. of Physics University of Colorado Boulder, Colorado

Execution Time vs Grid Size N for Multi-grid Solvers in Citcom

FMG: Zhong et al. 2000MG: Moresi and Solomatov, 1995

t ~ N-1