Skip to content

Reuse iteration workspaces in BiCGstab solver - #2694

Open
PureSaber wants to merge 1 commit into
lballabio:masterfrom
PureSaber:fix/bicgstab-workspace
Open

PureSaber wants to merge 1 commit into
lballabio:masterfrom
PureSaber:fix/bicgstab-workspace

Conversation

@PureSaber

Copy link
Copy Markdown
Contributor

Summary

  • Reuse mutable workspace arrays across BiCGstab iterations instead of reallocating each solve.

Test plan

  • CI tests using BiCGstab (FD schemes); iteration counts and solutions unchanged

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Jul 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment on lines +44 to +54
const Size n = b.size();
if (workspaceX_.size() != n) {
workspaceX_.resize(n);
workspaceR_.resize(n);
workspaceRTld_.resize(n);
workspaceP_.resize(n);
workspacePTld_.resize(n);
workspaceV_.resize(n);
workspaceS_.resize(n);
workspaceSTld_.resize(n);
workspaceT_.resize(n);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is a lot of bookkeeping. Did you measure if it actually makes a difference?

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