Compute or store the CRS matrices

Post processing utility for Elmer
Posts: 13
Joined: 07 Sep 2023, 15:42
Antispam: Yes

Re: Compute or store the CRS matrices

Post 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
Site Admin
Posts: 4843
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland

Re: Compute or store the CRS matrices

Post by raback »


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.

Post Reply