Skip to content

Restore negative slopes in the SUPERBEE limiter - #1829

Closed
aliencaocao wants to merge 1 commit into
MFlowCode:masterfrom
aliencaocao:fix/muscl-superbee-sign
Closed

Restore negative slopes in the SUPERBEE limiter#1829
aliencaocao wants to merge 1 commit into
MFlowCode:masterfrom
aliencaocao:fix/muscl-superbee-sign

Conversation

@aliencaocao

@aliencaocao aliencaocao commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #1819. For context and description of issue and fix, please refer to the issue thread.

Contribution Policy

We do not accept pull requests generated primarily by AI without genuine understanding or real-world usage context.

All contributions are expected to demonstrate:

  • A clear understanding of the codebase
  • Alignment with product direction
  • Thoughtful reasoning behind changes
  • Evidence of real-world usage or hands-on experience with the problem

If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.


Acknowledgement

  • I confirm this PR meets the above expectations and reflects my own understanding and real-world context.

PR template credit: junegunn

Copilot AI lite review requested due to automatic review settings September 5, 2026 19:13
@sbryngelson

Copy link
Copy Markdown
Member

pr no checkmark

@sbryngelson sbryngelson closed this Sep 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Restores correct sign handling for negative slopes in the SUPERBEE limiter to address issue #1819.

Changes:

  • Adjusts SUPERBEE-limited slope sign based on the left slope sign.
  • Ensures reconstructed slopes can be negative when appropriate.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

slope = -1._wp*min(-min(2._wp*abs(slopeL), abs(slopeR)), -min(abs(slopeL), &
& 2._wp*abs(slopeR)))
end if
if (slopeL < 0._wp) slope = -slope
Comment on lines 203 to +206
slope = -1._wp*min(-min(2._wp*abs(slopeL), abs(slopeR)), -min(abs(slopeL), &
& 2._wp*abs(slopeR)))
end if
if (slopeL < 0._wp) slope = -slope
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/simulation/m_muscl.fpp 187 +1
Directory Lines Diff
simulation 28019 +1
total 45630 +1

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.

Bug: SUPERBEE reverses decreasing slopes

3 participants