Loading [MathJax]/jax/output/HTML-CSS/jax.js

Monday, June 3, 2013

Sparse exercise: a potential interface for ITSOL or CRS-based functions

The user wants to factorize this sparse matrix


A=(1000003007004502006000008)

Get the matrix into Octave

Just provide a Matrix with three columns:

>> A_sparse = spconvert([...
     1 4 2 3 3 4 2 5; % row indices
     1 1 2 3 4 4 5 5; % column indices
     1 2 3 4 5 6 7 8  % non-zero values
     ]')

A_sparse =

Compressed Column Sparse (rows = 5, cols = 5, nnz = 8 [32%])

  (1, 1) ->  1
  (4, 1) ->  2
  (2, 2) ->  3
  (3, 3) ->  4
  (3, 4) ->  5
  (4, 4) ->  6
  (2, 5) ->  7
  (5, 5) ->  8

What needs to be passed to ITSOL

The approach I would favor in order to interface the ITSOL library is to factorize the transposed matrix to avoid timing problems resulting from input and output format conversion.
A=LUAT=UTLT
Conversion with implicit tranposition.

Information on the Octave sparse matrix format:

No comments:

Post a Comment