Skip to content

Commit

Permalink
platform independent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Sep 11, 2023
1 parent cb3eac8 commit 7e68d94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions examples/tree_2d_dgsem/elixir_navierstokes_shearlayer_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ode = semidiscretize(semi, tspan)

summary_callback = SummaryCallback()

analysis_interval = 1000
analysis_interval = 2000
analysis_callback = AnalysisCallback(semi, interval=analysis_interval)

alive_callback = AliveCallback(analysis_interval=analysis_interval,)
Expand All @@ -75,15 +75,18 @@ amr_callback = AMRCallback(semi, amr_controller,
adapt_initial_condition=true,
adapt_initial_condition_only_refine=true)

stepsize_callback = StepsizeCallback(cfl=1.3)

callbacks = CallbackSet(summary_callback,
analysis_callback,
alive_callback,
amr_callback)
amr_callback,
stepsize_callback)

###############################################################################
# run the simulation

time_int_tol = 1e-7
sol = solve(ode, RDPK3SpFSAL49(); abstol=time_int_tol, reltol=time_int_tol,
ode_default_options()..., callback=callbacks)
sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt=1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep=false, callback=callbacks);
summary_callback() # print the timer summary
4 changes: 2 additions & 2 deletions test/test_parabolic_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ isdir(outdir) && rm(outdir, recursive=true)

@trixi_testset "TreeMesh2D: elixir_navierstokes_shearlayer_amr.jl" begin
@test_trixi_include(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_navierstokes_shearlayer_amr.jl"),
l2 = [0.005353306916161318, 0.4077336028873465, 0.43756829240941464, 1.1759497303478266],
linf = [0.034791663521213545, 1.1650592394066237, 1.4841924833734612, 8.713274087336629]
l2 = [0.00526017743452336, 0.4130430692895672, 0.4310996183791349, 1.1544344171604635],
linf = [0.03492185879198495, 1.392635891671335, 1.357551616406459, 8.713760873018146]
)
end

Expand Down

0 comments on commit 7e68d94

Please sign in to comment.