diff --git a/examples/p4est_2d_dgsem/elixir_euler_double_mach.jl b/examples/p4est_2d_dgsem/elixir_euler_double_mach.jl index d56d1d0f8b5..949bc40e641 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_double_mach.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_double_mach.jl @@ -1,7 +1,6 @@ using OrdinaryDiffEq using Trixi -using LinearAlgebra: norm # for use in get_boundary_outer_state ############################################################################### # semidiscretization of the compressible Euler equations diff --git a/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_sc_subcell.jl b/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_sc_subcell.jl index d49470164c0..ecb96a8d563 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_sc_subcell.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_sc_subcell.jl @@ -51,8 +51,8 @@ end @inline function Trixi.get_boundary_outer_state(u_inner, cache, t, boundary_condition::typeof(boundary_condition_supersonic_inflow), normal_direction::AbstractVector, direction, - equations, - dg, indices...) + mesh::P4estMesh{2}, equations, dg, + indices...) x = Trixi.get_node_coords(cache.elements.node_coordinates, equations, dg, indices...) return initial_condition_mach3_flow(x, t, equations) @@ -71,8 +71,8 @@ end @inline function Trixi.get_boundary_outer_state(u_inner, cache, t, boundary_condition::typeof(boundary_condition_outflow), - orientation_or_normal, direction, equations, - dg, indices...) + orientation_or_normal, direction, + mesh::P4estMesh{2}, equations, dg, indices...) return u_inner end @@ -95,14 +95,10 @@ volume_flux = flux_ranocha polydeg = 3 basis = LobattoLegendreBasis(polydeg) limiter_idp = SubcellLimiterIDP(equations, basis; - local_minmax_variables_cons = ["rho"], positivity_variables_cons = ["rho"], positivity_variables_nonlinear = [pressure], - positivity_correction_factor = 0.5, - spec_entropy = true, - bar_states = false, - max_iterations_newton = 1000, - newton_tolerances = (1.0e-14, 1.0e-15)) + spec_entropy = false, + bar_states = false) volume_integral = VolumeIntegralSubcellLimiting(limiter_idp; volume_flux_dg = volume_flux, volume_flux_fv = surface_flux) @@ -115,7 +111,7 @@ isfile(default_mesh_file) || default_mesh_file) mesh_file = default_mesh_file -mesh = P4estMesh{2}(mesh_file, initial_refinement_level = 1) +mesh = P4estMesh{2}(mesh_file, initial_refinement_level = 0) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver, boundary_conditions = boundary_conditions) diff --git a/examples/structured_2d_dgsem/elixir_euler_double_mach.jl b/examples/structured_2d_dgsem/elixir_euler_double_mach.jl index 8153d2634b8..c40d79e3cc5 100644 --- a/examples/structured_2d_dgsem/elixir_euler_double_mach.jl +++ b/examples/structured_2d_dgsem/elixir_euler_double_mach.jl @@ -1,7 +1,6 @@ using OrdinaryDiffEq using Trixi -using LinearAlgebra: norm # for use in get_boundary_outer_state ############################################################################### # semidiscretization of the compressible Euler equations diff --git a/examples/structured_2d_dgsem/elixir_euler_double_mach_MCL.jl b/examples/structured_2d_dgsem/elixir_euler_double_mach_MCL.jl index e85c263429f..e56392f9b2d 100644 --- a/examples/structured_2d_dgsem/elixir_euler_double_mach_MCL.jl +++ b/examples/structured_2d_dgsem/elixir_euler_double_mach_MCL.jl @@ -1,7 +1,6 @@ using OrdinaryDiffEq using Trixi -using LinearAlgebra: norm # for use in get_boundary_outer_state ############################################################################### # semidiscretization of the compressible Euler equations diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 4adb1a6fb20..3f9e3dd1451 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -364,21 +364,20 @@ end end @trixi_testset "elixir_euler_double_mach.jl" begin - # Same results as for StructuredMesh with initial_refinement_level=2 @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_double_mach.jl"), l2=[ - 0.87417841433288, - 6.669726935171785, - 3.4980245896465387, - 76.33557073534843, + 0.8741784143331414, + 6.669726935141086, + 3.4980245896042237, + 76.33557073504075, ], linf=[ - 11.428353671462515, - 142.73486852796972, - 38.91639544578682, - 1651.7541392659086, + 11.428353668952052, + 142.73486850872337, + 38.91639544604301, + 1651.7541390872523, ], - initial_refinement_level=2, + initial_refinement_level=1, tspan=(0.0, 0.05)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -386,7 +385,7 @@ end t = sol.t[end] u_ode = sol.u[end] du_ode = similar(u_ode) - @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 10000 + @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 15000 end end @@ -418,6 +417,34 @@ end end end +@trixi_testset "elixir_euler_supersonic_cylinder_sc_subcell.jl" begin + @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_supersonic_cylinder_sc_subcell.jl"), + l2=[ + 0.01733051773398731, + 0.038254257166961285, + 0.018157981470786955, + 0.12176639664229769, + ], + linf=[ + 1.3534563960399795, + 2.861333164923601, + 2.248472479406512, + 9.797432332463623, + ], + tspan=(0.0, 0.001), + skip_coverage=true) + if @isdefined sol # Skipped in coverage run + # 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)) < 15000 + end + end +end + @trixi_testset "elixir_eulergravity_convergence.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_eulergravity_convergence.jl"), l2=[