Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
amrueda committed Nov 6, 2023
1 parent dced12f commit 83f89b6
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 61 deletions.
91 changes: 52 additions & 39 deletions test/test_tree_1d_mhdmultiion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,58 @@ include("test_trixi.jl")
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")

@testset "MHD Multi-ion" begin
@trixi_testset "elixir_mhdmultiion_ec_onespecies.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec_onespecies.jl"),
l2=[4.13046273e-17, 5.47627735e-02, 5.47627735e-02,
5.85364902e-02, 8.15735949e-02,
5.46480229e-02, 5.46480229e-02, 1.54430906e-01],
linf=[1.11022302e-16, 9.62277600e-02, 9.62277600e-02,
1.07398441e-01, 1.85851486e-01,
9.41669606e-02, 9.41669606e-02, 4.10966135e-01])
end

@trixi_testset "elixir_mhdmultiion_ec_onespecies.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec_onespecies.jl"),
l2 = [4.13046273e-17, 5.47627735e-02, 5.47627735e-02, 5.85364902e-02, 8.15735949e-02,
5.46480229e-02, 5.46480229e-02, 1.54430906e-01],
linf = [1.11022302e-16, 9.62277600e-02, 9.62277600e-02, 1.07398441e-01, 1.85851486e-01,
9.41669606e-02, 9.41669606e-02, 4.10966135e-01])
end

@trixi_testset "elixir_mhdmultiion_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),
l2 = [4.13046273e-17, 4.41300832e-02, 4.08698259e-02, 1.45921842e-02, 1.46195334e-01,
1.46189460e-01, 1.47069647e-01, 1.15948953e-01, 4.17156345e-02, 2.95429888e-01,
2.91864340e-01, 2.90281705e-01, 1.91712252e-01],
linf = [1.11022302e-16, 8.23475323e-02, 8.20044181e-02, 5.26482770e-02, 2.36978475e-01,
1.78890885e-01, 1.83844973e-01, 3.69223717e-01, 9.49715344e-02, 4.04059325e-01,
3.53727376e-01, 3.43908646e-01, 3.72557303e-01])
end

@trixi_testset "elixir_mhdmultiion_es.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_es.jl"),
l2 = [4.13046273e-17, 4.34692117e-02, 4.01800240e-02, 1.39798040e-02, 1.45588748e-01,
1.46145114e-01, 1.47018561e-01, 1.07728669e-01, 4.13841438e-02, 2.95261011e-01,
2.91827041e-01, 2.90260310e-01, 1.90243105e-01],
linf = [1.11022302e-16, 7.89266630e-02, 7.79256051e-02, 4.76391824e-02, 2.07007992e-01,
1.79314301e-01, 1.84325683e-01, 3.47578503e-01, 9.30059101e-02, 3.81670634e-01,
3.53221946e-01, 3.43511206e-01, 3.75916013e-01])
end

@trixi_testset "elixir_mhdmultiion_es_shock_capturing.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_es_shock_capturing.jl"),
l2 = [4.13046273e-17, 4.34327035e-02, 4.01429579e-02, 1.39648331e-02, 1.45589699e-01,
1.46145036e-01, 1.47013130e-01, 1.07647870e-01, 4.13842626e-02, 2.95252636e-01,
2.91824474e-01, 2.90263048e-01, 1.90199794e-01],
linf = [1.11022302e-16, 7.86144728e-02, 7.75970804e-02, 4.75320603e-02, 2.07019087e-01,
1.79245486e-01, 1.84254005e-01, 3.47166288e-01, 9.16953877e-02, 3.81637525e-01,
3.53188856e-01, 3.43474263e-01, 3.75932899e-01])
end

end
@trixi_testset "elixir_mhdmultiion_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),
l2=[4.13046273e-17, 4.41300832e-02, 4.08698259e-02,
1.45921842e-02, 1.46195334e-01,
1.46189460e-01, 1.47069647e-01, 1.15948953e-01,
4.17156345e-02, 2.95429888e-01,
2.91864340e-01, 2.90281705e-01, 1.91712252e-01],
linf=[1.11022302e-16, 8.23475323e-02, 8.20044181e-02,
5.26482770e-02, 2.36978475e-01,
1.78890885e-01, 1.83844973e-01, 3.69223717e-01,
9.49715344e-02, 4.04059325e-01,
3.53727376e-01, 3.43908646e-01, 3.72557303e-01])
end

@trixi_testset "elixir_mhdmultiion_es.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_es.jl"),
l2=[4.13046273e-17, 4.34692117e-02, 4.01800240e-02,
1.39798040e-02, 1.45588748e-01,
1.46145114e-01, 1.47018561e-01, 1.07728669e-01,
4.13841438e-02, 2.95261011e-01,
2.91827041e-01, 2.90260310e-01, 1.90243105e-01],
linf=[1.11022302e-16, 7.89266630e-02, 7.79256051e-02,
4.76391824e-02, 2.07007992e-01,
1.79314301e-01, 1.84325683e-01, 3.47578503e-01,
9.30059101e-02, 3.81670634e-01,
3.53221946e-01, 3.43511206e-01, 3.75916013e-01])
end

@trixi_testset "elixir_mhdmultiion_es_shock_capturing.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_mhdmultiion_es_shock_capturing.jl"),
l2=[4.13046273e-17, 4.34327035e-02, 4.01429579e-02,
1.39648331e-02, 1.45589699e-01,
1.46145036e-01, 1.47013130e-01, 1.07647870e-01,
4.13842626e-02, 2.95252636e-01,
2.91824474e-01, 2.90263048e-01, 1.90199794e-01],
linf=[1.11022302e-16, 7.86144728e-02, 7.75970804e-02,
4.75320603e-02, 2.07019087e-01,
1.79245486e-01, 1.84254005e-01, 3.47166288e-01,
9.16953877e-02, 3.81637525e-01,
3.53188856e-01, 3.43474263e-01, 3.75932899e-01])
end
end

end # module
50 changes: 28 additions & 22 deletions test/test_tree_2d_mhdmultiion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,34 @@ include("test_trixi.jl")
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")

@testset "MHD Multi-ion" begin

@trixi_testset "elixir_mhdmultiion_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),
l2 = [1.56133690e-02, 1.56211211e-02, 2.44289260e-02, 1.17053210e-02, 1.35748661e-01,
1.35779534e-01, 1.34646112e-01, 1.34813656e-01, 1.93724876e-02, 2.70357315e-01,
2.70356924e-01, 2.69252524e-01, 1.86315505e-01],
linf = [1.06156769e-01, 1.15019769e-01, 1.32816030e-01, 7.65402322e-02, 2.45518940e-01,
2.46123607e-01, 1.82733442e-01, 4.24743430e-01, 1.27620999e-01, 4.58874938e-01,
4.65364246e-01, 3.56983044e-01, 3.94035665e-01])
end

@trixi_testset "elixir_mhdmultiion_rotor.jl tspan = (0., 0.001)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_rotor.jl"),
l2 = [9.10689060e-03, 1.57109974e-02, 5.47502000e-06, 4.33887866e-02, 6.85503869e-02,
6.44021766e-02, 2.79487163e-03, 7.85539922e-02, 4.33883209e-02, 6.85496075e-02,
6.44066193e-02, 5.58969701e-03, 7.85504216e-02],
linf = [1.47204796e-01, 2.33759231e-01, 2.89189051e-05, 1.06452623e+00, 3.36709456e+00,
2.93566426e+00, 1.53123364e-02, 3.99872907e+00, 1.06455108e+00, 3.36725655e+00,
2.93570704e+00, 3.05339471e-02, 3.99892281e+00],
tspan = (0., 0.001))
end

@trixi_testset "elixir_mhdmultiion_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),
l2=[1.56133690e-02, 1.56211211e-02, 2.44289260e-02,
1.17053210e-02, 1.35748661e-01,
1.35779534e-01, 1.34646112e-01, 1.34813656e-01,
1.93724876e-02, 2.70357315e-01,
2.70356924e-01, 2.69252524e-01, 1.86315505e-01],
linf=[1.06156769e-01, 1.15019769e-01, 1.32816030e-01,
7.65402322e-02, 2.45518940e-01,
2.46123607e-01, 1.82733442e-01, 4.24743430e-01,
1.27620999e-01, 4.58874938e-01,
4.65364246e-01, 3.56983044e-01, 3.94035665e-01])
end

@trixi_testset "elixir_mhdmultiion_rotor.jl tspan = (0., 0.001)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_rotor.jl"),
l2=[9.10689060e-03, 1.57109974e-02, 5.47502000e-06,
4.33887866e-02, 6.85503869e-02,
6.44021766e-02, 2.79487163e-03, 7.85539922e-02,
4.33883209e-02, 6.85496075e-02,
6.44066193e-02, 5.58969701e-03, 7.85504216e-02],
linf=[1.47204796e-01, 2.33759231e-01, 2.89189051e-05,
1.06452623e+00, 3.36709456e+00,
2.93566426e+00, 1.53123364e-02, 3.99872907e+00,
1.06455108e+00, 3.36725655e+00,
2.93570704e+00, 3.05339471e-02, 3.99892281e+00],
tspan=(0.0, 0.001))
end
end

end # module

0 comments on commit 83f89b6

Please sign in to comment.