Skip to content

Fix crash in IncompleteCholesky when the input has zeros on the diagonal.

The incomplete Cholesky algorithm adds a positive shift to the diagonal of the original matrix until the factorization suceeds. If the original matrix has an implicit zero on the diagonal, there is no space for such a value in the sparse data-structure and the code ends up asserting, trying to modify the nnz+1'st element of the value array. This change inspects the diagonal of the input and inserts explicit zero values before computing the factorizing.

Fixes #2548 (closed)

Edited by Rasmus Munk Larsen

Merge request reports

Loading