Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Jun 10, 2024
1 parent b95c314 commit c381844
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/equations/compressible_euler_quasi_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ end
@inline function entropy(u, equations::CompressibleEulerEquationsQuasi1D)
a_rho, a_rho_v1, a_e, a = u
return a * entropy(SVector(a_rho, a_rho_v1, a_e) / a,
CompressibleEulerEquations1D(equations.gamma))
CompressibleEulerEquations1D(equations.gamma))
end

# Convert conservative variables to entropy. The entropy variables for the
Expand Down
71 changes: 36 additions & 35 deletions test/test_tree_1d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")
l2=[
2.2527950196212703e-8,
1.8187357193835156e-8,
7.705669939973104e-8,
7.705669939973104e-8
],
linf=[
1.6205433861493646e-7,
1.465427772462391e-7,
5.372255111879554e-7,
5.372255111879554e-7
],
# With the default `maxiters = 1` in coverage tests,
# there would be no time series to check against.
Expand Down Expand Up @@ -52,12 +52,12 @@ end
l2=[
0.019355699748523896,
0.022326984561234497,
0.02523665947241734,
0.02523665947241734
],
linf=[
0.02895961127645519,
0.03293442484199227,
0.04246098278632804,
0.04246098278632804
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -74,12 +74,12 @@ end
l2=[
0.0011482554820217855,
0.00011482554830323462,
5.741277429325267e-6,
5.741277429325267e-6
],
linf=[
0.004090978306812376,
0.0004090978313582294,
2.045489210189544e-5,
2.045489210189544e-5
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -96,12 +96,12 @@ end
l2=[
7.71293052584723e-16,
1.9712947511091717e-14,
7.50672833504266e-15,
7.50672833504266e-15
],
linf=[
3.774758283725532e-15,
6.733502644351574e-14,
2.4868995751603507e-14,
2.4868995751603507e-14
],
initial_condition=initial_condition_constant)
# Ensure that we do not have excessive memory allocations
Expand All @@ -120,12 +120,12 @@ end
l2=[
3.8099996914101204e-6,
1.6745575717106341e-6,
7.732189531480852e-6,
7.732189531480852e-6
],
linf=[
1.2971473393186272e-5,
9.270328934274374e-6,
3.092514399671842e-5,
3.092514399671842e-5
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -142,12 +142,12 @@ end
l2=[
0.11821957357197649,
0.15330089521538678,
0.4417674632047301,
0.4417674632047301
],
linf=[
0.24280567569982958,
0.29130548795961936,
0.8847009003152442,
0.8847009003152442
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -164,12 +164,12 @@ end
l2=[
0.07803455838661963,
0.10032577312032283,
0.29228156303827935,
0.29228156303827935
],
linf=[
0.2549869853794955,
0.3376472164661263,
0.9650477546553962,
0.9650477546553962
],
maxiters=10,
surface_flux=flux_kennedy_gruber,
Expand All @@ -189,12 +189,12 @@ end
l2=[
0.07800654460172655,
0.10030365573277883,
0.2921481199111959,
0.2921481199111959
],
linf=[
0.25408579350400395,
0.3388657679031271,
0.9776486386921928,
0.9776486386921928
],
maxiters=10,
surface_flux=flux_shima_etal,
Expand All @@ -214,12 +214,12 @@ end
l2=[
0.07801923089205756,
0.10039557434912669,
0.2922210399923278,
0.2922210399923278
],
linf=[
0.2576521982607225,
0.3409717926625057,
0.9772961936567048,
0.9772961936567048
],
maxiters=10,
surface_flux=flux_chandrashekar,
Expand All @@ -240,7 +240,7 @@ end
linf=[
0.192621556068018,
0.25184744005299536,
0.7264977555504792,
0.7264977555504792
],
maxiters=10,
surface_flux=flux_hll,
Expand All @@ -260,12 +260,12 @@ end
l2=[
0.11606096465319675,
0.15028768943458806,
0.4328230323046703,
0.4328230323046703
],
linf=[
0.18031710091067965,
0.2351582421501841,
0.6776805692092567,
0.6776805692092567
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -283,7 +283,7 @@ end
linf=[
2.9766770877037168,
0.16838100902295852,
2.6655773445485798,
2.6655773445485798
],
coverage_override=(maxiters = 6,))
# Ensure that we do not have excessive memory allocations
Expand Down Expand Up @@ -319,7 +319,7 @@ end
linf=[
3.4296365168219216,
0.17635583964559245,
2.6574584326179505,
2.6574584326179505
],
# Let this test run longer to cover some lines in flux_hllc
coverage_override=(maxiters = 10^5, tspan = (0.0, 0.1)))
Expand All @@ -339,7 +339,7 @@ end
linf=[
3.1773015255764427,
0.21331831536493773,
2.6650170188241047,
2.6650170188241047
],
shock_indicator_variable=pressure,
cfl=0.2,
Expand All @@ -360,7 +360,7 @@ end
linf=[
3.1087017048015824,
0.17734706962928956,
2.666689753470263,
2.666689753470263
],
shock_indicator_variable=density,
cfl=0.2,
Expand Down Expand Up @@ -396,7 +396,7 @@ end
linf=[
1.5180897390290355,
1.3967085956620369,
2.0663825294019595,
2.0663825294019595
],
maxiters=30)
# Ensure that we do not have excessive memory allocations
Expand All @@ -413,24 +413,25 @@ end
a = 0.9
u_1D = SVector(1.1, 0.2, 2.1)
u_quasi_1D = SVector(a * 1.1, a * 0.2, a * 2.1, a)
@test entropy(u_quasi_1D, CompressibleEulerEquationsQuasi1D(1.4)) a * entropy(u_1D, CompressibleEulerEquations1D(1.4))
@test entropy(u_quasi_1D, CompressibleEulerEquationsQuasi1D(1.4))
a * entropy(u_1D, CompressibleEulerEquations1D(1.4))
end

@trixi_testset "elixir_euler_quasi_1d_source_terms.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_quasi_1d_source_terms.jl"),
l2=[
3.876288369618363e-7,
2.2247043122302947e-7,
2.964004224572679e-7,
5.2716983399807875e-8,
5.2716983399807875e-8
],
linf=[
2.3925118561862746e-6,
1.3603693522767912e-6,
1.821888865105592e-6,
1.1166012159335992e-7,
1.1166012159335992e-7
])

# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
let
Expand All @@ -448,13 +449,13 @@ end
0.045510421156346015,
0.036750584788912195,
0.2468985959132176,
0.03684494180829024,
0.03684494180829024
],
linf=[
0.3313374853025697,
0.11621933362158643,
1.827403013568638,
0.28045939999015723,
0.28045939999015723
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -472,13 +473,13 @@ end
0.08889113985713998,
0.16199235348889673,
0.40316524365054346,
2.9602775074723667e-16,
2.9602775074723667e-16
],
linf=[
0.28891355898284043,
0.3752709888964313,
0.84477102402413,
8.881784197001252e-16,
8.881784197001252e-16
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down

0 comments on commit c381844

Please sign in to comment.