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

Add early return to solvers that apply preconditioners before first residual check #1653

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

fritzgoebel
Copy link
Collaborator

For the following solvers, in case of an alread good enough initial guess, we apply the preconditioner before checking the residual norm for the first time. That can be quite a bit of wasted effort, so I suggest adding a residual norm check to avoid it.

I added it for CG here, if we agree this is reasonable, it would also be applicable to

  • BiCG
  • FCG
  • GCR

@fritzgoebel fritzgoebel added is:enhancement An improvement of an existing feature. mod:core This is related to the core module. is:idea Just a thought - if it's good, it could evolve into a proposal. type:solver This is related to the solvers is:affects-performance This is related to something which affects performance. 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. labels Jul 24, 2024
@fritzgoebel fritzgoebel self-assigned this Jul 24, 2024
Copy link
Member

@pratikvn pratikvn left a comment

Choose a reason for hiding this comment

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

You need to update the benchmark and example outputs, but otherwise, I think this looks good.

@MarcelKoch MarcelKoch added this to the Ginkgo 1.9.0 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. is:affects-performance This is related to something which affects performance. is:enhancement An improvement of an existing feature. is:idea Just a thought - if it's good, it could evolve into a proposal. mod:core This is related to the core module. type:solver This is related to the solvers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants