Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/test/test_tree_1d_maxwell.jl
2802 views
1
module TestExamples1DMaxwell
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 "Maxwell" begin
11
#! format: noindent
12
13
@trixi_testset "elixir_maxwell_convergence.jl" begin
14
@test_trixi_include(joinpath(EXAMPLES_DIR,
15
"elixir_maxwell_convergence.jl"),
16
l2=[8933.196486422636, 2.979793603210305e-5],
17
linf=[21136.527033627033, 7.050386515528029e-5])
18
# Ensure that we do not have excessive memory allocations
19
# (e.g., from type instabilities)
20
@test_allocations(Trixi.rhs!, semi, sol, 1000)
21
end
22
23
@trixi_testset "elixir_maxwell_E_excitation.jl" begin
24
@test_trixi_include(joinpath(EXAMPLES_DIR,
25
"elixir_maxwell_E_excitation.jl"),
26
l2=[1.8181768208894413e6, 0.09221738723979069],
27
linf=[2.5804473693440557e6, 0.1304024464192847])
28
# Ensure that we do not have excessive memory allocations
29
# (e.g., from type instabilities)
30
@test_allocations(Trixi.rhs!, semi, sol, 1000)
31
end
32
end
33
34
end # module
35
36