Skip to content

Replace trueimpes' hard-coded pressure_scale with row equilibration - #7285

Draft
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/trueimpes-row-equilibration
Draft

Replace trueimpes' hard-coded pressure_scale with row equilibration#7285
hnil wants to merge 1 commit into
OPM:masterfrom
hnil:pr/trueimpes-row-equilibration

Conversation

@hnil

@hnil hnil commented Aug 6, 2026

Copy link
Copy Markdown
Member

The 50e5 factor on the pressure row of the local trueimpes solve is a no-op in exact arithmetic: the rhs is a unit vector, so any row scaling cancels in the abs_max normalisation. Replace it with a power-of-two equilibration of all rows, which conditions the small dense solve without a magic constant. Verified behaviour-neutral on SPE1CASE1 and SPE9_CP (iteration shifts at pivoting-noise level, SPE9 cprw unchanged at 439).

🤖 Generated with Claude Code

The 50e5 factor on the pressure row of block_transpose was a no-op in exact
arithmetic: the rhs of the local solve is a unit vector, so scaling row p by
s yields w = B^-T e_p / s, and the subsequent abs_max normalisation divides
the factor straight back out. Its only effect was to condition the small
dense solve, since the pressure row of a storage derivative is tiny relative
to the others.

Equilibrate all rows to unit max magnitude instead, with power-of-two
factors so the scaling introduces no rounding. Same cancellation argument,
no magic constant, and every row is conditioned rather than just the
pressure one. Verified behaviour-neutral on SPE1CASE1 (trueimpes
383/322/445 -> 376/317/440; default cprw 443 -> 437 - pivoting noise).

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 Aug 7, 2026
@hnil
hnil marked this pull request as draft August 7, 2026 15:35
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