Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Jul 24, 2024
1 parent 1a44499 commit 5bb0ab2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
22 changes: 22 additions & 0 deletions test/test_tree_1d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,28 @@ end
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end

@trixi_testset "elixir_euler_convergence_pure_fvO2.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_convergence_pure_fvO2.jl"),
l2=[
0.00048190103584221393,
0.0005306536705484938,
0.0007902755183354382,
],
linf=[
0.0014512544822959939,
0.0014178023249342697,
0.002568866462516972,
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
end

end # module
7 changes: 3 additions & 4 deletions test/test_unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ end
@test minmod(sl, sr) == 0.5
@test monotonized_central(sl, sr) == 0.75
@test superbee(sl, sr) == 1.0
@test isapprox(vanLeer_limiter(sl, sr), 2/3)
@test isapprox(vanLeer_limiter(sl, sr), 2 / 3)

sl = -1.0
sr = 0.0
Expand All @@ -1758,13 +1758,13 @@ end
@test minmod(sl, sr) == -0.8
@test monotonized_central(sl, sr) == -0.9
@test superbee(sl, sr) == -1.0
@test isapprox(vanLeer_limiter(sl, sr), -8/9)
@test isapprox(vanLeer_limiter(sl, sr), -8 / 9)

# Test symmetry
@test minmod(sr, sl) == -0.8
@test monotonized_central(sr, sl) == -0.9
@test superbee(sr, sl) == -1.0
@test isapprox(vanLeer_limiter(sr, sl), -8/9)
@test isapprox(vanLeer_limiter(sr, sl), -8 / 9)

sl = 1.0
sr = 0.0
Expand All @@ -1773,7 +1773,6 @@ end
@test superbee(sl, sr) == 0.0
@test vanLeer_limiter(sl, sr) == 0.0
end

end

end #module

0 comments on commit 5bb0ab2

Please sign in to comment.