finesse.cymath.cmatrix.KLUMatrix.refactor

KLUMatrix.refactor(self)

Refactor the matrix using KLU.

This method attempts to refactor the matrix using klu_zl_refactor. If the refactorization is not successful and the matrix appears singular (status code 1), it tries to factor the matrix again using the factor method. If the matrix is still not factorizable, an exception is raised.

Raises
RuntimeError

If an error occurs in KLU during refactorization and the matrix does not appear singular, a runtime error is raised with a message indicating the status code and its corresponding string.