Validate riemann_solver: require explicit value, remove unimplemented option 3#1412
Merged
sbryngelson merged 3 commits intoMFlowCode:masterfrom May 9, 2026
Merged
Conversation
… 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
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
Summary
Closes #1410.
Noneriemann_solver: Previously, omittingriemann_solverfrom a case file causedcase_validator.pyto silentlyreturnearly, and Fortran would run withriemann_solver = dflt_int = -100. Since-100is 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.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 inm_riemann_solvers.fpponly handles[1, 2, 4, 5], so selecting3caused the same silent no-op.Changes
toolchain/mfc/case_validator.py: prohibitNone, restrict valid set to[1, 2, 4, 5], updatewave_speeds/avg_statedependency checks (previously exempted3and5; now only exempt5)toolchain/mfc/params/definitions.py: remove3fromchoicesandvalue_labelsNo Fortran changes — both issues are fully caught at the Python validation layer before any input file is written.