CS 290H 7 November Introduction to multigrid methods

Slides:



Advertisements
Similar presentations
Mutigrid Methods for Solving Differential Equations Ferien Akademie 05 – Veselin Dikov.
Advertisements

Improvement of a multigrid solver for 3D EM diffusion Research proposal final thesis Applied Mathematics, specialism CSE (Computational Science and Engineering)
1 Iterative Solvers for Linear Systems of Equations Presented by: Kaveh Rahnema Supervisor: Dr. Stefan Zimmer
1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
03/23/07CS267 Lecture 201 CS 267: Multigrid on Structured Grids Kathy Yelick
SOLVING THE DISCRETE POISSON EQUATION USING MULTIGRID ROY SROR ELIRAN COHEN.
1 ITCS 4/5010 CUDA Programming, UNC-Charlotte, B. Wilkinson, Feb 26, 2013, DyanmicParallelism.ppt CUDA Dynamic Parallelism These notes will outline CUDA.
CSCI-455/552 Introduction to High Performance Computing Lecture 26.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
Geometric (Classical) MultiGrid. Hierarchy of graphs Apply grids in all scales: 2x2, 4x4, …, n 1/2 xn 1/2 Coarsening Interpolate and relax Solve the large.
Screened Poisson Surface Reconstruction
Image Reconstruction Group 6 Zoran Golic. Overview Problem Multigrid-Algorithm Results Aspects worth mentioning.
Ma221 - Multigrid DemmelFall 2004 Ma 221 – Fall 2004 Multigrid Overview James Demmel
Algebraic MultiGrid. Algebraic MultiGrid – AMG (Brandt 1982)  General structure  Choose a subset of variables: the C-points such that every variable.
Numerical Algorithms • Matrix multiplication
Geometric MultiGrid Mehod
03/14/06CS267 Lecture 17 CS 267: Applications of Parallel Computers Unstructured Multigrid for Linear Systems James Demmel Based in part on material from.
Influence of (pointwise) Gauss-Seidel relaxation on the error Poisson equation, uniform grid Error of initial guess Error after 5 relaxation Error after.
CS267 Poisson 2.1 Demmel Fall 2002 CS 267 Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
Sparse Matrix Methods Day 1: Overview Day 2: Direct methods
03/09/06CS267 Lecture 16 CS 267: Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
04/13/2009CS267 Lecture 20 CS 267: Applications of Parallel Computers Lecture Structured Grids Horst D. Simon
The Landscape of Ax=b Solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More RobustLess Storage (if sparse) More Robust.
04/13/07CS267 Guest Lecture CS 267: Applications of Parallel Computers Unstructured Multigrid for Linear Systems James Demmel Based in part on material.
Geometric (Classical) MultiGrid. Linear scalar elliptic PDE (Brandt ~1971)  1 dimension Poisson equation  Discretize the continuum x0x0 x1x1 x2x2 xixi.
Picture Reconstruction / Multigrid Group 8 Stefan Spielvogel Alexander Piazza Alexander Kosukhin.
CS267 L25 Solving PDEs II.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 25: Solving Linear Systems arising from PDEs - II James Demmel.
CS240A: Conjugate Gradients and the Model Problem.
1 Numerical Integration of Partial Differential Equations (PDEs)
Solving Scalar Linear Systems Iterative approach Lecture 15 MA/CS 471 Fall 2003.
Multigrid for Nonlinear Problems Ferien-Akademie 2005, Sarntal, Christoph Scheit FAS, Newton-MG, Multilevel Nonlinear Method.
Improving Coarsening and Interpolation for Algebraic Multigrid Jeff Butler Hans De Sterck Department of Applied Mathematics (In Collaboration with Ulrike.
Complexity of direct methods n 1/2 n 1/3 2D3D Space (fill): O(n log n)O(n 4/3 ) Time (flops): O(n 3/2 )O(n 2 ) Time and space to solve any problem on any.
Hans De Sterck Department of Applied Mathematics University of Colorado at Boulder Ulrike Meier Yang Center for Applied Scientific Computing Lawrence Livermore.
Introduction to Scientific Computing II From Gaussian Elimination to Multigrid – A Recapitulation Dr. Miriam Mehl.
CS 219: Sparse Matrix Algorithms
Administrivia: May 20, 2013 Course project progress reports due Wednesday. Reading in Multigrid Tutorial: Chapters 3-4: Multigrid cycles and implementation.
Fall 2011Math 221 Multigrid James Demmel
Multigrid Computation for Variational Image Segmentation Problems: Multigrid approach  Rosa Maria Spitaleri Istituto per le Applicazioni del Calcolo-CNR.
Introduction to Scientific Computing II Overview Michael Bader.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl Institut für Informatik Scientific Computing In Computer Science.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl.
High Performance Computing 1 Multigrid Some material from lectures of J. Demmel, UC Berkeley Dept of CS.
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Introduction to Scientific Computing II
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
CS 290H Administrivia: May 14, 2008 Course project progress reports due next Wed 21 May. Reading in Saad (second edition): Sections
Multigrid Methods The Implementation Wei E Universität München. Ferien Akademie 19 th Sep
The Application of the Multigrid Method in a Nonhydrostatic Atmospheric Model Shu-hua Chen MMM/NCAR.
A Parallel Hierarchical Solver for the Poisson Equation Seung Lee Deparment of Mechanical Engineering
University of Colorado
Conjugate gradient iteration One matrix-vector multiplication per iteration Two vector dot products per iteration Four n-vectors of working storage x 0.
Optimizing 3D Multigrid to Be Comparable to the FFT Michael Maire and Kaushik Datta Note: Several diagrams were taken from Kathy Yelick’s CS267 lectures.
The Landscape of Sparse Ax=b Solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More RobustLess Storage More Robust More.
Model Problem: Solving Poisson’s equation for temperature
CS 290N / 219: Sparse Matrix Algorithms
James Demmel CS 267: Applications of Parallel Computers Lecture 17 - Structured Grids James Demmel
MultiGrid.
Iterative Methods Good for sparse matrices Jacobi Iteration
CSE 245: Computer Aided Circuit Simulation and Verification
James Demmel Multigrid James Demmel Fall 2010 Math 221.
Introduction to Multigrid Method
Introduction to Scientific Computing II
James Demmel CS 267: Applications of Parallel Computers Lecture 17 - Structured Grids James Demmel
Jim Demmel and Horst D. Simon
Numerical Algorithms • Parallelizing matrix multiplication
James Demmel CS 267: Applications of Parallel Computers Lecture 17 - Structured Grids James Demmel
Administrivia: November 9, 2009
(based in part on material from Mark Adams)
Presentation transcript:

CS 290H 7 November Introduction to multigrid methods Homework 3 will be on the web page by the end of today Talk to me by Wednesday about your final project Read Saad 2nd edition (library reserve) 13.1 – 13.5, skimming 13.2.1-13.2.3 See web page for other multigrid references Multigrid intuition and overview (slides thanks to Kathy Yelick) The model problem revisited Stationary iterative methods (rest of slides thanks to Bill Briggs et al.) Smoothing Nested iteration Coarse-grid correction Prolongation and restriction The multigrid V-cycle

Complexity of linear solvers Time to solve model problem (Poisson’s equation) on regular mesh n1/2 2D 3D Sparse Cholesky: O(n1.5 ) O(n2 ) CG, exact arithmetic: CG, no precond: O(n1.33 ) CG, modified IC: O(n1.25 ) O(n1.17 ) CG, support trees: O(n1.20) O(n1.31 ) CG, Spielman/Teng: O(n1+ε ) Multigrid: O(n)

Multigrid (introduction) Find an approximate solution on a coarser mesh and then improve it on a finer mesh Use idea recursively on hierarchy of meshes Solves the model problem (Poisson’s eqn) in linear time! Often useful when hierarchy of meshes can be built Hard to parallelize coarse meshes well This is just the intuition – lots of theory and technology

Multigrid Overview Basic Algorithm: Replace problem on fine grid by an approximation on a coarser grid Solve the coarse grid problem approximately, and use the solution as a starting guess for the fine-grid problem, which is then iteratively updated Solve the coarse grid problem recursively, i.e. by using a still coarser grid approximation, etc. Success depends on coarse grid solution being a good approximation to the fine grid

Multigrid Sketch on a Regular 1D Mesh Consider a 2m+1 grid in 1D for simplicity Let P(i) be the problem of solving the discrete Poisson equation on a 2i+1 grid in 1D Write linear system as T(i) * x(i) = b(i) P(m) , P(m-1) , … , P(1) is a sequence of problems from finest to coarsest

Multigrid Sketch on a Regular 2D Mesh Consider a 2m+1 by 2m+1 grid Let P(i) be the problem of solving the discrete Poisson equation on a 2i+1 by 2i+1 grid in 2D Write linear system as T(i) * x(i) = b(i) P(m) , P(m-1) , … , P(1) is a sequence of problems from finest to coarsest

Multigrid Operators For problem P(i) : b(i) is the RHS and x(i) is the current estimated solution (T(i) is implicit in the operators below.) Multigrid will be defined by a repeated sequence of operators The multigrid operators average values on neighboring grid points Neighboring grid points on coarse problems are far away in fine problems, so information moves quickly on coarse problems Levels will be constructed explicitly The next slide gives an overview of the operators; details will come later both live on grids of size 2i-1

Multigrid Operators For problem P(i) : b(i) is the RHS and x(i) is the current estimated solution The restriction operator R(i) maps P(i) to P(i-1) Restricts problem on fine grid P(i) to coarse grid P(i-1) Uses sampling or averaging Right-hand sided is also restricted: b(i-1)= R(i) (b(i)) The interpolation operator In(i-1) maps solution x(i-1) to x(i) Maps one approximate solution to another Interpolates solution on coarse grid P(i-1) to fine grid P(i) x(i) = In(i-1)(x(i-1)) The smoothing operator S(i) takes P(i) and improves solution x(i) Uses “weighted” Jacobi or SOR on a single level of the grid x improved (i) = S(i) (b(i), x(i)) both live on grids of size 2i-1

Multigrid V-Cycle Algorithm Function MGV ( b(i), x(i) ) … Solve T(i)*x(i) = b(i) given b(i) and an initial guess for x(i) … return an improved x(i) if (i = 1) compute exact solution x(1) of P(1) only 1 unknown return x(1) else x(i) = S(i) (b(i), x(i)) improve solution by damping high frequency error r(i) = T(i)*x(i) - b(i) compute residual d(i) = In(i-1) ( MGV( R(i) ( r(i) ), 0 ) ) solve T(i)*d(i) = r(i) recursively x(i) = x(i) - d(i) correct fine grid solution x(i) = S(i) ( b(i), x(i) ) improve solution again return x(i)

Why is this called a V-Cycle? Just a picture of the call graph In time a V-cycle looks like the following 4 3 2 1 MG Level Time

Complexity of a V-Cycle on a 2D Grid Work at each point in a V-cycle is O(# of unknowns) Cost of Level i is (2i-1)2 = O(4 i) If finest grid level is m, total time is: S O(4 i) = O(4m) = O(# unknowns) m i=1