Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sloede authored Sep 1, 2023
1 parent abce5ae commit a7d56a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions test/test_parabolic_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ isdir(outdir) && rm(outdir, recursive=true)
callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, amr_callback)
sol = solve(ode, KenCarp4(autodiff=false), abstol=time_abs_tol, reltol=time_int_tol,
save_everystep=false, callback=callbacks)
analysis_callback_sol = analysis_callback(sol)
@test analysis_callback_sol.l2[1] 6.4878111416468355e-6
@test analysis_callback_sol.linf[1] 3.258075790424364e-5
l2_error, linf_error = analysis_callback(sol)
@test l2_error [6.4878111416468355e-6]
@test linf_error [3.258075790424364e-5]
end

@trixi_testset "TreeMesh1D: elixir_navierstokes_convergence_periodic.jl" begin
Expand Down
12 changes: 6 additions & 6 deletions test/test_parabolic_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ isdir(outdir) && rm(outdir, recursive=true)
callbacks = CallbackSet(summary_callback, alive_callback, analysis_callback)
sol = solve(ode, RDPK3SpFSAL49(); abstol=time_int_tol, reltol=time_int_tol,
ode_default_options()..., callback=callbacks)
analysis_callback_sol = analysis_callback(sol)
@test analysis_callback_sol.l2[1] 1.67452550744728e-6
@test analysis_callback_sol.linf[1] 7.905059166368744e-6
l2_error, linf_error = analysis_callback(sol)
@test l2_error [1.67452550744728e-6]
@test linf_error [7.905059166368744e-6]

# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down Expand Up @@ -229,9 +229,9 @@ isdir(outdir) && rm(outdir, recursive=true)
callbacks = CallbackSet(summary_callback, alive_callback, analysis_callback)
sol = solve(ode, RDPK3SpFSAL49(); abstol=time_int_tol, reltol=time_int_tol, dt = 1e-5,
ode_default_options()..., callback=callbacks)
analysis_callback_sol = analysis_callback(sol)
@test analysis_callback_sol.l2 [0.00024296959173852447; 0.0002093263158670915; 0.0005390572390977262; 0.00026753561392341537]
@test analysis_callback_sol.linf [0.0016210102053424436; 0.002593287648655501; 0.002953907343823712; 0.002077119120180271]
l2_error, linf_error = analysis_callback(sol)
@test l2_error [0.00024296959173852447; 0.0002093263158670915; 0.0005390572390977262; 0.00026753561392341537]
@test linf_error [0.0016210102053424436; 0.002593287648655501; 0.002953907343823712; 0.002077119120180271]
end

@trixi_testset "TreeMesh2D: elixir_navierstokes_lid_driven_cavity.jl" begin
Expand Down
12 changes: 6 additions & 6 deletions test/test_parabolic_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ isdir(outdir) && rm(outdir, recursive=true)
callbacks = CallbackSet(summary_callback, alive_callback, analysis_callback)
sol = solve(ode, RDPK3SpFSAL49(); abstol=time_int_tol, reltol=time_int_tol, dt = 1e-5,
ode_default_options()..., callback=callbacks)
analysis_callback_sol = analysis_callback(sol)
@test analysis_callback_sol.l2 [0.0003991794175622818; 0.0008853745163670504; 0.0010658655552066817; 0.0008785559918324284; 0.001403163458422815]
@test analysis_callback_sol.linf [0.0035306410538458177; 0.01505692306169911; 0.008862444161110705; 0.015065647972869856; 0.030402714743065218]
l2_error, linf_error = analysis_callback(sol)
@test l2_error [0.0003991794175622818; 0.0008853745163670504; 0.0010658655552066817; 0.0008785559918324284; 0.001403163458422815]
@test linf_error [0.0035306410538458177; 0.01505692306169911; 0.008862444161110705; 0.015065647972869856; 0.030402714743065218]
end

@trixi_testset "TreeMesh3D: elixir_navierstokes_taylor_green_vortex.jl" begin
Expand Down Expand Up @@ -127,9 +127,9 @@ isdir(outdir) && rm(outdir, recursive=true)
sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt=5e-3,
save_everystep=false, callback=callbacks);
analysis_callback_sol = analysis_callback(sol)
@test analysis_callback_sol.l2 [0.0013666103707729502; 0.2313581629543744; 0.2308164306264533; 0.17460246787819503; 0.28121914446544005]
@test analysis_callback_sol.linf [0.006938093883741336; 1.028235074139312; 1.0345438209717241; 1.0821111605203542; 1.2669636522564645]
l2_error, linf_error = analysis_callback(sol)
@test l2_error [0.0013666103707729502; 0.2313581629543744; 0.2308164306264533; 0.17460246787819503; 0.28121914446544005]
@test linf_error [0.006938093883741336; 1.028235074139312; 1.0345438209717241; 1.0821111605203542; 1.2669636522564645]

# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down

0 comments on commit a7d56a1

Please sign in to comment.