Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/test/test_tree_1d_passive_tracers.jl
2055 views
1
module TestExamples1DEuler
2
3
using Test
4
using Trixi
5
6
include("test_trixi.jl")
7
8
EXAMPLES_DIR = joinpath(examples_dir(), "tree_1d_dgsem")
9
10
@testset "Passive Tracers Tree 1D" begin
11
#! format: noindent
12
13
@trixi_testset "elixir_euler_density_wave_tracers.jl" begin
14
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_density_wave_tracers.jl"),
15
l2=[0.07817688029733633,
16
0.007817688029733637,
17
0.0003908844014910887,
18
0.11826401699443158,
19
0.09888629862239204],
20
linf=[0.23661504279664292,
21
0.023661504279667844,
22
0.0011830752140795653,
23
0.2751965175624824,
24
0.16065446067022204])
25
# Ensure that we do not have excessive memory allocations
26
# (e.g., from type instabilities)
27
let
28
t = sol.t[end]
29
u_ode = sol.u[end]
30
du_ode = similar(u_ode)
31
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
32
end
33
end
34
end # testset
35
end # module
36
37