cs240a-cgstencil

cs240a-cgstencil - CS240A: Conjugate Gradients and the...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
CS240A: Conjugate Gradients and the Model Problem
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Model Problem: Solving Poisson’s equation for temperature For each i from 1 to n, except on the boundaries: – t(i-k) – t(i-1) + 4*t(i) – t(i+1) – t(i+k) = 0 n equations in n unknowns: A*t = b Each row of A has at most 5 nonzeros In three dimensions, k = n 1/3 and each row has at most 7 nzs k = n 1/2
Background image of page 2
The Landscape of Ax=b Solvers Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More Robust Less Storage (if sparse) More Robust More General Pivoting LU GMRES, BiCGSTAB, Cholesky Conjugate gradient
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Complexity of linear solvers 2D 3D Sparse Cholesky: O(n 1.5 ) O(n 2 ) CG, exact arithmetic: O(n 2 ) O(n 2 ) CG, no precond: O(n 1.5 ) O(n 1.33 ) CG, modified IC: O(n 1.25 ) O(n 1.17 ) CG, support trees: O(n 1.20 ) -> O(n 1+ ) O(n 1.75 ) -> O(n 1+ ) Multigrid: O(n) O(n) n 1/2 n 1/3 Time to solve model problem (Poisson’s equation) on regular mesh
Background image of page 4
CS 240A: Solving Ax = b in parallel Dense A: Gaussian elimination with partial pivoting (LU) See Jim Demmel’s slides Same flavor as matrix * matrix, but more complicated Sparse A: Iterative methods – Conjugate gradient, etc. Sparse matrix times dense vector Sparse A: Gaussian elimination – Cholesky, LU, etc. Graph algorithms Sparse A: Preconditioned iterative methods and multigrid Mixture of lots of things
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 240A: Solving Ax = b in parallel Dense A: Gaussian elimination with partial pivoting See Jim Demmel’s slides Same flavor as matrix * matrix, but more complicated Sparse A: Iterative methods – Conjugate gradient etc. Sparse matrix times dense vector Sparse A: Gaussian elimination – Cholesky, LU, etc. Graph algorithms Sparse A: Preconditioned iterative methods and multigrid Mixture of lots of things
Background image of page 6
x0 = 0 approx solution r0 = b residual = b - Ax d0 = r0 search direction for
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course CMPSC 240A taught by Professor Gilbert during the Fall '09 term at UCSB.

Page1 / 24

cs240a-cgstencil - CS240A: Conjugate Gradients and the...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online