Skip to content

Conversation

@ASunil-17
Copy link
Collaborator

…om issue # 376

Description

Updated to LinSolverIterativeFGMRES and LinSolverIterativeRandFGMRES. These functions are now configured to solve the residual equation for an update. This update is added to the initial guess solution we obtain from the direct solution. Also included in this version is a random vector generator, and CSR validator in ExampleHelper.hpp class. This is useful for error based analysis of the solvers and general debugging.

_Closes # 376

_Mentions @shakedregev

Proposed changes

Allocate two additional vectors for the residual calculation, std::mt19937 engine(static_cast (std::time(nullptr))); for random number generation, and three host arrays for CSR validation.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here
to help! This is simply a reminder of what we are going to look for before
merging your code.

  • All tests pass. 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.
  • [] There are unit tests for the new code.
  • The new code is documented.
  • [] The feature branch is rebased with respect to the target branch.

Further comments

I'm making this a draft pull request because I would like to ensure I am meeting all the Re::Solve style guidelines before making a review request.

@shakedregev
Copy link
Collaborator

shakedregev commented Sep 30, 2025

Is this a draft, or ready for review? Style guidelines is part of review.

@ASunil-17
Copy link
Collaborator Author

Hello Shaked, this is a draft of a review. I made sure to clear out the binary files from the examples sub-directory. What happened was that I accidentally initialised a git repo in that sub-directory.

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.

The style seems fine. There are some naming convention mismatches that were carried over. Missing a test.

@shakedregev shakedregev added this to the Release 0.99.3 milestone Oct 2, 2025
@ASunil-17 ASunil-17 closed this Oct 24, 2025
@ASunil-17 ASunil-17 deleted the sunil/FGMRESupdated branch October 24, 2025 14:12
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.

2 participants