Skip to content

Validate riemann_solver: require explicit value, remove unimplemented option 3#1412

Merged
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:fix/riemann-solver-validation
May 9, 2026
Merged

Validate riemann_solver: require explicit value, remove unimplemented option 3#1412
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:fix/riemann-solver-validation

Conversation

@sbryngelson
Copy link
Copy Markdown
Member

Summary

Closes #1410.

  • Prohibit None riemann_solver: Previously, omitting riemann_solver from a case file caused case_validator.py to silently return early, and Fortran would run with riemann_solver = dflt_int = -100. Since -100 is not in the Fypp dispatch list [1, 2, 4, 5], no Riemann solver would execute and fluxes would retain garbage values — leading to silent blow-up rather than an actionable error.
  • Remove riemann_solver = 3 ("Exact"): This value has never been implemented. It was accepted by the validator and the parameter definition, but the Fypp dispatch loop in m_riemann_solvers.fpp only handles [1, 2, 4, 5], so selecting 3 caused the same silent no-op.

Changes

  • toolchain/mfc/case_validator.py: prohibit None, restrict valid set to [1, 2, 4, 5], update wave_speeds/avg_state dependency checks (previously exempted 3 and 5; now only exempt 5)
  • toolchain/mfc/params/definitions.py: remove 3 from choices and value_labels

No Fortran changes — both issues are fully caught at the Python validation layer before any input file is written.

… option 3

- case_validator.py: prohibit None riemann_solver (was silently ignored), restrict valid
  choices to [1,2,4,5], update wave_speeds/avg_state dependency checks accordingly
- definitions.py: remove riemann_solver=3 (Exact) from choices and value_labels since
  it has never been implemented and silently dispatched nothing at runtime

Fixes MFlowCode#1410
@qodo-code-review
Copy link
Copy Markdown
Contributor

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.92%. Comparing base (141ff01) to head (249ecc4).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1412      +/-   ##
==========================================
+ Coverage   64.90%   64.92%   +0.02%     
==========================================
  Files          72       72              
  Lines       18874    18855      -19     
  Branches     1571     1570       -1     
==========================================
- Hits        12250    12242       -8     
+ Misses       5649     5639      -10     
+ Partials      975      974       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbryngelson sbryngelson merged commit 3ac6f68 into MFlowCode:master May 9, 2026
137 of 138 checks passed
@sbryngelson sbryngelson deleted the fix/riemann-solver-validation branch May 9, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Silent blow-up when riemann_solver is unspecified: default dflt_int=-100 dispatches no solver, flux_n retains garbage

1 participant