11.07.2015 Views

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Plot<strong>Sparse</strong>ReadHB<strong>Sparse</strong>cond2spcondestsprafiterres with precplot the pattern of non nul elements of a sparse matrixread a Harwell-Boeing sparse format filecomputes an approximation of the 2-norm conditionnumber of a s.p.d. sparse matrixestimate the condition number of a sparse matrix(obsolete) iterative refinement for a s.p.d. linear systemcomputes the residual r = Ax-b with precisionFigure 4 – Functions from the umfpack module.( 1, 3) 1.( 2, 4) 1.( 3, 5) 1.( 4, 2) 1.( 5, 1) 1.R =( 5, 5) sparse matrix( 1, 1) 1.4142136( 2, 1) - 0.7071068( 2, 2) 1.2247449( 3, 3) 1.4142136( 4, 3) - 0.7071068( 4, 4) 1.2247449( 5, 2) - 0.8164966( 5, 4) - 0.8164966( 5, 5) 0.8164966According <strong>to</strong> [8], the spchol function uses two Fortran packages : a sparseCholesky fac<strong>to</strong>rization package developed by Esmond Ng and Barry Pey<strong>to</strong>nat ORNL and a multiple minimun-degree ordering package by Joseph Liu atUniversity of Waterloo.5 Functions from the UMFPACK moduleThe UMFPACK module provide several functions related <strong>to</strong> sparse matrices.These functions are presented in the figure figure 4.<strong>In</strong> the following script, we read a sparse matrix provided in the Umfpackmodule with the ReadHB<strong>Sparse</strong> function. Then we plot the sparsity patternwith the Plot<strong>Sparse</strong> function.16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!