From 92e1d3b1ea180373e939e05d481e343df98c3af5 Mon Sep 17 00:00:00 2001 From: bennibolm Date: Tue, 15 Oct 2024 14:49:26 +0200 Subject: [PATCH] Remove initial_condition; Disable advection_basic tests --- src/solvers/fv_t8code/fv.jl | 2 +- test/test_mpi_t8code_fv.jl | 77 +++++++++++++-------------------- test/test_t8code_fv.jl | 86 ++++++++++++++++++------------------- 3 files changed, 75 insertions(+), 90 deletions(-) diff --git a/src/solvers/fv_t8code/fv.jl b/src/solvers/fv_t8code/fv.jl index 08c82df056b..d3effbe7d77 100644 --- a/src/solvers/fv_t8code/fv.jl +++ b/src/solvers/fv_t8code/fv.jl @@ -160,7 +160,7 @@ function create_cache(mesh::T8codeMesh, equations::AbstractEquations, solver::FV end function rhs!(du, u, t, mesh::T8codeMesh, equations, - initial_condition, boundary_conditions, source_terms::Source, + boundary_conditions, source_terms::Source, solver::FV, cache) where {Source} # Reset du @trixi_timeit timer() "reset ∂u/∂t" du.=zero(eltype(du)) diff --git a/test/test_mpi_t8code_fv.jl b/test/test_mpi_t8code_fv.jl index 5a2d9525558..14d918794d2 100644 --- a/test/test_mpi_t8code_fv.jl +++ b/test/test_mpi_t8code_fv.jl @@ -13,52 +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. - # @trixi_testset "second-order FV, extended reconstruction stencil" begin - # @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic.jl"), - # order=2, - # extended_reconstruction_stencil=true, - # l2=[0.020331012873518642], - # linf=[0.05571209803860677]) - # # 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 + # # 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 diff --git a/test/test_t8code_fv.jl b/test/test_t8code_fv.jl index 9ddef51a9d1..46330d2d98e 100644 --- a/test/test_t8code_fv.jl +++ b/test/test_t8code_fv.jl @@ -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