From 48ab702cda8a3cbc6930220acde7572cc0300c7a Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Thu, 8 Feb 2024 09:32:51 +0100 Subject: [PATCH] add davis wave speed estimate for upcoming change --- .../elixir_traffic_flow_lwr_greenlight.jl | 2 +- src/equations/traffic_flow_lwr_1d.jl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/structured_1d_dgsem/elixir_traffic_flow_lwr_greenlight.jl b/examples/structured_1d_dgsem/elixir_traffic_flow_lwr_greenlight.jl index bc6dc3ebf17..cdab67bee8e 100644 --- a/examples/structured_1d_dgsem/elixir_traffic_flow_lwr_greenlight.jl +++ b/examples/structured_1d_dgsem/elixir_traffic_flow_lwr_greenlight.jl @@ -7,7 +7,7 @@ using Trixi equations = TrafficFlowLWREquations1D() basis = LobattoLegendreBasis(3) -surface_flux = flux_hll +surface_flux = FluxHLL(min_max_speed_davis) solver = DGSEM(basis, surface_flux) coordinates_min = (-1.0,) # minimum coordinate diff --git a/src/equations/traffic_flow_lwr_1d.jl b/src/equations/traffic_flow_lwr_1d.jl index 891e3249966..04185b86543 100644 --- a/src/equations/traffic_flow_lwr_1d.jl +++ b/src/equations/traffic_flow_lwr_1d.jl @@ -88,6 +88,11 @@ end return λ_min, λ_max end +@inline function min_max_speed_davis(u_ll, u_rr, orientation::Integer, + equations::TrafficFlowLWREquations1D) + min_max_speed_naive(u_ll, u_rr, orientation, equations) +end + @inline function max_abs_speeds(u, equations::TrafficFlowLWREquations1D) return (abs(equations.v_max * (1.0 - 2 * u[1])),) end