Skip to content

Commit

Permalink
Add comments; Fix two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Oct 18, 2024
1 parent ea55b68 commit ed53d2e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_euler_blast_wave_MCL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions test/test_p4est_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion test/test_structured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions test/test_tree_2d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit ed53d2e

Please sign in to comment.