{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs240a-cgstencil

# cs240a-cgstencil - CS240A Conjugate Gradients and the Model...

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

CS240A: Conjugate Gradients and the Model Problem

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

View Full Document
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
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

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

View Full Document
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
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

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

View Full Document
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
Conjugate gradient iteration for Ax = b x0 = 0 approx solution r0 = b residual = b - Ax d0 = r0 search direction for k = 1, 2, 3, . . .

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}