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

Small: Add option for making residual tolerance relative to rhs in BiCGSTAB #1140

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

lroberts36
Copy link
Collaborator

@lroberts36 lroberts36 commented Jul 24, 2024

PR Summary

Allow for specifying the convergence tolerance in BiCGSTAB to be relative to the RMS of the input right hand side. Additionally, make the tolerance a shared pointer so that it can be more cleanly updated within a downstream task list.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

Copy link
Collaborator

@pgrete pgrete left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -34,18 +34,20 @@ namespace solvers {
struct BiCGSTABParams {
MGParams mg_params;
int max_iters = 1000;
Real residual_tolerance = 1.e-12;
std::shared_ptr<Real> residual_tolerance = std::make_shared<Real>(1.e-12);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity: Why is this shared pointer?

Copy link
Collaborator Author

@lroberts36 lroberts36 Jul 24, 2024

Choose a reason for hiding this comment

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

So that it can be pulled out by a downstream code and updated within a task in a task list. Obviously this isn't completely necessary, but I think it makes it clearer that this can be updated elsewhere.

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

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

LGTM

@lroberts36 lroberts36 changed the base branch from lroberts36/fix-iterative-task-qualifiers to develop July 25, 2024 20:33
@lroberts36 lroberts36 merged commit 6379a93 into develop Jul 25, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants