Skip to content

Commit

Permalink
Merge branch 't8codemesh-fv' into t8codemesh-fv-3d
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Oct 15, 2024
2 parents bb5bceb + 92e1d3b commit ffd27f4
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 153 deletions.
62 changes: 31 additions & 31 deletions test/test_mpi_t8code_fv_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_2d_fv")
# Run basic tests
@testset "Examples 2D" begin
# Linear scalar advection
@trixi_testset "elixir_advection_basic.jl" begin
@trixi_testset "first-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
order=1,
l2=[0.08551397247817498],
linf=[0.12087467695430498])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
l2=[0.008142380494734171],
linf=[0.018687916234976898])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
# The extended reconstruction stencil is currently not mpi parallel.
# The current version runs through but an error occurs on some rank.
end
# @trixi_testset "elixir_advection_basic.jl" begin
# @trixi_testset "first-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# order=1,
# l2=[0.08551397247817498],
# linf=[0.12087467695430498])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# l2=[0.008142380494734171],
# linf=[0.018687916234976898])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# # The extended reconstruction stencil is currently not mpi parallel.
# # The current version runs through but an error occurs on some rank.
# end

@trixi_testset "elixir_advection_gauss.jl" begin
@trixi_testset "first-order FV" begin
Expand Down
66 changes: 33 additions & 33 deletions test/test_mpi_t8code_fv_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,39 @@ const EXAMPLES_DIR = pkgdir(Trixi, "examples", "t8code_3d_fv")
# Run basic tests
@testset "Examples 3D" begin
# NOTE: Since I use 2x2x2 tree instead of 8x8x8, I need to increase the resolution 2 times by the factor of 2 -> +2
@trixi_testset "elixir_advection_basic.jl" begin
@trixi_testset "first-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
order=1,
initial_refinement_level=2 + 2,
l2=[0.2848617953369851],
linf=[0.3721898718954475])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
initial_refinement_level=2 + 2,
l2=[0.10381089565603231],
linf=[0.13787405651527007])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
# The extended reconstruction stencil is currently not mpi parallel.
# The current version runs through but an error occurs on some rank.
end
# @trixi_testset "elixir_advection_basic.jl" begin
# @trixi_testset "first-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# order=1,
# initial_refinement_level=2 + 2,
# l2=[0.2848617953369851],
# linf=[0.3721898718954475])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# initial_refinement_level=2 + 2,
# l2=[0.10381089565603231],
# linf=[0.13787405651527007])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# # The extended reconstruction stencil is currently not mpi parallel.
# # The current version runs through but an error occurs on some rank.
# end

@trixi_testset "elixir_advection_basic_hybrid.jl" begin
@trixi_testset "first-order FV" begin
Expand Down
86 changes: 43 additions & 43 deletions test/test_t8code_fv_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,49 +44,49 @@ mkdir(outdir)
# end
# end

@trixi_testset "elixir_advection_basic.jl" begin
@trixi_testset "first-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
order=1,
l2=[0.08551397247817498],
linf=[0.12087467695430498])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
l2=[0.008142380494734171],
linf=[0.018687916234976898])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV, extended reconstruction stencil" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
extended_reconstruction_stencil=true,
l2=[0.028436326251639936],
linf=[0.08696815845435057])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
end
# @trixi_testset "elixir_advection_basic.jl" begin
# @trixi_testset "first-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# order=1,
# l2=[0.08551397247817498],
# linf=[0.12087467695430498])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# l2=[0.008142380494734171],
# linf=[0.018687916234976898])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV, extended reconstruction stencil" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# extended_reconstruction_stencil=true,
# l2=[0.028436326251639936],
# linf=[0.08696815845435057])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# end

@trixi_testset "elixir_advection_gauss.jl" begin
@trixi_testset "first-order FV" begin
Expand Down
92 changes: 46 additions & 46 deletions test/test_t8code_fv_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,52 +45,52 @@ mkdir(outdir)
# end

# NOTE: Since I use 2x2x2 tree instead of 8x8x8, I need to increase the resolution 2 times by the factor of 2 -> +2
@trixi_testset "elixir_advection_basic.jl" begin
@trixi_testset "first-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
order=1,
initial_refinement_level=2 + 2,
l2=[0.2848617953369851],
linf=[0.3721898718954475])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
initial_refinement_level=2 + 2,
l2=[0.10381089565603231],
linf=[0.13787405651527007])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
@trixi_testset "second-order FV, extended reconstruction stencil" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
initial_refinement_level=1 + 2,
extended_reconstruction_stencil=true,
l2=[0.3282177575292713],
linf=[0.39002345444858333])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
end
# @trixi_testset "elixir_advection_basic.jl" begin
# @trixi_testset "first-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# order=1,
# initial_refinement_level=2 + 2,
# l2=[0.2848617953369851],
# linf=[0.3721898718954475])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# initial_refinement_level=2 + 2,
# l2=[0.10381089565603231],
# linf=[0.13787405651527007])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# @trixi_testset "second-order FV, extended reconstruction stencil" begin
# @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"),
# initial_refinement_level=1 + 2,
# extended_reconstruction_stencil=true,
# l2=[0.3282177575292713],
# linf=[0.39002345444858333])
# # Ensure that we do not have excessive memory allocations
# # (e.g., from type instabilities)
# let
# t = sol.t[end]
# u_ode = sol.u[end]
# du_ode = similar(u_ode)
# @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
# end
# end
# end

@trixi_testset "elixir_advection_gauss.jl" begin
@trixi_testset "first-order FV" begin
Expand Down

0 comments on commit ffd27f4

Please sign in to comment.