Page 2 of 2

Re: Compute or store the CRS matrices

Posted: 17 Nov 2023, 17:39
by kbatra
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

Re: Compute or store the CRS matrices

Posted: 17 Nov 2023, 21:57
by raback
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