diff --git a/examples/tree_2d_dgsem/elixir_shallowwater_wall.jl b/examples/tree_2d_dgsem/elixir_shallowwater_wall.jl index b8dbad5068..f8f601d412 100644 --- a/examples/tree_2d_dgsem/elixir_shallowwater_wall.jl +++ b/examples/tree_2d_dgsem/elixir_shallowwater_wall.jl @@ -29,8 +29,8 @@ boundary_condition = boundary_condition_slip_wall ############################################################################### # Get the DG approximation space -volume_flux = (flux_wintermeyer_etal, flux_nonconservative_ersing_etal) -surface_flux = (flux_lax_friedrichs, flux_nonconservative_ersing_etal) +volume_flux = (flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal) +surface_flux = (flux_lax_friedrichs, flux_nonconservative_wintermeyer_etal) solver = DGSEM(polydeg = 3, surface_flux = surface_flux, volume_integral = VolumeIntegralFluxDifferencing(volume_flux)) diff --git a/src/Trixi.jl b/src/Trixi.jl index 23a8cfe1d0..90fa590c50 100644 --- a/src/Trixi.jl +++ b/src/Trixi.jl @@ -179,7 +179,6 @@ export flux, flux_central, flux_lax_friedrichs, flux_hll, flux_hllc, flux_hlle, flux_kennedy_gruber, flux_shima_etal, flux_ec, flux_fjordholm_etal, flux_nonconservative_fjordholm_etal, flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal, - flux_nonconservative_ersing_etal, flux_chan_etal, flux_nonconservative_chan_etal, flux_winters_etal, hydrostatic_reconstruction_audusse_etal, flux_nonconservative_audusse_etal, FluxPlusDissipation, DissipationGlobalLaxFriedrichs, DissipationLocalLaxFriedrichs, diff --git a/src/equations/shallow_water_1d.jl b/src/equations/shallow_water_1d.jl index 998deb04de..3c218eee9d 100644 --- a/src/equations/shallow_water_1d.jl +++ b/src/equations/shallow_water_1d.jl @@ -201,20 +201,27 @@ end Non-symmetric two-point volume flux discretizing the nonconservative (source) term that contains the gradient of the bottom topography [`ShallowWaterEquations1D`](@ref). -Further details are available in the paper: +Gives entropy conservation and well-balancedness on both the volume and surface when combined with +[`flux_wintermeyer_etal`](@ref). + +Further details are available in the papers: - Niklas Wintermeyer, Andrew R. Winters, Gregor J. Gassner and David A. Kopriva (2017) An entropy stable nodal discontinuous Galerkin method for the two dimensional shallow water equations on unstructured curvilinear meshes with discontinuous bathymetry [DOI: 10.1016/j.jcp.2017.03.036](https://doi.org/10.1016/j.jcp.2017.03.036) +- Patrick Ersing, Andrew R. Winters (2023) + An entropy stable discontinuous Galerkin method for the two-layer shallow water equations on + curvilinear meshes + [DOI: 10.48550/arXiv.2306.12699](https://doi.org/10.48550/arXiv.2306.12699) """ @inline function flux_nonconservative_wintermeyer_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterEquations1D) # Pull the necessary left and right state information h_ll = waterheight(u_ll, equations) - b_rr = u_rr[3] + b_jump = u_rr[3] - u_ll[3] # Bottom gradient nonconservative term: (0, g h b_x, 0) - f = SVector(0, equations.gravity * h_ll * b_rr, 0) + f = SVector(0, equations.gravity * h_ll * b_jump, 0) return f end @@ -226,11 +233,8 @@ end Non-symmetric two-point surface flux discretizing the nonconservative (source) term of that contains the gradient of the bottom topography [`ShallowWaterEquations1D`](@ref). -This contains additional terms compared to [`flux_nonconservative_wintermeyer_etal`](@ref) -that account for possible discontinuities in the bottom topography function. -Thus, this flux should be used in general at interfaces. For flux differencing volume terms, -[`flux_nonconservative_wintermeyer_etal`](@ref) is analytically equivalent but slightly -cheaper. +This flux can be used together with [`flux_fjordholm_etal`](@ref) at interfaces to ensure entropy +conservation and well-balancedness. Further details for the original finite volume formulation are available in - Ulrik S. Fjordholm, Siddhartha Mishr and Eitan Tadmor (2011) @@ -256,7 +260,6 @@ and for curvilinear 2D case in the paper: # cross-averaging across a discontinuous bottom topography # (ii) True surface part that uses `h_average` and `b_jump` to handle discontinuous bathymetry f = SVector(0, - equations.gravity * h_ll * b_ll + equations.gravity * h_average * b_jump, 0) @@ -285,7 +288,7 @@ Further details on the hydrostatic reconstruction and its motivation can be foun orientation::Integer, equations::ShallowWaterEquations1D) # Pull the water height and bottom topography on the left - h_ll, _, b_ll = u_ll + h_ll, _, _ = u_ll # Create the hydrostatic reconstruction for the left solution state u_ll_star, _ = hydrostatic_reconstruction_audusse_etal(u_ll, u_rr, equations) @@ -293,52 +296,11 @@ Further details on the hydrostatic reconstruction and its motivation can be foun # Copy the reconstructed water height for easier to read code h_ll_star = u_ll_star[1] - # Includes two parts: - # (i) Diagonal (consistent) term from the volume flux that uses `b_ll` to avoid - # cross-averaging across a discontinuous bottom topography - # (ii) True surface part that uses `h_ll` and `h_ll_star` to handle discontinuous bathymetry return SVector(0, - equations.gravity * h_ll * b_ll + equations.gravity * (h_ll^2 - h_ll_star^2), 0) end -""" - flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, - equations::ShallowWaterEquations1D) - -!!! warning "Experimental code" - This numerical flux is experimental and may change in any future release. - -Non-symmetric path-conservative two-point volume flux discretizing the nonconservative (source) term -that contains the gradient of the bottom topography [`ShallowWaterEquations1D`](@ref). - -This is a modified version of [`flux_nonconservative_wintermeyer_etal`](@ref) that gives entropy -conservation and well-balancedness in both the volume and surface when combined with -[`flux_wintermeyer_etal`](@ref). - -For further details see: -- Patrick Ersing, Andrew R. Winters (2023) - An entropy stable discontinuous Galerkin method for the two-layer shallow water equations on - curvilinear meshes - [DOI: 10.48550/arXiv.2306.12699](https://doi.org/10.48550/arXiv.2306.12699) -""" -@inline function flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, - equations::ShallowWaterEquations1D) - # Pull the necessary left and right state information - h_ll = waterheight(u_ll, equations) - b_rr = u_rr[3] - b_ll = u_ll[3] - - # Calculate jump - b_jump = b_rr - b_ll - - # Bottom gradient nonconservative term: (0, g h b_x, 0) - f = SVector(0, equations.gravity * h_ll * b_jump, 0) - - return f -end - """ flux_fjordholm_etal(u_ll, u_rr, orientation, equations::ShallowWaterEquations1D) @@ -378,7 +340,8 @@ end Total energy conservative (mathematical entropy for shallow water equations) split form. When the bottom topography is nonzero this scheme will be well-balanced when used as a `volume_flux`. -The `surface_flux` should still use, e.g., [`flux_fjordholm_etal`](@ref). +For the `surface_flux` either [`flux_wintermeyer_etal`](@ref) or [`flux_fjordholm_etal`](@ref) can +be used to ensure well-balancedness and entropy conservation. Further details are available in Theorem 1 of the paper: - Niklas Wintermeyer, Andrew R. Winters, Gregor J. Gassner and David A. Kopriva (2017) @@ -571,7 +534,7 @@ end # Note, only the first two are the entropy variables, the third entry still # just carries the bottom topography values for convenience @inline function cons2entropy(u, equations::ShallowWaterEquations1D) - h, h_v, b = u + h, _, b = u v = velocity(u, equations) diff --git a/src/equations/shallow_water_2d.jl b/src/equations/shallow_water_2d.jl index db8f00fc15..4ecaf3b6e1 100644 --- a/src/equations/shallow_water_2d.jl +++ b/src/equations/shallow_water_2d.jl @@ -274,28 +274,30 @@ end Non-symmetric two-point volume flux discretizing the nonconservative (source) term that contains the gradient of the bottom topography [`ShallowWaterEquations2D`](@ref). -On curvilinear meshes, this nonconservative flux depends on both the -contravariant vector (normal direction) at the current node and the averaged -one. This is different from numerical fluxes used to discretize conservative -terms. +For the `surface_flux` either [`flux_wintermeyer_etal`](@ref) or [`flux_fjordholm_etal`](@ref) can +be used to ensure well-balancedness and entropy conservation. -Further details are available in the paper: +Further details are available in the papers: - Niklas Wintermeyer, Andrew R. Winters, Gregor J. Gassner and David A. Kopriva (2017) An entropy stable nodal discontinuous Galerkin method for the two dimensional shallow water equations on unstructured curvilinear meshes with discontinuous bathymetry [DOI: 10.1016/j.jcp.2017.03.036](https://doi.org/10.1016/j.jcp.2017.03.036) +- Patrick Ersing, Andrew R. Winters (2023) + An entropy stable discontinuous Galerkin method for the two-layer shallow water equations on + curvilinear meshes + [DOI: 10.48550/arXiv.2306.12699](https://doi.org/10.48550/arXiv.2306.12699) """ @inline function flux_nonconservative_wintermeyer_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterEquations2D) # Pull the necessary left and right state information h_ll = waterheight(u_ll, equations) - b_rr = u_rr[4] + b_jump = u_rr[4] - u_ll[4] # Bottom gradient nonconservative term: (0, g h b_x, g h b_y, 0) if orientation == 1 - f = SVector(0, equations.gravity * h_ll * b_rr, 0, 0) + f = SVector(0, equations.gravity * h_ll * b_jump, 0, 0) else # orientation == 2 - f = SVector(0, 0, equations.gravity * h_ll * b_rr, 0) + f = SVector(0, 0, equations.gravity * h_ll * b_jump, 0) end return f end @@ -306,12 +308,12 @@ end equations::ShallowWaterEquations2D) # Pull the necessary left and right state information h_ll = waterheight(u_ll, equations) - b_rr = u_rr[4] - # Note this routine only uses the `normal_direction_average` and the average of the - # bottom topography to get a quadratic split form DG gradient on curved elements + b_jump = u_rr[4] - u_ll[4] + + # Bottom gradient nonconservative term: (0, g h b_x, g h b_y, 0) return SVector(0, - normal_direction_average[1] * equations.gravity * h_ll * b_rr, - normal_direction_average[2] * equations.gravity * h_ll * b_rr, + normal_direction_average[1] * equations.gravity * h_ll * b_jump, + normal_direction_average[2] * equations.gravity * h_ll * b_jump, 0) end @@ -326,16 +328,8 @@ end Non-symmetric two-point surface flux discretizing the nonconservative (source) term of that contains the gradient of the bottom topography [`ShallowWaterEquations2D`](@ref). -On curvilinear meshes, this nonconservative flux depends on both the -contravariant vector (normal direction) at the current node and the averaged -one. This is different from numerical fluxes used to discretize conservative -terms. - -This contains additional terms compared to [`flux_nonconservative_wintermeyer_etal`](@ref) -that account for possible discontinuities in the bottom topography function. -Thus, this flux should be used in general at interfaces. For flux differencing volume terms, -[`flux_nonconservative_wintermeyer_etal`](@ref) is analytically equivalent but slightly -cheaper. +This flux can be used together with [`flux_fjordholm_etal`](@ref) at interfaces to ensure entropy +conservation and well-balancedness. Further details for the original finite volume formulation are available in - Ulrik S. Fjordholm, Siddhartha Mishr and Eitan Tadmor (2011) @@ -356,18 +350,13 @@ and for curvilinear 2D case in the paper: h_average = 0.5f0 * (h_ll + h_rr) b_jump = b_rr - b_ll - # Includes two parts: - # (i) Diagonal (consistent) term from the volume flux that uses `b_ll` to avoid - # cross-averaging across a discontinuous bottom topography - # (ii) True surface part that uses `h_average` and `b_jump` to handle discontinuous bathymetry + # Bottom gradient nonconservative term: (0, g h b_x, g h b_y, 0) if orientation == 1 f = SVector(0, - equations.gravity * h_ll * b_ll + equations.gravity * h_average * b_jump, 0, 0) else # orientation == 2 f = SVector(0, 0, - equations.gravity * h_ll * b_ll + equations.gravity * h_average * b_jump, 0) end @@ -383,20 +372,12 @@ end h_ll, _, _, b_ll = u_ll h_rr, _, _, b_rr = u_rr - # Comes in two parts: - # (i) Diagonal (consistent) term from the volume flux that uses `normal_direction_average` - # but we use `b_ll` to avoid cross-averaging across a discontinuous bottom topography - - f2 = normal_direction_average[1] * equations.gravity * h_ll * b_ll - f3 = normal_direction_average[2] * equations.gravity * h_ll * b_ll - - # (ii) True surface part that uses `normal_direction_ll`, `h_average` and `b_jump` - # to handle discontinuous bathymetry h_average = 0.5f0 * (h_ll + h_rr) b_jump = b_rr - b_ll - f2 += normal_direction_ll[1] * equations.gravity * h_average * b_jump - f3 += normal_direction_ll[2] * equations.gravity * h_average * b_jump + # Bottom gradient nonconservative term: (0, g h b_x, g h b_y, 0) + f2 = normal_direction_average[1] * equations.gravity * h_average * b_jump + f3 = normal_direction_average[2] * equations.gravity * h_average * b_jump # First and last equations do not have a nonconservative flux f1 = f4 = 0 @@ -472,18 +453,12 @@ Further details for the hydrostatic reconstruction and its motivation can be fou # Copy the reconstructed water height for easier to read code h_ll_star = u_ll_star[1] - # Includes two parts: - # (i) Diagonal (consistent) term from the volume flux that uses `b_ll` to avoid - # cross-averaging across a discontinuous bottom topography - # (ii) True surface part that uses `h_ll` and `h_ll_star` to handle discontinuous bathymetry if orientation == 1 f = SVector(0, - equations.gravity * h_ll * b_ll + equations.gravity * (h_ll^2 - h_ll_star^2), 0, 0) else # orientation == 2 f = SVector(0, 0, - equations.gravity * h_ll * b_ll + equations.gravity * (h_ll^2 - h_ll_star^2), 0) end @@ -504,18 +479,8 @@ end # Copy the reconstructed water height for easier to read code h_ll_star = u_ll_star[1] - # Comes in two parts: - # (i) Diagonal (consistent) term from the volume flux that uses `normal_direction_average` - # but we use `b_ll` to avoid cross-averaging across a discontinuous bottom topography - - f2 = normal_direction_average[1] * equations.gravity * h_ll * b_ll - f3 = normal_direction_average[2] * equations.gravity * h_ll * b_ll - - # (ii) True surface part that uses `normal_direction_ll`, `h_ll` and `h_ll_star` - # to handle discontinuous bathymetry - - f2 += normal_direction_ll[1] * equations.gravity * (h_ll^2 - h_ll_star^2) - f3 += normal_direction_ll[2] * equations.gravity * (h_ll^2 - h_ll_star^2) + f2 = normal_direction_average[1] * equations.gravity * (h_ll^2 - h_ll_star^2) + f3 = normal_direction_average[2] * equations.gravity * (h_ll^2 - h_ll_star^2) # First and last equations do not have a nonconservative flux f1 = f4 = 0 @@ -523,73 +488,6 @@ end return SVector(f1, f2, f3, f4) end -""" - flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, - equations::ShallowWaterEquations2D) - flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, - equations::ShallowWaterEquations2D) - -!!! warning "Experimental code" - This numerical flux is experimental and may change in any future release. - -Non-symmetric path-conservative two-point volume flux discretizing the nonconservative (source) term -that contains the gradient of the bottom topography [`ShallowWaterEquations2D`](@ref). - -On curvilinear meshes, this nonconservative flux depends on both the -contravariant vector (normal direction) at the current node and the averaged -one. This is different from numerical fluxes used to discretize conservative -terms. - -This is a modified version of [`flux_nonconservative_wintermeyer_etal`](@ref) that gives entropy -conservation and well-balancedness in both the volume and surface when combined with -[`flux_wintermeyer_etal`](@ref). - -For further details see: -- Patrick Ersing, Andrew R. Winters (2023) - An entropy stable discontinuous Galerkin method for the two-layer shallow water equations on - curvilinear meshes - [DOI: 10.48550/arXiv.2306.12699](https://doi.org/10.48550/arXiv.2306.12699) -""" -@inline function flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, - equations::ShallowWaterEquations2D) - # Pull the necessary left and right state information - h_ll = waterheight(u_ll, equations) - b_rr = u_rr[4] - b_ll = u_ll[4] - - # Calculate jump - b_jump = b_rr - b_ll - - # Bottom gradient nonconservative term: (0, g h b_x, g h b_y, 0) - if orientation == 1 - f = SVector(0, equations.gravity * h_ll * b_jump, 0, 0) - else # orientation == 2 - f = SVector(0, 0, equations.gravity * h_ll * b_jump, 0) - end - return f -end - -@inline function flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, - equations::ShallowWaterEquations2D) - # Pull the necessary left and right state information - h_ll = waterheight(u_ll, equations) - b_rr = u_rr[4] - b_ll = u_ll[4] - - # Calculate jump - b_jump = b_rr - b_ll - # Note this routine only uses the `normal_direction_average` and the average of the - # bottom topography to get a quadratic split form DG gradient on curved elements - return SVector(0, - normal_direction_average[1] * equations.gravity * h_ll * b_jump, - normal_direction_average[2] * equations.gravity * h_ll * b_jump, - 0) -end - """ flux_fjordholm_etal(u_ll, u_rr, orientation_or_normal_direction, equations::ShallowWaterEquations2D) @@ -664,7 +562,8 @@ end Total energy conservative (mathematical entropy for shallow water equations) split form. When the bottom topography is nonzero this scheme will be well-balanced when used as a `volume_flux`. -The `surface_flux` should still use, e.g., [`flux_fjordholm_etal`](@ref). +For the `surface_flux` either [`flux_wintermeyer_etal`](@ref) or [`flux_fjordholm_etal`](@ref) can +be used to ensure well-balancedness and entropy conservation. Further details are available in Theorem 1 of the paper: - Niklas Wintermeyer, Andrew R. Winters, Gregor J. Gassner and David A. Kopriva (2017) diff --git a/test/test_tree_1d_shallowwater.jl b/test/test_tree_1d_shallowwater.jl index 8fe3291a93..42a91e578e 100644 --- a/test/test_tree_1d_shallowwater.jl +++ b/test/test_tree_1d_shallowwater.jl @@ -98,7 +98,7 @@ end end end -@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_well_balanced.jl"), l2=[ 0.10416666834254838, @@ -107,9 +107,7 @@ end ], linf=[2.0000000000000004, 3.0610625110157164e-14, 2.0], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.25)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -169,7 +167,7 @@ end end end -@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms.jl"), l2=[ 0.005774284062933275, @@ -182,9 +180,7 @@ end 9.098379777450205e-5, ], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.025)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -200,13 +196,13 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms_dirichlet.jl"), l2=[ - 0.0022851099219788917, - 0.01560453773635554, - 4.43649172558535e-5, + 0.0022667320585353927, + 0.01571629729279524, + 4.4364917255842716e-5, ], linf=[ - 0.008934615705174398, - 0.059403169140869405, + 0.008945234652224965, + 0.059403165802872415, 9.098379777405796e-5, ], tspan=(0.0, 0.025)) @@ -224,13 +220,13 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms_dirichlet.jl"), l2=[ - 0.0022956052733432287, - 0.015540053559855601, - 4.43649172558535e-5, + 0.0022774071143995952, + 0.01566214422689219, + 4.4364917255842716e-5, ], linf=[ - 0.008460440313118323, - 0.05720939349382359, + 0.008451721489057373, + 0.05720939055279217, 9.098379777405796e-5, ], surface_flux=(FluxHydrostaticReconstruction(FluxHLL(min_max_speed_naive), diff --git a/test/test_tree_2d_shallowwater.jl b/test/test_tree_2d_shallowwater.jl index 9a3ba36c7d..bcad663008 100644 --- a/test/test_tree_2d_shallowwater.jl +++ b/test/test_tree_2d_shallowwater.jl @@ -114,7 +114,7 @@ end end end -@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_well_balanced.jl"), l2=[ 0.9130579602987146, @@ -129,9 +129,7 @@ end 2.1130620376156584, ], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.25)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -172,15 +170,15 @@ end @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms_dirichlet.jl"), l2=[ - 0.0018746929418489125, - 0.017332321628469628, - 0.01634953679145536, - 6.274146767717023e-5, + 0.0018596727473552813, + 0.017306217777629147, + 0.016367646997420396, + 6.274146767723934e-5, ], linf=[ - 0.016262353691956388, - 0.08726160620859424, - 0.09043621801418844, + 0.016548007102923368, + 0.08726160568822783, + 0.09043621622245013, 0.0001819675955490041, ], tspan=(0.0, 0.025)) @@ -248,7 +246,7 @@ end end end -@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms.jl"), l2=[ 0.002471853426064005, @@ -263,9 +261,7 @@ end 0.0001819675955490041, ], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.25)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) diff --git a/test/test_type.jl b/test/test_type.jl index d22afa65c0..c15ac5f78c 100644 --- a/test/test_type.jl +++ b/test/test_type.jl @@ -2045,8 +2045,6 @@ isdir(outdir) && rm(outdir, recursive = true) @test eltype(@inferred flux_nonconservative_audusse_etal(u_ll, u_rr, orientation, equations)) == RealT - @test eltype(@inferred flux_nonconservative_ersing_etal(u_ll, u_rr, orientation, - equations)) == RealT @test eltype(@inferred flux_fjordholm_etal(u_ll, u_rr, orientation, equations)) == RealT @test eltype(@inferred flux_wintermeyer_etal(u_ll, u_rr, orientation, @@ -2133,10 +2131,6 @@ isdir(outdir) && rm(outdir, recursive = true) normal_direction_ll, normal_direction_average, equations)) == RealT - @test eltype(@inferred flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll, - normal_direction_average, - equations)) == RealT @test eltype(@inferred flux_fjordholm_etal(u_ll, u_rr, normal_direction, equations)) == RealT @test eltype(@inferred flux_wintermeyer_etal(u_ll, u_rr, normal_direction, @@ -2181,10 +2175,6 @@ isdir(outdir) && rm(outdir, recursive = true) orientation, equations)) == RealT - @test eltype(eltype(@inferred flux_nonconservative_ersing_etal(u_ll, u_rr, - orientation, - equations))) == - RealT @test eltype(@inferred flux_fjordholm_etal(u_ll, u_rr, orientation, equations)) == RealT @test eltype(@inferred flux_wintermeyer_etal(u_ll, u_rr, orientation, diff --git a/test/test_unstructured_2d.jl b/test/test_unstructured_2d.jl index 5c228d1e04..563f99792d 100644 --- a/test/test_unstructured_2d.jl +++ b/test/test_unstructured_2d.jl @@ -351,16 +351,16 @@ end @trixi_testset "elixir_shallowwater_well_balanced.jl with FluxHydrostaticReconstruction" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_well_balanced.jl"), l2=[ - 1.2164292510839085, - 1.2643106818778908e-12, - 1.269230436589819e-12, - 1.2164292510839079, + 1.2164292510839063, + 1.2676379081600215e-12, + 1.255855785593831e-12, + 1.2164292510839074, ], linf=[ - 1.513851228231562, - 1.6670644673575802e-11, - 1.8426585188623954e-11, - 1.513851228231574, + 1.5138512282315604, + 1.658245722058109e-11, + 1.8665562182185795e-11, + 1.5138512282315737, ], surface_flux=(FluxHydrostaticReconstruction(flux_lax_friedrichs, hydrostatic_reconstruction_audusse_etal), @@ -376,7 +376,7 @@ end end end -@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_well_balanced.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_well_balanced.jl"), l2=[ 1.2164292510839083, @@ -391,9 +391,7 @@ end 1.513851228231574, ], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.25)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -458,7 +456,7 @@ end end end -@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_ersing_etal" begin +@trixi_testset "elixir_shallowwater_source_terms.jl with flux_nonconservative_wintermeyer_etal" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_source_terms.jl"), l2=[ 0.001118046975499805, @@ -473,9 +471,7 @@ end 2.6407324614341476e-5, ], surface_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), - volume_flux=(flux_wintermeyer_etal, - flux_nonconservative_ersing_etal), + flux_nonconservative_wintermeyer_etal), tspan=(0.0, 0.025)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) @@ -517,12 +513,16 @@ end @trixi_testset "elixir_shallowwater_dirichlet.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_dirichlet.jl"), l2=[ - 1.1577518608938916e-5, 4.859252379740366e-13, - 4.639600837197925e-13, 1.1577518608952174e-5, + 1.1577518608950964e-5, + 4.761947272222427e-13, + 4.546045873135486e-13, + 1.157751860893347e-5, ], linf=[ - 8.3940638787805e-5, 1.1446362498574484e-10, - 1.1124515748367981e-10, 8.39406387962427e-5, + 8.394063879002545e-5, + 1.1211566736150389e-10, + 1.0890426250906834e-10, + 8.394063879602065e-5, ], tspan=(0.0, 2.0)) # Ensure that we do not have excessive memory allocations