|
38 | 38 | end |
39 | 39 |
|
40 | 40 | @trixi_testset "dam_break_2d" begin |
| 41 | + # Use `SerialUpdate()` to obtain consistent results when using multiple |
| 42 | + # threads and a shorter tspan to speed up CI tests. |
41 | 43 | @trixi_test_nowarn trixi_include(@__MODULE__, |
42 | 44 | joinpath(validation_dir(), "dam_break_2d", |
43 | | - "validation_dam_break_2d.jl")) [ |
| 45 | + "validation_dam_break_2d.jl"), |
| 46 | + update_strategy=SerialUpdate(), |
| 47 | + tspan=(0.0, 4 / sqrt(9.81 / 0.6))) [ |
44 | 48 | r"┌ Info: The desired tank length in y-direction.*\n", |
45 | | - r"└ New tank length in y-direction is set to.*\n" |
| 49 | + r"└ New tank length in y-direction is set to.*\n", |
| 50 | + r"WARNING: Method definition max_x_coord.*\n", |
| 51 | + r"WARNING: Method definition interpolated_pressure.*\n" |
46 | 52 | ] |
47 | 53 | @test sol.retcode == ReturnCode.Success |
48 | 54 | @test count_rhs_allocations(sol, semi) == 0 |
49 | 55 |
|
50 | 56 | if Sys.ARCH === :aarch64 |
51 | 57 | # MacOS ARM produces slightly different pressure values than x86. |
52 | 58 | # Note that pressure values are in the order of 1e5. |
53 | | - @test isapprox(error_edac_P1, 0, atol=5e-6) |
54 | | - @test isapprox(error_edac_P2, 0, atol=4e-11) |
55 | | - @test isapprox(error_wcsph_P1, 0, atol=400.0) |
56 | | - @test isapprox(error_wcsph_P2, 0, atol=0.03) |
| 59 | + @test isapprox(error_edac_P1, 0, atol=eps(1e5)) |
| 60 | + @test isapprox(error_edac_P2, 0, atol=eps(1e5)) |
| 61 | + @test isapprox(error_wcsph_P1, 0, atol=eps(1e5)) |
| 62 | + @test isapprox(error_wcsph_P2, 0, atol=eps(1e5)) |
57 | 63 | elseif VERSION < v"1.11" |
58 | | - # 1.10 produces slightly different pressure values than 1.11. |
59 | | - # This is most likely due to muladd and FMA instructions in the |
60 | | - # density diffusion update (inside the StaticArrays matrix-vector product). |
61 | | - # Note that pressure values are in the order of 1e5. |
62 | | - @test isapprox(error_edac_P1, 0, atol=eps()) |
63 | | - @test isapprox(error_edac_P2, 0, atol=eps()) |
64 | | - @test isapprox(error_wcsph_P1, 0, atol=8.0) |
65 | | - @test isapprox(error_wcsph_P2, 0, atol=5e-4) |
| 64 | + # 1.10 produces slightly different pressure values than 1.11 |
| 65 | + @test isapprox(error_edac_P1, 0, atol=eps(1e5)) |
| 66 | + @test isapprox(error_edac_P2, 0, atol=eps(1e5)) |
| 67 | + @test isapprox(error_wcsph_P1, 0, atol=eps(1e5)) |
| 68 | + @test isapprox(error_wcsph_P2, 0, atol=eps(1e5)) |
66 | 69 | else |
67 | | - # Reference values are computed with 1.11 |
68 | | - @test isapprox(error_edac_P1, 0, atol=5e-7) |
69 | | - @test isapprox(error_edac_P2, 0, atol=4e-11) |
| 70 | + # Reference values are computed with 1.11 on x86 |
70 | 71 | @test isapprox(error_wcsph_P1, 0, atol=eps()) |
71 | 72 | @test isapprox(error_wcsph_P2, 0, atol=eps()) |
| 73 | + # Why are these errors not zero? |
| 74 | + @test isapprox(error_edac_P1, 0, atol=eps(1e5)) |
| 75 | + @test isapprox(error_edac_P2, 0, atol=eps(1e5)) |
72 | 76 | end |
73 | 77 |
|
74 | 78 | # Ignore method redefinitions from duplicate `include("../validation_util.jl")` |
75 | 79 | @trixi_test_nowarn trixi_include(@__MODULE__, |
76 | 80 | joinpath(validation_dir(), "dam_break_2d", |
77 | | - "plot_dam_break_results.jl")) [ |
| 81 | + "plot_pressure_sensors.jl")) [ |
78 | 82 | r"WARNING: Method definition linear_interpolation.*\n", |
79 | 83 | r"WARNING: Method definition interpolated_mse.*\n", |
80 | | - r"WARNING: Method definition extract_number_from_filename.*\n", |
81 | | - r"WARNING: Method definition extract_resolution_from_filename.*\n" |
| 84 | + r"WARNING: Method definition extract_number_from_filename.*\n" |
| 85 | + ] |
| 86 | + # Verify number of plots |
| 87 | + @test length(axs_edac[1].scene.plots) >= 2 |
| 88 | + @test length(axs_wcsph[1].scene.plots) >= 2 |
| 89 | + |
| 90 | + # Ignore method redefinitions from duplicate `include("../validation_util.jl")` |
| 91 | + @trixi_test_nowarn trixi_include(@__MODULE__, |
| 92 | + joinpath(validation_dir(), "dam_break_2d", |
| 93 | + "plot_surge_front.jl")) [ |
| 94 | + r"WARNING: Method definition linear_interpolation.*\n", |
| 95 | + r"WARNING: Method definition interpolated_mse.*\n", |
| 96 | + r"WARNING: Method definition extract_number_from_filename.*\n" |
82 | 97 | ] |
83 | 98 | # Verify number of plots |
84 | 99 | @test length(axs_edac[1].scene.plots) >= 2 |
| 100 | + @test length(axs_wcsph[1].scene.plots) >= 2 |
85 | 101 | end |
86 | 102 |
|
87 | 103 | @trixi_testset "TGV_2D" begin |
|
0 commit comments