Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds (S)SOR Preconditioner #1633

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Adds (S)SOR Preconditioner #1633

wants to merge 7 commits into from

Conversation

MarcelKoch
Copy link
Member

@MarcelKoch MarcelKoch commented Jun 27, 2024

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:

@MarcelKoch MarcelKoch self-assigned this Jun 27, 2024
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:testing This is related to testing. mod:core This is related to the core module. mod:cuda This is related to the CUDA module. mod:reference This is related to the reference module. type:preconditioner This is related to the preconditioners mod:hip This is related to the HIP module. type:factorization This is related to the Factorizations labels Jun 27, 2024
@MarcelKoch MarcelKoch mentioned this pull request Jun 27, 2024
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general.
I am thinking of how to add the test for GaussSeidel in a cheap way or just do not test it, which calls SOR with relaxation 1

core/test/config/preconditioner.cpp Outdated Show resolved Hide resolved
core/test/config/preconditioner.cpp Show resolved Hide resolved
include/ginkgo/core/preconditioner/gauss_seidel.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/preconditioner/gauss_seidel.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/preconditioner/sor.hpp Outdated Show resolved Hide resolved
reference/preconditioner/sor_kernels.cpp Show resolved Hide resolved
core/preconditioner/sor.cpp Outdated Show resolved Hide resolved
reference/test/preconditioner/sor_kernels.cpp Outdated Show resolved Hide resolved
include/ginkgo/core/preconditioner/sor.hpp Show resolved Hide resolved
@MarcelKoch MarcelKoch requested a review from yhmtsai July 11, 2024 07:54
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The config test from registry is not yet there

include/ginkgo/core/preconditioner/sor.hpp Outdated Show resolved Hide resolved
include/ginkgo/core/preconditioner/sor.hpp Show resolved Hide resolved
@MarcelKoch MarcelKoch requested a review from a team August 13, 2024 13:53
@MarcelKoch MarcelKoch added the 1:ST:ready-for-review This PR is ready for review label Aug 15, 2024
@MarcelKoch MarcelKoch added this to the Ginkgo 1.9.0 milestone Aug 26, 2024
@MarcelKoch MarcelKoch requested review from a team and removed request for a team August 27, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-for-review This PR is ready for review mod:core This is related to the core module. mod:cuda This is related to the CUDA module. mod:hip This is related to the HIP module. mod:reference This is related to the reference module. reg:build This is related to the build system. reg:testing This is related to testing. type:factorization This is related to the Factorizations type:preconditioner This is related to the preconditioners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants