Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ amr_controller = ControllerThreeLevel(semi, amr_indicator,
max_level = 5, max_threshold = 0.1)

amr_callback = AMRCallback(semi, amr_controller,
interval = 2,
interval = 3,
adapt_initial_condition = true,
adapt_initial_condition_only_refine = true)

Expand All @@ -130,8 +130,9 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-7, 1.0e-
###############################################################################
# run the simulation

# We supply a small initial timestep to be able to use a larger AMR interval (2 instead of 1) throughout the simulation.
# We supply a small initial timestep to be able to use a larger AMR interval (3 instead of 1) throughout the simulation.
# This pays off almost immediately as only the first couple timesteps use this timestep before it is ramped up.
dt0 = 1e-8
sol = solve(ode, SSPRK43(stage_limiter! = stage_limiter!, thread = Trixi.True());
dt = dt0, ode_default_options()..., callback = callbacks);
adaptive = false, dt = dt0,
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,4 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, sav
sol = solve(ode, SBDF2(; autodiff = AutoFiniteDiff());
ode_default_options()...,
dt = 0.01,
abstol = 1e-9, reltol = 1e-9,
callback = callbacks)
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ ode = semidiscretize(semi, tspan,
sol = solve(ode, SBDF2(; autodiff = AutoFiniteDiff());
ode_default_options()...,
dt = dt_restart,
abstol = 1e-9, reltol = 1e-9,
callback = callbacks);
2 changes: 1 addition & 1 deletion test/test_mpi_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows()
@trixi_testset "elixir_advection_restart_amr.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_advection_restart_amr.jl"),
l2=[8.018498574373939e-5],
l2=[8.018497923389368e-5],
linf=[0.0007307237754662355])
end

Expand Down
17 changes: 9 additions & 8 deletions test/test_p4est_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -571,17 +571,18 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_euler_supersonic_cylinder_scO2.jl"),
l2=[
0.029314031292054992,
0.053506886526450186,
0.03543104168310674,
0.21538892425489486
0.02952388632922144,
0.05371261793410487,
0.035384060637794805,
0.21588602773829588
],
linf=[
4.159114155336756,
4.200427029096135,
7.397166897133932,
33.18602863132469
4.163159992186843,
4.2267168297270725,
7.332852278485849,
34.243826868270645
],
adaptive=false, dt=1e-5,
tspan=(0.0, 0.001))
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
4 changes: 2 additions & 2 deletions test/test_tree_2d_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ end
@trixi_testset "elixir_advection_implicit_sparse_jacobian_restart.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_advection_implicit_sparse_jacobian_restart.jl"),
l2=[0.007964280656552015], linf=[0.011267546271397588])
l2=[0.00972948620504335], linf=[0.013761951552254348])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
@test_allocations(Trixi.rhs!, semi_float_type, sol, 1000)
Expand All @@ -52,7 +52,7 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_advection_implicit_sparse_jacobian_restart.jl"),
colorvec=nothing,
l2=[0.007964280656552015], linf=[0.011267546271397588])
l2=[0.00972948620504335], linf=[0.013761951552254348])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
@test_allocations(Trixi.rhs!, semi_float_type, sol, 1000)
Expand Down
Loading