Skip to content

Commit a7293cc

Browse files
update tests
1 parent da1a22a commit a7293cc

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_covariant.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ function calc_metric_covariant(v1, v2, v3, v4, xi1, xi2, radius, equations)
321321
return SVector(Gcov[1, 1], Gcov[1, 2], Gcov[2, 2])
322322
end
323323

324-
# Calculate the Christoffel symbols of the second kind using ForwardDiff to automatically
325-
# differentiate the metric, and return the components Γ¹₁₁, Γ¹₁₂ (= Γ¹₂₁), Γ¹₂₂, Γ²₁₁,
326-
# Γ²₁₂ (= Γ²₂₁), and Γ²₂₂ as an SVector of length 6
324+
# Calculate the Christoffel symbols of the second kind using ForwardDiff.jl to
325+
# automatically differentiate the metric, and return the components
326+
# Γ¹₁₁, Γ¹₁₂ (= Γ¹₂₁), Γ¹₂₂, Γ²₁₁, Γ²₁₂ (= Γ²₂₁), and Γ²₂₂ as an SVector of length 6
327327
function calc_christoffel_symbols(v1, v2, v3, v4, xi1, xi2, radius, Gcon, equations)
328328

329329
# Use ForwardDiff to differentiate the covariant metric tensor components

test/test_2d_shallow_water_covariant.jl

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ EXAMPLES_DIR = TrixiAtmo.examples_dir()
1111
@test_trixi_include(joinpath(EXAMPLES_DIR,
1212
"elixir_shallowwater_covariant_geostrophic_balance.jl"),
1313
l2=[
14-
0.27823189465180176,
15-
0.00021164119121947655,
16-
8.588414721470682e-5
14+
0.2782318946518096,
15+
0.00021164119121947804,
16+
8.588414721470694e-5
1717
],
1818
linf=[
19-
1.4786544678290738,
20-
0.001375460003351342,
21-
0.0007564014737142868
19+
1.818810315677183,
20+
0.0011402373824409423,
21+
0.0010284231183849968
2222
],
2323
polydeg=3,
2424
cells_per_dimension=(5, 5),
@@ -36,8 +36,8 @@ end
3636
@trixiatmo_testset "elixir_shallowwater_covariant_rossby_haurwitz" begin
3737
@test_trixi_include(joinpath(EXAMPLES_DIR,
3838
"elixir_shallowwater_covariant_rossby_haurwitz.jl"),
39-
l2=[265.981826097756, 0.17644364627357367, 0.25356217267195796],
40-
linf=[574.6725801771408, 0.5155385127558587, 0.549704048104133],
39+
l2=[265.98095267805803, 0.1764452313672691, 0.25356292962842114],
40+
linf=[574.6708171274768, 0.5155477330239119, 0.5497352934063009],
4141
polydeg=3,
4242
cells_per_dimension=(5, 5),
4343
tspan=(0.0, 1.0 * SECONDS_PER_DAY))
@@ -54,8 +54,8 @@ end
5454
@trixiatmo_testset "elixir_shallowwater_covariant_isolated_mountain" begin
5555
@test_trixi_include(joinpath(EXAMPLES_DIR,
5656
"elixir_shallowwater_covariant_isolated_mountain.jl"),
57-
l2=[13.188835117913722, 0.005698389870463649, 0.007624148100358777],
58-
linf=[116.64112009453402, 0.05208844726941367, 0.07855581195821103],
57+
l2=[13.18894432799001, 0.005698447961168719, 0.007624217062402512],
58+
linf=[116.645494528163, 0.052086295524203324, 0.07855675891709994],
5959
polydeg=3,
6060
cells_per_dimension=(5, 5),
6161
tspan=(0.0, 1.0 * SECONDS_PER_DAY))
@@ -73,14 +73,13 @@ end
7373
@test_trixi_include(joinpath(EXAMPLES_DIR,
7474
"elixir_shallowwater_covariant_unsteady_solid_body_rotation_EC.jl"),
7575
l2=[
76-
0.25498720877863845,
77-
0.0002689081664431078,
78-
0.00015718255978420539
76+
0.25500246412246835,
77+
0.0002703652960705074,
78+
0.0001650991084937778
7979
],
80-
linf=[
81-
2.135538516899487,
82-
0.0013076854064064114,
83-
0.0013246467546383922
80+
linf=[2.11951898785469,
81+
0.0013109661149978136,
82+
0.001328788247668855
8483
], # For coverage, test with central flux here instead of usual EC
8584
volume_flux=(flux_central, flux_nonconservative_ec),
8685
surface_flux=(flux_lax_friedrichs, flux_nonconservative_ec),
@@ -100,8 +99,8 @@ end
10099
@trixiatmo_testset "elixir_shallowwater_covariant_barotropic_instability" begin
101100
@test_trixi_include(joinpath(EXAMPLES_DIR,
102101
"elixir_shallowwater_covariant_barotropic_instability.jl"),
103-
l2=[21.085349167645717, 0.030059547976114206, 0.023419991986079282],
104-
linf=[122.97647708776276, 0.17997838634063137, 0.16658465951310109],
102+
l2=[21.08826693663232, 0.03006187671520436, 0.023421745045307123],
103+
linf=[122.9994523425994, 0.17997299389835533, 0.16659612583251238],
105104
polydeg=3,
106105
cells_per_dimension=(5, 5),
107106
tspan=(0.0, 1.0 * SECONDS_PER_DAY))

0 commit comments

Comments
 (0)