Skip to content

Commit

Permalink
tests for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Dec 15, 2023
1 parent b240797 commit 45bf5eb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/test_structured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,30 @@ end
end
end

@trixi_testset "elixir_eulerpolytropic_convergence.jl with FluxHLL(min_max_speed_naive)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_eulerpolytropic_convergence.jl"),
solver=DGSEM(polydeg = 3,
surface_flux = FluxHLL(min_max_speed_naive),
volume_integral = VolumeIntegralFluxDifferencing(volume_flux)),
l2=[
0.001668882059653298, 0.002592168188567654,
0.0032809503514328307,
],
linf=[
0.01099467966437917, 0.013311978456333584,
0.020080117011337606,
])
# 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

@trixi_testset "elixir_eulerpolytropic_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_eulerpolytropic_ec.jl"),
l2=[
Expand Down
27 changes: 27 additions & 0 deletions test/test_tree_2d_shallowwater.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,33 @@ end
end
end

@trixi_testset "elixir_shallowwater_source_terms.jl with FluxHLL(min_max_speed_naive)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms.jl"),
l2=[
0.0018957692481057034,
0.016943229710439864,
0.01755623297390675,
6.274146767717414e-5,
],
linf=[
0.015156105797771602,
0.07964811135780492,
0.0839787097210376,
0.0001819675955490041,
],
tspan=(0.0, 0.025),
surface_flux=(FluxHLL(min_max_speed_naive),
flux_nonconservative_fjordholm_etal))
# 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

@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_ersing_etal" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms.jl"),
l2=[
Expand Down

0 comments on commit 45bf5eb

Please sign in to comment.