Conversation
hnil
force-pushed
the
pr/cpr-dof-weights
branch
from
August 4, 2026 12:37
180de88 to
c9ede47
Compare
hnil
force-pushed
the
pr/cpr-dof-weights
branch
from
August 11, 2026 08:23
c9ede47 to
4ecdd77
Compare
hnil
force-pushed
the
pr/cpr-dof-weights
branch
2 times, most recently
from
August 12, 2026 07:43
7b5a9ea to
7224d4b
Compare
hnil
force-pushed
the
pr/cpr-dof-weights
branch
from
September 18, 2026 07:33
7224d4b to
638ad5b
Compare
Member
Author
|
jenkins build this please |
Two facts a caller needs before walking degrees of freedom instead of elements: whether the residual's computeStorage() takes intensive quantities alone (true for the blackoil TPFA residual), and whether the intensive quantities can be read by index (the cache is on). No behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The weight depends only on a degree of freedom's own intensive quantities and primary variables. When those can be read by index, walk the degrees of freedom instead of the elements; that also reaches degrees of freedom without an element. The element walk remains for the other case. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…esidual allows The weight comes from a degree of freedom's storage term and volume only. When the residual can form that storage from intensive quantities read by index (the blackoil TPFA residual), walk the degrees of freedom; otherwise keep the element walk, so the element-based residual is unaffected. dofTotalVolume() is the volume the element walk reads off the stencil. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hnil
force-pushed
the
pr/cpr-dof-weights
branch
from
September 22, 2026 08:33
638ad5b to
7dcc968
Compare
This branch has not been deployed
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.
Both true-IMPES weight formulas depend only on a degree of freedom's own intensive
quantities -- and, for the non-analytic one, its own volume. No neighbours, no geometry.
Walking the grid's elements to evaluate them is therefore not necessary, and it is the
only thing tying these weights to the grid.
The choice between the two walks is made on two facts a model can now be asked for
directly:
formsStorageFromIntensiveQuantitieson the residual --BlackOilLocalResidualTPFAhas the
computeStorage()overload taking intensive quantities alone, theelement-by-element residual does not.
intensiveQuantityCacheEnabled()on the model -- the indexed lookup is valid onlywhen the cache is on.
storeIntensiveQuantities()does not answer that, being truealso when only the thermodynamic hints are kept.
The element walk is kept and taken whenever either is missing, so
flow_blackoil_legacyassemblyand anything else on the element-based residual isunaffected.
dofTotalVolume()is the same quantity the element walk reads off the stencil --accumulated once per degree of freedom and completed over process boundaries by the sum
handle -- minus the extrusion factor, which is applied explicitly.
Verified on SIMPLE_MECH_NX_11_NY_11_NZ_25_FRAC_SEQ: 252 summary vectors identical to
1e-12 under
cpr_trueimpes, and a 13-test local regression set unchanged undercpr_trueimpesanalytic. Draft: I have not run the full opm-tests suite.Motivation is work on flow degrees of freedom that have no grid element (numerical
aquifers and embedded fractures as auxiliary DOFs), which cannot be given a weight at all
today -- but the change stands on its own.
🤖 Generated with Claude Code