Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/test/test_tree_2d_eulerpolytropic.jl
2055 views
1
module TestExamples2DEulerMulticomponent
2
3
using Test
4
using Trixi
5
6
include("test_trixi.jl")
7
8
EXAMPLES_DIR = joinpath(examples_dir(), "tree_2d_dgsem")
9
10
@testset "Polytropic Euler" begin
11
#! format: noindent
12
13
@trixi_testset "elixir_eulerpolytropic_convergence.jl" begin
14
@test_trixi_include(joinpath(EXAMPLES_DIR,
15
"elixir_eulerpolytropic_convergence.jl"),
16
l2=[
17
0.0016689832177626373, 0.0025920263793094526,
18
0.003281074494626679
19
],
20
linf=[
21
0.010994883201896677, 0.013309526619350365,
22
0.02008032661117376
23
])
24
# Ensure that we do not have excessive memory allocations
25
# (e.g., from type instabilities)
26
let
27
t = sol.t[end]
28
u_ode = sol.u[end]
29
du_ode = similar(u_ode)
30
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
31
end
32
end
33
end
34
35
end # module
36
37