Skip to content

Remove MHD + Lax-Friedrichs - #1722

Open
ChrisZYJ wants to merge 2 commits into
MFlowCode:masterfrom
ChrisZYJ:fix_MHD_LF
Open

Remove MHD + Lax-Friedrichs#1722
ChrisZYJ wants to merge 2 commits into
MFlowCode:masterfrom
ChrisZYJ:fix_MHD_LF

Conversation

@ChrisZYJ

Copy link
Copy Markdown
Contributor

Description

Bug fix, Closes #1661.

Deletes the unreachable MHD and RMHD branches from src/simulation/m_riemann_solver_lf.fpp (state blocks, momentum/energy flux arms, induction-equation flux block, c_fast computation, and the associated declarations/GPU-private-list entries). Adds the missing Fortran-side check in src/simulation/m_checker.fpp

Note: The deletion choice follows from the #1661 review's suggested resolution. The MHD code in LF was never reachable through the toolchain, and the implementation has subtle bugs (like Rusanov bound only using the acoustic sound speed).

Net LOC

src: −154/+16 (m_riemann_solver_lf.fpp +14/−154, m_checker.fpp +2).

Testing

Passed local tests.

Checklist

Check these like this [x] to indicate which of the below applies.

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

AI code reviews

Reviews are not retriggered automatically. To request a review, comment on the PR:

  • @claude full review — Claude full review (also triggers on PR open/reopen/ready)
  • Or add label claude-full-review — Claude full review via label

@ChrisZYJ
ChrisZYJ requested a review from sbryngelson as a code owner August 11, 2026 08:29
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.37%. Comparing base (ae4b4c4) to head (c7e5be3).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/simulation/m_riemann_solver_lf.fpp 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1722      +/-   ##
==========================================
+ Coverage   61.21%   61.37%   +0.16%     
==========================================
  Files          84       84              
  Lines       21601    21542      -59     
  Branches     3195     3189       -6     
==========================================
- Hits        13223    13222       -1     
+ Misses       6209     6153      -56     
+ Partials     2169     2167       -2     

☔ View full report in Codecov by Harness.
📢 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.

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.

MHD branches in m_riemann_solver_lf.fpp are unreachable (validator forbids MHD + Lax-Friedrichs)

1 participant