Skip to content

Commit

Permalink
Add memory allocation test
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Bolm <[email protected]>
  • Loading branch information
amrueda and bennibolm authored Oct 31, 2023
1 parent 400afb7 commit 30b33fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_tree_2d_eulermulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ end
],
initial_refinement_level=3,
tspan=(0.0, 0.001))
# 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)) < 15000
end
end

@trixi_testset "elixir_eulermulti_ec.jl" begin
Expand Down

0 comments on commit 30b33fd

Please sign in to comment.