FlowProblem: drop a stray cell-index assignment in updateMaxWaterSaturation_ - #7296
Open
hnil wants to merge 1 commit into
Open
FlowProblem: drop a stray cell-index assignment in updateMaxWaterSaturation_#7296hnil wants to merge 1 commit into
hnil wants to merge 1 commit into
Conversation
…ration_
maxWaterSaturation_ is a std::vector<Scalar> sized by the number of grid
cells and indexed by element index everywhere it is used. It has no
time dimension, so
maxWaterSaturation_[/*timeIdx=*/1] = maxWaterSaturation_[/*timeIdx=*/0];
does not shift a time level -- it overwrites cell 1's running maximum
with cell 0's. Since the per-cell update that follows only ever raises
the value, cell 1 keeps the wrong maximum whenever cell 0 is the larger
of the two.
The structurally identical updateMinPressure_(), which serves the same
ROCKCOMP path, has no such line.
Only affects ROCKCOMP runs, and only cell 1. SPE1CASE2_ROCK2DTR is
byte-identical with and without this change, because cells 0 and 1 reach
the same maximum there.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
jenkins build this please |
Member
|
jenkins build this failure_report please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
maxWaterSaturation_is astd::vector<Scalar>sized by grid cells and indexed by element index everywhere it is used (FlowProblem.hpp:1170,:1395,:1594,:1845,FlowGenericProblem_impl.hpp:621). It has no time dimension, sodoes not shift a time level — it overwrites cell 1's running maximum with cell 0's. The per-cell update that follows only ever raises values, so cell 1 keeps the wrong maximum whenever cell 0 is the larger of the two.
updateMinPressure_()is the structural twin on the same ROCKCOMP path and has no such line.Affects ROCKCOMP runs only, and only cell 1.
SPE1CASE2_ROCK2DTRis byte-identical with and without the change, because cells 0 and 1 reach the same maximum there — so it is latent on the decks in the test suite.Found while auditing #7198: this line is the sole reason that rolling
maxWaterSaturation_back across a failed timestep changes results. Every other quantity in that snapshot is a plain monotone extremum recomputed from the restored solution, hence idempotent; this one is not, purely because of this assignment.