lecture_08_SparseMatrices_pg06

lecture_08_SparseMatrices_pg06 - 1 P573 Scientific...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 1 P573 Scientific Computing Lecture 8 - Sparse Matrices Peter Gottschling pgottsch@cs.indiana.edu www.osl.iu.edu/~pgottsch/courses/p573-06 2/27/06 P573 - Lecture 8: Sparse Matrices 2 Overview n Structured sparse matrices n Band matrices n Matrix vector product n Unstructured matrices n Matrix vector product n Other operations n Insertion 2/27/06 P573 - Lecture 8: Sparse Matrices 3 Tridiagonal Matrices n Diagonal and off-diagonals are only non-zero n For instance 1D-Poisson equation n Can be stored as vectors ! ! ! ! ! ! ! ! ! ! ! ! " # $ $ $ $ $ $ $ $ $ $ $ $ % & () ( * * * * * * * * * * * * * + ,------------- . / 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 2/27/06 P573 - Lecture 8: Sparse Matrices 4 Band Matrices n Extension of tridiagonal matrices n An (l, u)-m n band matrices has n Only non-zeros in l diagonals below the main diagonal n Only non-zeros in u diagonals above the main diagonal n Formally: i " j > l # a ij = j " i > u # a ij = 2 2/27/06 P573 - Lecture 8: Sparse Matrices 5 Matrix of 2D-Poisson Equation n Off-diagonals with non-zeros only doesnt need to stored n Instead of 0 diagonals we store offsets of non-zero off- diagonals n In example of 3x3 domain: {-3, -1, 0, 1, 3} = {o , ..., o n } !...
View Full Document

Page1 / 4

lecture_08_SparseMatrices_pg06 - 1 P573 Scientific...

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

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