Path: blob/main/test/test_p4est_3d_mhdmultiion.jl
5582 views
module TestExamples3DIdealGlmMhdMultiIon12using Test3using Trixi45include("test_trixi.jl")67# pathof(Trixi) returns /path/to/Trixi/src/Trixi.jl, dirname gives the parent directory8EXAMPLES_DIR = joinpath(examples_dir(), "p4est_3d_dgsem")910@testset "MHD Multi-ion" begin11#! format: noindent1213@trixi_testset "elixir_mhdmultiion_ec.jl" begin14@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),15l2=[160.003734820532985263,170.0038615619955546204,180.003833638703487458,190.0028263125135739955,200.0023618139630058143,210.002384129259605738,220.0023828293292904833,230.038089526935383124,240.0038194562843790105,250.003439479296467246,260.003526498173885533,270.0034956719160693537,280.02143679204123428,293.3199722425501164e-630],31linf=[320.2016143602393723,330.1707562492816741,340.19671841540041113,350.092481456884773,360.09928141143714853,370.10613515319792097,380.11127460598498372,391.2130363801029604,400.12582249707043758,410.1698494562737311,420.16751667624425207,430.1687325700572586,440.7019146966991214,450.000781211616156169646], tspan=(0.0, 0.05))47# Ensure that we do not have excessive memory allocations48# (e.g., from type instabilities)49@test_allocations(Trixi.rhs!, semi, sol, 1000)50end5152# Up to version 0.13.0, `max_abs_speed_naive` was used as the default wave speed estimate of53# `const flux_lax_friedrichs = FluxLaxFriedrichs(), i.e., `FluxLaxFriedrichs(max_abs_speed = max_abs_speed_naive)`.54# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.55# Thus, we exchanged in PR#2458 the default wave speed used in the LLF flux to `max_abs_speed`.56# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.57# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the58# `StepsizeCallback` (CFL-Condition) and less diffusion.59@trixi_testset "Provably entropy-stable LLF-type fluxes for multi-ion GLM-MHD" begin60@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhdmultiion_ec.jl"),61l2=[620.0028955650582195335,630.0029749524273695624,640.0029533907732692344,650.0024285755843305988,660.0023749924019966094,670.0024114801452486206,680.0023991164504279404,690.03150571433653016,700.003874135295085382,710.0032206538891184646,720.0033289635387358306,730.0032922608966505377,740.019053919178522397,751.2888164218472409e-576],77linf=[780.10031944778984792,790.09835765892858706,800.09915484563347321,810.0643535254948433,820.09957773301344566,830.09607387748333969,840.09698728400727108,850.8341002490873852,860.12157560398831846,870.14778536942358805,880.1464940331696904,890.1449618481727096,900.5487673957733081,910.001454066867688836592],93surface_flux=(FluxPlusDissipation(flux_ruedaramirez_etal,94DissipationLaxFriedrichsEntropyVariables(max_abs_speed_naive)),95flux_nonconservative_ruedaramirez_etal),96tspan=(0.0, 0.05))97# Ensure that we do not have excessive memory allocations98# (e.g., from type instabilities)99@test_allocations(Trixi.rhs!, semi, sol, 1000)100end101end102end # module103104105