Skip to content

NewtonIterationContext: RAII guard for mid-step setup passes - #7255

Open
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/newton-setup-context-guard
Open

NewtonIterationContext: RAII guard for mid-step setup passes#7255
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/newton-setup-context-guard

Conversation

@hnil

@hnil hnil commented Jul 31, 2026

Copy link
Copy Markdown
Member

Adds SetupIterationContextGuard, analogous to the existing LocalContextGuard: reset the iteration context so a re-run setup pass performs its iteration-0 initialization, restore on destruction. No behaviour change without a caller; needed when the well structure changes mid-step (e.g. fracture-created connections).

Add SetupIterationContextGuard: an RAII guard (analogous to
LocalContextGuard) that saves the iteration context, resets it so the
next nonlinear iteration performs its once-per-timestep initialization
at iteration 0, and restores the original context afterwards.  Needed
by models that re-run a parent setup iteration after the well
structure changed mid-step (e.g. fracture-created connections).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hnil hnil added the manual:enhancement This is an enhancement/improvent that needs to be documented in the manual label Jul 31, 2026
@hnil
hnil requested review from svenn-t and totto82 July 31, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:enhancement This is an enhancement/improvent that needs to be documented in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant