Skip to content

Commit

Permalink
Add test for saving deviations for positivity limiter (non-linear)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed May 11, 2024
1 parent 7586a71 commit 8111037
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ callbacks = CallbackSet(summary_callback,
###############################################################################
# run the simulation

stage_callbacks = (SubcellLimiterIDPCorrection(), BoundsCheckCallback(save_errors = false))
stage_callbacks = (SubcellLimiterIDPCorrection(),
BoundsCheckCallback(save_errors = false, interval = 100))

sol = Trixi.solve(ode, Trixi.SimpleSSPRK33(stage_callbacks = stage_callbacks);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
Expand Down
9 changes: 8 additions & 1 deletion test/test_tree_2d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ end
end

@trixi_testset "elixir_euler_kelvin_helmholtz_instability_sc_subcell.jl" begin
rm(joinpath("out", "deviations.txt"), force = true)
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_euler_kelvin_helmholtz_instability_sc_subcell.jl"),
l2=[
Expand All @@ -642,7 +643,13 @@ end
0.5822547982757897,
0.7300051017382696,
],
tspan=(0.0, 2.0))
tspan=(0.0, 2.0),
coverage_override=(maxiters = 7,),
save_errors=true)
lines = readlines(joinpath("out", "deviations.txt"))
@test lines[1] == "# iter, simu_time, rho_min, pressure_min"
# Run without (with) coverage takes 745 (7) time steps
@test startswith(lines[end], "7")
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
Expand Down

0 comments on commit 8111037

Please sign in to comment.