Skip to content

tests: field totals must not change when part of the grid is refined - #7315

Draft
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/lgr-fip-invariance-test
Draft

tests: field totals must not change when part of the grid is refined#7315
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/lgr-fip-invariance-test

Conversation

@hnil

@hnil hnil commented Aug 12, 2026

Copy link
Copy Markdown
Member

Adds a comparison test asserting that refining part of the grid does not change the field totals. The two decks are identical but for the CARFIN block, so they are compared against each other — no reference data, and the test states the property directly rather than freezing whatever numbers we happen to produce today.

Stacked, and red until the rest lands:

With all three:

refined unrefined
FPR 4992.268066 4992.268066
FOIP 8.513534e+07 8.513534e+07
FRPV 1.832981e+08 1.832981e+08

REL_TOL is 1e-3 — an order of magnitude above the discretisation drift between the two grids (~1.3e-4 at the end of the run) and an order below the ~1.4e-2 error it catches.

Motivation: no LGR deck in opm-tests requests region FIP today, and only one requests FPR, so nothing in CI noticed that LGR output had stopped working.

…ined

Compares the refined and unrefined twins of SPE1CASE1_CARFIN1-3DCORNERPOINT_XYZ
against each other, so no reference data is involved and the test states the
property directly.

The tolerance is 1e-3: an order of magnitude above the discretisation drift
between the two grids (~1.3e-4 by the end of the run) and an order below the
~1.4e-2 error it catches.

Needs the twin deck from OPM/opm-tests#1558, and the fixes in OPM#7245 and OPM#7244 -
on master all cell-based output is zero once an LGR is present.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hnil hnil added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant