Skip to content

Commit

Permalink
UIpdated errors for visco-resistive MHD test after removing soure term.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCan committed Dec 6, 2023
1 parent 17de344 commit 7b83464
Showing 1 changed file with 38 additions and 50 deletions.
88 changes: 38 additions & 50 deletions test/test_tree_3d_mhd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,60 +295,48 @@ end
@trixi_testset "elixir_mhd_diffusive_alfven_wave.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_mhd_diffusive_alfven_wave.jl"),
l2=[
2.9261773702833585e-5,
4.2317742087810785e-5,
0.002386297778187223,
6.14533560433796e-17,
0.00011871260974613841,
9.966314200394032e-17,
0.0023862676185018978,
1.3752543133402248e-17,
4.755196029273029e-17,
0.009723896964276463,
0.0013111262214223665,
0.000639632696039887,
0.0014689482873199698,
0.00036585344043155426,
0.0013294252402214933,
0.0006389697014878424,
0.0014688601323265813,
0.00022638993249319084,
],
linf=[
6.607356972443412e-5,
5.286926606104682e-5,
0.0033837332345763374,
3.491675860507981e-16,
0.00017080879140696226,
4.440892098500626e-16,
0.0033837125993758897,
6.398201738523501e-17,
2.383451411922216e-16,
0.014222841419814558,
0.002288228859293565,
0.001110821298443975,
0.0026433825065787994,
0.0008390577089585349,
0.0024549005206054852,
0.0012253189393660602,
0.0027498258638988405,
0.0007904248596911075,
])
end

@testset "analysis_callback(sol) for AnalysisCallbackCoupled" begin
errors = analysis_callback(sol)
@test errors.l2[
2.9261773702833585e-5,
4.2317742087810785e-5,
0.002386297778187223,
6.14533560433796e-17,
0.00011871260974613841,
9.966314200394032e-17,
0.0023862676185018978,
1.3752543133402248e-17,
4.755196029273029e-17,
] rtol=1.0e-4
@test errors.linf[
6.607356972443412e-5,
5.286926606104682e-5,
0.0033837332345763374,
3.491675860507981e-16,
0.00017080879140696226,
4.440892098500626e-16,
0.0033837125993758897,
6.398201738523501e-17,
2.383451411922216e-16,
] rtol=1.0e-4
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
@testset "analysis_callback(sol) for AnalysisCallbackViscoResistiveMHD" begin
errors = analysis_callback(sol)
@test errors.l2[
0.009723896964276463, 0.0013111262214223665, 0.000639632696039887,
0.0014689482873199698, 0.00036585344043155426, 0.0013294252402214933,
0.0006389697014878424, 0.0014688601323265813, 0.00022638993249319084,
] rtol=1.0e-4
@test errors.linf[
60.014222841419814558, 0.002288228859293565, 0.001110821298443975,
0.0026433825065787994, 0.0008390577089585349, 0.0024549005206054852,
0.0012253189393660602, 0.0027498258638988405, 0.0007904248596911075,
] rtol=1.0e-4
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000
end
end
end
end
Expand Down

0 comments on commit 7b83464

Please sign in to comment.