cs240a-sparse

cs240a-sparse - CS 240A: Solving Ax = b in parallel CS...

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

View Full Document Right Arrow Icon
CS 240A: Solving Ax = b in parallel CS 240A: Solving Ax = b in parallel Dense A: Gaussian elimination with partial pivoting (LU) Same flavor as matrix * matrix, but more complicated Sparse A: Gaussian elimination – Cholesky, LU, etc. Graph algorithms Sparse A: Iterative methods – Conjugate gradient, etc. Sparse matrix times dense vector Sparse A: Preconditioned iterative methods and multigrid Mixture of lots of things
Background image of page 1

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

View Full DocumentRight Arrow Icon
Matrix and Graph Matrix and Graph Edge from row i to column j for nonzero A(i,j) No edges for diagonal nonzeros If A is symmetric, G(A) is an undirected graph Symmetric permutation PAP T renumbers the vertices 1 2 3 4 7 6 5 A G(A)
Background image of page 2
Compressed Sparse Matrix Storage Compressed Sparse Matrix Storage Full storage: 2-dimensional array. (nrows*ncols) memory. 31 0 53 0 59 0 41 26 0 31 41 59 26 53 1 3 2 3 1 Sparse storage: Compressed storage by columns (CSC). Three 1-dimensional arrays. (2*nzs + ncols + 1) memory. Similarly, CSR. 1 3 5 6 value: row: colstart:
Background image of page 3

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

View Full DocumentRight Arrow Icon
The Landscape of Ax=b Solvers The Landscape of Ax=b Solvers Pivoting LU GMRES, BiCGSTAB, Cholesky Conjugate gradient Direct A = LU Iterative y’ = Ay Non- symmetric Symmetric positive definite More Robust Less Storage (if sparse) More Robust More General
Background image of page 4
CS 240A: Solving Ax = b in parallel CS 240A: Solving Ax = b in parallel Dense A: Gaussian elimination with partial pivoting (LU) See April 15 slides Same flavor as matrix * matrix, but more complicated Sparse A: Gaussian elimination – Cholesky, LU, etc. Graph algorithms Sparse A: Iterative methods – Conjugate gradient, etc. Sparse matrix times dense vector 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
For a symmetric, positive definite matrix: 1. Matrix factorization: A = LL T ( Cholesky factorization ) 1. Forward triangular solve: Ly = b 2. Backward triangular solve: L T x = y For a nonsymmetric matrix: 1. Matrix factorization: PA = LU ( Partial pivoting ) 2. . . . Gaussian elimination to solve Gaussian elimination to solve Ax = b Ax = b
Background image of page 6
Sparse Column Cholesky Factorization Sparse Column Cholesky Factorization for j = 1 : n L(j:n, j) = A(j:n, j); for k < j with L(j, k) nonzero % sparse cmod(j,k) L(j:n, j) = L(j:n, j) – L(j, k) * L(j:n, k); end ; % sparse cdiv(j) L(j, j) = sqrt(L(j, j)); L(j+1:n, j) = L(j+1:n, j) / L(j, j); end ; Column j of A becomes column j of L L L L T A j
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Irregular mesh: NASA Airfoil in 2D Irregular mesh: NASA Airfoil in 2D
Background image of page 8
Graphs and Sparse Matrices Graphs and Sparse Matrices : Cholesky factorization : Cholesky factorization 10 1 3 2 4 5 6 7 8 9 10 1 3 2 4 5 6 7 8 9 G(A) G + (A) [chordal] Symmetric Gaussian elimination: for j = 1 to n add edges between j’s higher-numbered neighbors Fill : new nonzeros in factor
Background image of page 9

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

View Full DocumentRight Arrow Icon
Permutations of the 2-D model problem Permutations of the 2-D model problem Theorem: With the natural permutation, the n-vertex model problem has
Background image of page 10
Image of page 11
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 / 33

cs240a-sparse - CS 240A: Solving Ax = b in parallel CS...

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

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