Skip to content

Fix preconditioner update wrapper and usage.#6977

Merged
bska merged 1 commit intoOPM:masterfrom
atgeirr:fix-rebuild-duneilu
Apr 9, 2026
Merged

Fix preconditioner update wrapper and usage.#6977
bska merged 1 commit intoOPM:masterfrom
atgeirr:fix-rebuild-duneilu

Conversation

@atgeirr
Copy link
Copy Markdown
Member

@atgeirr atgeirr commented Apr 9, 2026

Used for the Dune::SeqILU preconditioner. Using std::reference_wrapper by calling std::cref at the call site ensures that the matrix is stored with reference semantics, instead of copying the matrix from the initial call.

Also remove some unnecessary (and misleading) use of && and std::forward.

For the manual: fix the "duneilu" preconditioner choice available through the JSON interface for the linear solver.

@atgeirr atgeirr added the manual:bugfix This PR is a bug fix and should be noted in the manual label Apr 9, 2026
@atgeirr atgeirr added this to the Release 2026.04 milestone Apr 9, 2026
@atgeirr
Copy link
Copy Markdown
Member Author

atgeirr commented Apr 9, 2026

Closes #5781

@atgeirr
Copy link
Copy Markdown
Member Author

atgeirr commented Apr 9, 2026

jenkins build this please

Copy link
Copy Markdown
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Good catch!

Other than a minor issue concerning the include statements in PreconditionerWithUpdate.hpp, this looks good to me.

#define OPM_PRECONDITIONERWITHUPDATE_HEADER_INCLUDED

#include <dune/istl/preconditioner.hh>
#include <functional>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very strictly speaking, <functional> is unused in this file. On the other hand, we should #include <tuple> to bring in a declaration of the std::tuple class.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed.

Used for the Dune::SeqILU preconditioner.
Using std::reference_wrapper by calling std::cref at the
call site ensures that the matrix is stored with reference
semantics, instead of copying the matrix from the initial call.
@atgeirr atgeirr force-pushed the fix-rebuild-duneilu branch from ec6b471 to f215c35 Compare April 9, 2026 12:43
@atgeirr
Copy link
Copy Markdown
Member Author

atgeirr commented Apr 9, 2026

jenkins build this please

Copy link
Copy Markdown
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the updates. This looks good to me now and I'll merge into master.

@bska bska merged commit 5253f3b into OPM:master Apr 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:bugfix This PR is a bug fix and should be noted in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants