Implementing the simplicial LDL^T CHOLMOD for a sparse band matrix with zero diagonals in C++

173 views Asked by At

I am implementing the simplicial LDL^T CHOLMOD to solve a linear equation system in my C++ project which has a sparse band matrix (dimension is between 1,000 to 3,000). The matrix has several zero diagonals, hence sometimes CHOLMOD gives the wrong results for some projects/matrices.

I used CHOLMOD(dbound) to modify the zero diagonals. It works by giving the right results but only if the dbound is small, in my case it should be less than 2.0E-8. The problem is that CHOLMOD becomes slow. If I use dbound greater than 4.0E-3, CHOLMOD will be 3-4x faster than if I use 2.0E-8 dbound (but gives the wrong results).

Is this expected? Is there a way I can both get the right result and maintain the CHOLMOD performance? I tried many other solutions such as modifying the zero diagonals or dk[0] (e.g. line 414 in t_cholmod_rowfac.c) manually and but they will also deteriorate the performance (but give the right results). Thank you so much for reading and your help in advance.

PS. Apology for not providing the code because of confidentiality. I just want to get your suggestions in general. But if a sample code is needed for you to give suggestions, I'll try to provide one.

0

There are 0 answers