JuliaLinearAlgebra / Preconditioners.jl

A few preconditioners for iterative solvers.
https://julialinearalgebra.github.io/Preconditioners.jl/
Other
50 stars 11 forks source link

Allow reordering for incomplete cholesky #30

Closed learning-chip closed 1 year ago

learning-chip commented 1 year ago

Reordering can reduce fill-in for both complete and incomplete factorizations. The CholeskyPreconditioner calls lldl() in LimitedLDLFactorizations.jl, but without suppling the reorder parameter:

https://github.com/JuliaLinearAlgebra/Preconditioners.jl/blob/52b3702e9c8c5d42d6092ed2df7efdbe07c81411/src/incompletecholesky.jl#L8-L13

In lldl's example, AMD or METIS reordering can be used like:

AMD_P = amd(K1)
METIS_P, METIS_invP = Metis.permutation(K)
...
LLDL, t, b, g, m = @timed lldl(K1, Kdiag, AMD_P, memory = p)
...
LLDL, t, b, g, m = @timed lldl(K1, Kdiag, METIS_P, memory = p)
mohamed82008 commented 1 year ago

A PR would be welcome :)

mohamed82008 commented 1 year ago

Fixed by #32.