-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix computation of max_abs_speeds
for the SWE
#1898
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1898 +/- ##
=======================================
Coverage 96.30% 96.30%
=======================================
Files 448 448
Lines 36006 36006
=======================================
Hits 34672 34672
Misses 1334 1334
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The modified wave speed affects the downstream tests for |
Yes, that is indeed the case. We will need a new reference file. |
Good spot! I am a bit embarrassed that I did not spot this when adding more refined wave speed estimates, as it is for the 1D case only 10 lines below :O https://github.com/trixi-framework/Trixi.jl/blame/main/src/equations/shallow_water_1d.jl |
I am even more embarrassed because I introduced this bug in my initial implementation of the 2D shallow water equations. I have no idea how/why I wrote the function this way. The 1D bug just propagated my initial mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Could you please prepare a PR for that? I would like to see green CI before merging this PR. |
Do we also need to create new releases for the changes to take effect across packages? |
Yes. I just started the registration process for Trixi2Vtk.jl. It should be released in half an hour or so. Please update this PR later so that the new version is used in CI. Afterwards, we can merge this PR and release a new version of Trixi.jl so that CI for Trixi2Vtk.jl works again. |
The new version merged, so I merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
The wave speed in
max_abs_speeds
for the SWE computes the wave celerity asc = equations.gravity * sqrt(h)
instead ofc = sqrt(equations.gravity * h)
. This PR fixes the computation and adjusts the test values accordingly.In some elixirs the
cfl
had to be set back tocfl = 1.0
, because they became unstable when using the new wave speed.