Skip to content

Commit

Permalink
apply absolute value function
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickersing committed Aug 21, 2024
1 parent 846f4a1 commit 745be79
Showing 1 changed file with 3 additions and 2 deletions.
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 @@ end

@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

0 comments on commit 745be79

Please sign in to comment.