Skip to content

Commit e998c8e

Browse files
fix tests
1 parent 8442f68 commit e998c8e

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

src/solvers/dgmulti/dg_manifold_covariant.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@ function Trixi.calc_interface_flux!(cache, surface_integral::SurfaceIntegralWeak
9797
uP = u_face_values[idP]
9898
auxM = aux_face_values[idM]
9999
auxP = aux_face_values[idP]
100+
100101
# Transform uP to the same coordinate system as uM
101102
uP_global = contravariant2global(uP, auxP, equations)
102103
uP_transformed_to_M = global2contravariant(uP_global, auxM, equations)
103104

104105
# Compute ref_index from face_node_index in order to access covariant normal vector
105106
# in reference element coordinates.
106107
ref_index = mod(face_node_index - 1, Nfq) + 1
107-
normal = SVector(ntuple(k -> nrstJ[k][ref_index], NDIMS))
108+
normal = SVector{NDIMS}(getindex.(nrstJ, ref_index))
108109

109110
flux_face_values[idM] = surface_flux(uM, uP_transformed_to_M, auxM, auxM, normal,
110111
equations)

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d"
66
OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
77
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
88
Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
9+
TrixiAtmo = "c9ed1054-d170-44a9-8ee2-d5566f5d1389"
910
TrixiTest = "0a316866-cbd0-4425-8bcb-08103b2c1f26"
1011

1112
[compat]

test/test_2d_shallow_water_covariant.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,4 @@ end
100100
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 100)
101101
end
102102

103-
@trixi_testset "elixir_tri_barotropic_instability" begin
104-
@test_trixi_include(joinpath(EXAMPLES_DIR,
105-
"elixir_barotropic_instability.jl"),
106-
l2=[41.05018196765347, 0.04598801953369521, 0.03324228006147076],
107-
linf=[202.17195189961058, 0.2046503536574818, 0.14813768215260187]),
108-
polydeg = 3,
109-
initial_refinement_level = 1,
110-
tspan = (0.0, 1.0 * SECONDS_PER_DAY)
111-
# Ensure that we do not have excessive memory allocations
112-
# (e.g., from type instabilities)
113-
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 100)
114-
end
115-
116103
end # module

test/test_threaded.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,20 @@ include("test_trixiatmo.jl")
2929
tspan=(0.0, 0.1))
3030
# Ensure that we do not have excessive memory allocations
3131
# (e.g., from type instabilities)
32-
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 2000)
32+
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 5000)
33+
end
34+
35+
@trixi_testset "elixir_tri_barotropic_instability threaded" begin
36+
@test_trixi_include(abspath(joinpath(EXAMPLES_DIR, "shallow_water/covariant",
37+
"elixir_tri_barotropic_instability.jl")),
38+
l2=[41.05018196765347, 0.04598801953369521, 0.03324228006147076],
39+
linf=[202.17195189961058, 0.2046503536574818, 0.14813768215260187],
40+
polydeg=3,
41+
initial_refinement_level=1,
42+
tspan=(0.0, 1.0 * SECONDS_PER_DAY))
43+
# Ensure that we do not have excessive memory allocations
44+
# (e.g., from type instabilities)
45+
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 5000)
3346
end
3447
end
3548
end # module

0 commit comments

Comments
 (0)