Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/test/test_tree_1d_traffic_flow_lwr.jl
5582 views
1
module TestExamples1DTrafficFlowLWR
2
3
using Test
4
using Trixi
5
6
include("test_trixi.jl")
7
8
EXAMPLES_DIR = joinpath(examples_dir(), "tree_1d_dgsem")
9
10
@testset "Traffic-flow LWR" begin
11
#! format: noindent
12
13
@trixi_testset "elixir_traffic_flow_lwr_convergence.jl" begin
14
@test_trixi_include(joinpath(EXAMPLES_DIR,
15
"elixir_traffic_flow_lwr_convergence.jl"),
16
l2=[0.0008455067389588569],
17
linf=[0.004591951086623913])
18
# Ensure that we do not have excessive memory allocations
19
# (e.g., from type instabilities)
20
@test_allocations(Trixi.rhs!, semi, sol, 1000)
21
end
22
23
@trixi_testset "elixir_traffic_flow_lwr_trafficjam.jl" begin
24
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_traffic_flow_lwr_trafficjam.jl"),
25
l2=[0.1761758135539748], linf=[0.5])
26
# Ensure that we do not have excessive memory allocations
27
# (e.g., from type instabilities)
28
@test_allocations(Trixi.rhs!, semi, sol, 1000)
29
end
30
end
31
32
end # module
33
34