From ed53d2e89377bb79eace97bd10b91e0163f34915 Mon Sep 17 00:00:00 2001 From: bennibolm Date: Fri, 18 Oct 2024 11:35:13 +0200 Subject: [PATCH] Add comments; Fix two tests --- examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl | 2 +- test/test_p4est_2d.jl | 1 + test/test_structured_2d.jl | 6 +++++- test/test_tree_2d_euler.jl | 7 +++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl b/examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl index d05cd8d1172..78a4a72ed6e 100644 --- a/examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl +++ b/examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl @@ -48,7 +48,7 @@ limiter_mcl = SubcellLimiterMCL(equations, basis; positivity_limiter_pressure_exact = false, entropy_limiter_semidiscrete = true, smoothness_indicator = true, - Plotting = false) + Plotting = true) volume_integral = VolumeIntegralSubcellLimiting(limiter_mcl; volume_flux_dg = volume_flux, volume_flux_fv = surface_flux) diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 36d1a3d6672..f31c90316bd 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -351,6 +351,7 @@ end 6.268843623142863 ], tspan=(0.0, 0.3)) + # Test alphas.txt lines = readlines(joinpath("out", "alphas.txt")) @test lines[1] == "# iter, simu_time, alpha_max, alpha_avg" diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index 7168ebe20d1..f2f389ad54d 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -735,6 +735,7 @@ end ], initial_refinement_level=2, tspan=(0.0, 0.05)) + # Test alphas.txt lines = readlines(joinpath("out", "alphas.txt")) @test lines[1] == "# iter, simu_time, alpha_max, alpha_avg" @@ -781,6 +782,7 @@ end ], initial_refinement_level=2, tspan=(0.0, 0.05)) + # Test alphas_mean.txt lines = readlines(joinpath("out", "alphas_mean.txt")) @test lines[1] == "# iter, simu_time, alpha_min_rho, alpha_avg_rho, alpha_min_rho_v1, alpha_avg_rho_v1, alpha_min_rho_v2, alpha_avg_rho_v2, alpha_min_rho_e, alpha_avg_rho_e" @@ -792,8 +794,10 @@ end @test startswith(lines[end], "1, 0.0002") else # Run without coverage takes 191 time steps. - @test startswith(lines[end], "191, 0.05, 3.7017") + @test startswith(lines[end], "191, 0.05, 3.70") end + + # Test alphas_min.txt lines = readlines(joinpath("out", "alphas_min.txt")) @test lines[1] == "# iter, simu_time, alpha_min_rho, alpha_avg_rho, alpha_min_rho_v1, alpha_avg_rho_v1, alpha_min_rho_v2, alpha_avg_rho_v2, alpha_min_rho_e, alpha_avg_rho_e" diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index 63328d6fdb9..8c95eed9b39 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -564,6 +564,8 @@ end # Run without coverage takes 381 time steps. @test startswith(lines[end], "381") end + + # Test alphas.txt lines = readlines(joinpath("out", "alphas.txt")) @test lines[1] == "# iter, simu_time, alpha_max, alpha_avg" @@ -613,6 +615,7 @@ end initial_refinement_level=4, coverage_override=(maxiters = 6,), save_errors=true) + # Test deviations.txt lines = readlines(joinpath("out", "deviations.txt")) @test lines[1] == "# iter, simu_time, rho_min, rho_max, rho_v1_min, rho_v1_max, rho_v2_min, rho_v2_max, rho_e_min, rho_e_max, pressure_min" @@ -626,6 +629,8 @@ end # Run without coverage takes 349 time steps. @test startswith(lines[end], "349") end + + # Test alphas_mean.txt lines = readlines(joinpath("out", "alphas_mean.txt")) @test lines[1] == "# iter, simu_time, alpha_min_rho, alpha_avg_rho, alpha_min_rho_v1, alpha_avg_rho_v1, alpha_min_rho_v2, alpha_avg_rho_v2, alpha_min_rho_e, alpha_avg_rho_e, alpha_min_pressure, alpha_avg_pressure, alpha_min_entropy, alpha_avg_entropy" @@ -639,6 +644,8 @@ end # Run without coverage takes 349 time steps. @test startswith(lines[end], "349, 1.0, 0.0002") end + + # Test alphas_min.txt lines = readlines(joinpath("out", "alphas_min.txt")) @test lines[1] == "# iter, simu_time, alpha_min_rho, alpha_avg_rho, alpha_min_rho_v1, alpha_avg_rho_v1, alpha_min_rho_v2, alpha_avg_rho_v2, alpha_min_rho_e, alpha_avg_rho_e, alpha_min_pressure, alpha_avg_pressure, alpha_min_entropy, alpha_avg_entropy"