Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/test/test_tree_2d_euleracoustics.jl
2055 views
1
module TestExamples2DEulerAcoustics
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 "Acoustic perturbation coupled with compressible Euler" begin
11
#! format: noindent
12
13
@trixi_testset "elixir_euleracoustics_co-rotating_vortex_pair.jl" begin
14
@test_trixi_include(joinpath(EXAMPLES_DIR,
15
"elixir_euleracoustics_co-rotating_vortex_pair.jl"),
16
initial_refinement_level=5,
17
tspan1=(0.0, 1.0), tspan_averaging=(0.0, 1.0), tspan=(0.0, 1.0),
18
l2=[
19
0.00013268029905807722,
20
0.0001335062197031223,
21
0.00021776333678401362,
22
13.000001753042364,
23
26.00000080243847,
24
38.00000884725549,
25
51.000000003859995
26
],
27
linf=[
28
0.22312716933051027,
29
0.1579924424942319,
30
0.25194831158255576,
31
13.468872744263273,
32
26.54666679978679,
33
38.139032147739684,
34
51.378134660241294
35
])
36
# Ensure that we do not have excessive memory allocations
37
# (e.g., from type instabilities)
38
let
39
t = sol.t[end]
40
u_ode = sol.u[end]
41
du_ode = similar(u_ode)
42
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
43
end
44
end
45
end
46
47
end # module
48
49