It appears that we get triples like (i,j, value) type when using your suggestion. This is for the output of the A-matrix in linsys_a.dat This is not CRS but good for own cross checks. Is this the ListMatrix format type?
Thanks K Batra
Compute or store the CRS matrices
-
- Site Admin
- Posts: 4698
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Compute or store the CRS matrices
Hi
It is a tuple because CRS matrix may then be written as a regular Nx3 matrix. This is convenient to read with any other software. Still internally it is treated in CRS format.
List matrix is a "singly linked list" such that each row has its own list. The nice thing with list structure is that you can add a new entry to any location without the need to redo the whole matrix. List matrix has only some add/remove operations. After the matrix is ready it is always swicthed to CRS format for which matrix operations are much faster, most importantly matrix-vector product.
-Peter
It is a tuple because CRS matrix may then be written as a regular Nx3 matrix. This is convenient to read with any other software. Still internally it is treated in CRS format.
List matrix is a "singly linked list" such that each row has its own list. The nice thing with list structure is that you can add a new entry to any location without the need to redo the whole matrix. List matrix has only some add/remove operations. After the matrix is ready it is always swicthed to CRS format for which matrix operations are much faster, most importantly matrix-vector product.
-Peter