Skip to content

Clean up class ExampleHelper#406

Merged
pelesh merged 6 commits intodevelopfrom
slaven/example_helper_fix
Feb 4, 2026
Merged

Clean up class ExampleHelper#406
pelesh merged 6 commits intodevelopfrom
slaven/example_helper_fix

Conversation

@pelesh
Copy link
Collaborator

@pelesh pelesh commented Feb 4, 2026

Description

Simplify class ExampleHelper and remove redundant code.

Proposed changes

  • Remove set and reset helper functions.
  • Print summary functions now compute all norms before printing.
  • GMRES solvers now return relative residual instead of absolute residual.
    • GMRES solvers still use absolute residual for exit criteria; this needs to be addressed separately from this PR.
  • Modified examples to use simplified ExampleHelper class.

Checklist

  • All tests pass (make test and make test_install per testing instructions). Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • I have manually run the non-experimental examples and verified that residuals are close to machine precision. (In your build directory run:
    ./examples/<your_example>.exe -h to get instructions how to run examples). Code tested on:
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • N/A There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • N/A I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

Further comments

@pelesh pelesh self-assigned this Feb 4, 2026
@pelesh pelesh added the examples label Feb 4, 2026
@pelesh pelesh added this to the Release 0.99.3 milestone Feb 4, 2026
Copy link
Collaborator

@KakeruUeda KakeruUeda left a comment

Choose a reason for hiding this comment

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

Tested on CUDA backend. All tests passed and examples ran successfully.

Copy link
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

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

Looks good, approved.
Tests pass on CUDA, HIP, and CPU. Please fix the minor comment issue.

Co-authored-by: Shaked Regev <35384901+shakedregev@users.noreply.github.com>
@pelesh pelesh merged commit d06692e into develop Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants