Don't Lose Events Introduced Immediately After Restart #4417
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 092f0a2 (PR #4108) introduced logic to ensure that events added at the restart time–e.g., group level controls–would be available during the first time step after restart. This empirically improved non-linear convergence for certain field cases.
This change did however have the unintended side effect of clearing any other events that might happen on the first report step after the restart time. If, in particular, that included introducing a new well (WELSPECS keyword), then the events system would lose the new well and any subsequent changes to the well (e.g., WCONPROD or WELOPEN) would then throw an exception for the unknown well in
This PR switches the unconditional 'update_wellgroup_events()' call of commit 092f0a2 into using a new member function
instead. This maintains the intended effect of commit 092f0a2, while also preserving any other events that might happen immediately after the restart time.