Skip to content
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 wavespeed estimates for SWE-Exner equations #55

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/equations/shallow_water_exner_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,12 @@

@inline function Trixi.max_abs_speed_naive(u_ll, u_rr, orientation::Integer,
equations::ShallowWaterExnerEquations1D)
return max(eigvals_cardano(u_rr, equations)..., eigvals_cardano(u_ll, equations)...)
return max(maximum(abs, eigvals_cardano(u_rr, equations)),

Check warning on line 472 in src/equations/shallow_water_exner_1d.jl

View check run for this annotation

Codecov / codecov/patch

src/equations/shallow_water_exner_1d.jl#L472

Added line #L472 was not covered by tests
maximum(abs, eigvals_cardano(u_ll, equations)))
end

@inline function Trixi.max_abs_speeds(u, equations::ShallowWaterExnerEquations1D)
return maximum(eigvals_cardano(u, equations))
return maximum(abs, eigvals_cardano(u, equations))

Check warning on line 477 in src/equations/shallow_water_exner_1d.jl

View check run for this annotation

Codecov / codecov/patch

src/equations/shallow_water_exner_1d.jl#L477

Added line #L477 was not covered by tests
end

#Helper function to extract the velocity vector from the conservative variables
Expand Down
Loading