ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
384 stars 86 forks source link

Adds (S)SOR Preconditioner #1633

Open MarcelKoch opened 3 days ago

MarcelKoch commented 3 days ago

This PR adds the core and reference implementation of a (S)SOR preconditioner. It uses triangular solves to apply the preconditioner. The preconditioner is either a single lower triangular solver, or a lower triangular solve followed by an upper triangular one. Thus the preconditioner is represented as a gko::Combination. The Sor class itself is only a linop factory, similar to the Lu factorization. It can be parameterized by the relaxation_factor (0 < w < 2), symmetric or not (sym version has the two triangular solves), and the solver factories for the upper and lower triangular matrices.

This also adds a Gauss-Seidel preconditioner as a special case of SOR.

Todo: