From 745be797cc274624ecc94b33ef09d5156a1c5af3 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Wed, 21 Aug 2024 10:20:46 +0200 Subject: [PATCH] apply absolute value function --- src/equations/shallow_water_exner_1d.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/equations/shallow_water_exner_1d.jl b/src/equations/shallow_water_exner_1d.jl index 3aa34c9..cf77759 100644 --- a/src/equations/shallow_water_exner_1d.jl +++ b/src/equations/shallow_water_exner_1d.jl @@ -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)), + 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)) end #Helper function to extract the velocity vector from the conservative variables