On page 18 of SuperLU's user guide, the following sample input matrix A
is given:
19,0,21,21,0
12,21,0,0,0
0,12,16,0,0
0,0,0,5,21
12,12,0,0,18
U
matrix is given as follow in the user guide:
19,0,21,21,0
0,21,-13.26,-13.26,0
0,0,23.58,7,58,0
0,0,0,5,21
0,0,0,0,34.2
But dgssv()
produces the following matrix, which is printed via dPrint_CompCol_Matrix("U", U)
CompCol matrix U:
Stype 0, Dtype 1, Mtype 4
nrow 5, ncol 5, nnz 11
nzval: 21.000000 -13.263158 7.578947 21.000000
rowind: 0 1 2 0
colptr: 0 0 0 1 4 4
The U
matrix given in the user guide is correct (you can verify it at this link). I wonder why SuperLU produces such a matrix. How can I generate correct U
matrix from the SuperLU output?
P.S. For ordering columns of A
, I have used my permutation vector, which is 1,2,3,4,5. In other words, there is no reordering for columns. Rows of A
are not reordered by SuperLU.