Skip to content

Commit

Permalink
set tolerances in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert committed Dec 11, 2024
1 parent 3302cd0 commit 7358093
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ analysis_callback = AnalysisCallback(semi; interval = 100,
callbacks = CallbackSet(analysis_callback, summary_callback)

saveat = range(tspan..., length = 100)
sol = solve(ode, Tsit5(), abstol = 1e-12, reltol = 1e-12,
sol = solve(ode, Tsit5(), abstol = 1e-7, reltol = 1e-7,
save_everystep = false, callback = callbacks, saveat = saveat)
4 changes: 4 additions & 0 deletions test/test_svaerd_kalisch_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ end
] begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "svaerd_kalisch_1d_basic_reflecting.jl"),
tspan=(0.0, 1.0),
abstol=1e-12,
reltol=1e-12, # this example is relatively unstable with higher tolerances
l2=[5.402315494643131e-6 6.70558305594986e-8 0.0],
linf=[9.787585531206844e-5 1.460266869784954e-7 0.0],
cons_error=[1.0484871583691058e-9 0.5469460930247998 0.0],
Expand All @@ -42,6 +44,8 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR, "svaerd_kalisch_1d_basic_reflecting.jl"),
tspan=(0.0, 1.0),
solver=solver,
abstol=1e-12,
reltol=1e-12, # this example is relatively unstable with higher tolerances
l2=[5.862278175937948e-6 4.11195454078554e-9 0.0],
linf=[3.135228725170691e-5 8.797787950237668e-8 0.0],
cons_error=[1.700425028441774e-9 0.5469460935005555 0.0],
Expand Down

0 comments on commit 7358093

Please sign in to comment.