Skip to content

Unify per-solver elastic interface physics after the formulation rulings #1578

Description

@sbryngelson

Motivation

Four findings from the 2026-06 series share one root cause: elastic feature physics was implemented per-Riemann-solver and the copies drifted independently —

#1572 unified the hypoelastic interface energy under maintainer rulings and proved the pattern: one GPU_ROUTINE helper, dead copies deleted, golden suite + <5% benchmark gates. The wave-speed and flux blocks remain per-solver, and the open questions above block unifying them — these are physics formulation decisions, not refactoring decisions.

Proposal

After the elasticity authors rule on #1557/#1570/#1571:

  1. Unify the elastic wave-speed estimation into a shared helper in m_riemann_state (the ruled-correct formulation), parameterized only where the ruling says solvers should genuinely differ.
  2. Delete the remaining dead hypoelastic flux/stress blocks in LF and HLLC (the validator restricts hypoelasticity to HLL; the blocks read state nothing writes since Phase-3: Riemann hot-path decomposition into shared GPU device helpers #1572's deletions) — net-negative LOC, zero behavior.
  3. Add the Fortran-side backstop: an @:PROHIBIT mirroring the hypoelasticity-requires-HLL restriction in src/simulation/m_checker.fpp, so the toolchain-bypass route (HLL hyperelastic wave-speed branch reads shear moduli that only the hypoelastic path initializes #1571's reachability) is closed regardless of the constraint-unification proposal's timeline.
  4. Apply the offset fix from the HLL hypoelastic damage load reads the LEFT cell's damage for the RIGHT state (missing +1 offset) #1570 ruling (a one-character change if unintentional).

Execution sketch

Identical machinery to #1572: investigation-first mapping of every elastic block per solver, rulings encoded as binding constraints in the implementation plan, helper extraction with the caller-loads/helper-computes pattern (documented in gpuParallelization.md), per-commit emitted-equivalence where behavior-preserving and explicit behavior notes where the rulings change results, golden suite + per-solver benchmark gates (the hypo_hll case directly exercises this path).

Effort: small-moderate once unblocked. Risk: low for items 2-3 (deletion + checker); item 1's risk is owned by the physics ruling, not the refactor. Blocked on: #1557, #1570, #1571.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions