Skip to content

Commit be58ba2

Browse files
Merge branch 'main' into tm/icosahedron_do_not_assume_earth_radius
2 parents 579eda2 + a36b7af commit be58ba2

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
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/test_2d_shallow_water_covariant.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ end
102102

103103
@trixi_testset "elixir_tri_barotropic_instability" begin
104104
@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)
105+
"elixir_tri_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))
111111
# Ensure that we do not have excessive memory allocations
112112
# (e.g., from type instabilities)
113113
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 100)

test/test_threaded.jl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,24 @@ 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, 2500)
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=[
40+
202.17195189961058,
41+
0.2046503536574818,
42+
0.14813768215260187
43+
],
44+
polydeg=3,
45+
initial_refinement_level=1,
46+
tspan=(0.0, 1.0 * SECONDS_PER_DAY))
47+
# Ensure that we do not have excessive memory allocations
48+
# (e.g., from type instabilities)
49+
@test_allocations(TrixiAtmo.Trixi.rhs!, semi, sol, 5000)
3350
end
3451
end
3552
end # module

0 commit comments

Comments
 (0)