Skip to content

Commit

Permalink
exchange some min_max_speed_naive for min_max_speed_davis for some ex…
Browse files Browse the repository at this point in the history
…amples
  • Loading branch information
DanielDoehring committed Nov 20, 2023
1 parent 0f06786 commit 83a8270
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 76 deletions.
2 changes: 1 addition & 1 deletion examples/dgmulti_1d/elixir_euler_fdsbp_periodic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dg = DGMulti(element_type = Line(),
accuracy_order = 4,
xmin = 0.0, xmax = 1.0,
N = 50),
surface_flux = FluxHLL(min_max_speed_naive),
surface_flux = flux_hll,
volume_integral = VolumeIntegralWeakForm())

equations = CompressibleEulerEquations1D(1.4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ end

# numerical parameters
dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = Polynomial(),
surface_integral = SurfaceIntegralWeakForm(FluxHLL(min_max_speed_naive)),
surface_integral = SurfaceIntegralWeakForm(flux_hll),
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))

num_elements = 16
Expand Down
6 changes: 4 additions & 2 deletions examples/dgmulti_3d/elixir_euler_curved.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

using Trixi, OrdinaryDiffEq

dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = SBP(),
surface_integral = SurfaceIntegralWeakForm(FluxHLL(min_max_speed_naive)),
dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = GaussSBP(),
surface_integral = SurfaceIntegralWeakForm(flux_hll),
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))

equations = CompressibleEulerEquations3D(1.4)
Expand Down Expand Up @@ -46,3 +46,5 @@ callbacks = CallbackSet(summary_callback, alive_callback, analysis_callback)
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 0.5 * estimate_dt(mesh, dg), save_everystep = false, callback = callbacks);
summary_callback() # print the timer summary

analysis_callback(sol)
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ end

# numerical parameters
volume_flux = flux_ranocha
solver = DGSEM(polydeg = 3, surface_flux = FluxHLL(min_max_speed_naive),
solver = DGSEM(polydeg = 3, surface_flux = flux_hll,
volume_integral = VolumeIntegralFluxDifferencing(volume_flux))

# The domain is [0, 0.25] x [0, 1]
mapping(xi, eta) = SVector(0.25 * 0.5 * (1.0 + xi), 0.5 * (1.0 + eta))

num_elements_per_dimension = 32
cells_per_dimension = (num_elements_per_dimension, num_elements_per_dimension * 4)
cells_per_dimension = (8, 8)
mesh = StructuredMesh(cells_per_dimension, mapping)

initial_condition = initial_condition_rayleigh_taylor_instability
Expand All @@ -92,7 +92,7 @@ semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver;
###############################################################################
# ODE solvers, callbacks etc.

tspan = (0.0, 1.65)
tspan = (0.0, 0.3)
ode = semidiscretize(semi, tspan)

summary_callback = SummaryCallback()
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_eulergravity_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ equations_euler = CompressibleEulerEquations1D(gamma)
initial_condition = initial_condition_eoc_test_coupled_euler_gravity

polydeg = 3
solver_euler = DGSEM(polydeg, FluxHLL(min_max_speed_naive))
solver_euler = DGSEM(polydeg, flux_hll)

coordinates_min = 0.0
coordinates_max = 2.0
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_3d_dgsem/elixir_euler_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ equations = CompressibleEulerEquations3D(2.0)

initial_condition = initial_condition_eoc_test_coupled_euler_gravity

solver = DGSEM(polydeg = 3, surface_flux = FluxHLL(min_max_speed_naive),
solver = DGSEM(polydeg = 3, surface_flux = flux_hll,
volume_integral = VolumeIntegralWeakForm())

coordinates_min = (0.0, 0.0, 0.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/unstructured_2d_dgsem/elixir_euler_free_stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ boundary_conditions = Dict(:Body => boundary_condition_free_stream,
###############################################################################
# Get the DG approximation space

solver = DGSEM(polydeg = 6, surface_flux = FluxHLL(min_max_speed_naive))
solver = DGSEM(polydeg = 6, surface_flux = flux_hll)

###############################################################################
# Get the curved quad mesh from a file (downloads the file if not available locally)
Expand Down
8 changes: 2 additions & 6 deletions test/test_dgmulti_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,10 @@ end
@trixi_testset "elixir_euler_fdsbp_periodic.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_fdsbp_periodic.jl"),
l2=[
9.146929180585711e-7,
1.8997616878017292e-6,
3.991417702211889e-6,
9.146929178341782e-7, 1.8997616876521201e-6, 3.991417701005622e-6
],
linf=[
1.7321089884614338e-6,
3.3252888855805907e-6,
6.5252787737613005e-6,
1.7321089882393892e-6, 3.3252888869128583e-6, 6.525278767988141e-6
])
show(stdout, semi.solver.basis)
show(stdout, MIME"text/plain"(), semi.solver.basis)
Expand Down
10 changes: 2 additions & 8 deletions test/test_dgmulti_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -435,16 +435,10 @@ end
"elixir_euler_rayleigh_taylor_instability.jl"),
cells_per_dimension=(8, 8), tspan=(0.0, 0.2),
l2=[
0.0709665896982514,
0.005182828752164663,
0.013832655585206478,
0.03247013800580221,
0.07097806723891838, 0.005168550941966817, 0.013820912272220933, 0.03243357220022434
],
linf=[
0.4783963902824797,
0.022527207050681054,
0.040307056293369226,
0.0852365428206836,
0.4783395896753895, 0.02244629340135818, 0.04023357731088538, 0.08515807256615027
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
24 changes: 4 additions & 20 deletions test/test_dgmulti_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,10 @@ end
@trixi_testset "elixir_euler_curved.jl (Hex elements, SBP, flux differencing)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_curved.jl"),
l2=[
0.018354883045936066,
0.024412704052042846,
0.024408520416087945,
0.01816314570880129,
0.039342805507972006,
0.01835488304593566, 0.024412704052042534, 0.02440852041608929, 0.018163145708800853, 0.03934280550797125
],
linf=[
0.14862225990775757,
0.28952368161864683,
0.2912054484817035,
0.1456603133854122,
0.3315354586775472,
0.14862225990793032, 0.2895236816183626, 0.291205448481636, 0.14566031338563246, 0.33153545867790246
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -129,18 +121,10 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_curved.jl"),
approximation_type=GaussSBP(),
l2=[
0.002631131519508634,
0.0029144224044954105,
0.002913889110662827,
0.002615140832314194,
0.006881528610614373,
0.0026311315195097097, 0.002914422404496567, 0.0029138891106640368, 0.002615140832315232, 0.006881528610616624
],
linf=[
0.020996114874140215,
0.021314522450134543,
0.021288322783006297,
0.020273381695435244,
0.052598740390024545,
0.02099611487415931, 0.021314522450152307, 0.021288322783027613, 0.020273381695449455, 0.05259874039006007
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
10 changes: 2 additions & 8 deletions test/test_structured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -562,16 +562,10 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_euler_rayleigh_taylor_instability.jl"),
l2=[
0.06365630381017849,
0.007166887387738937,
0.002878708825497772,
0.010247678114070121,
0.06365630515019809, 0.007166887172039836, 0.0028787103533600804, 0.010247678008197966
],
linf=[
0.4799214336153155,
0.024595483032220266,
0.02059808120543466,
0.03190756362943725,
0.47992143569849377, 0.02459548251933757, 0.02059810091623976, 0.0319077000843877
],
cells_per_dimension=(8, 8),
tspan=(0.0, 0.3))
Expand Down
8 changes: 2 additions & 6 deletions test/test_tree_1d_eulergravity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")
@trixi_testset "elixir_eulergravity_convergence.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_eulergravity_convergence.jl"),
l2=[
0.0002170799126638106,
0.0002913792848717502,
0.0006112320856262327,
0.00021708496949694728, 0.0002913795242132917, 0.0006112500956552259
],
linf=[
0.0004977401033188222,
0.0013594223337776157,
0.002041891084400227,
0.0004977733237385706, 0.0013594226727522418, 0.0020418739554664
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
12 changes: 2 additions & 10 deletions test/test_tree_3d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ end
@trixi_testset "elixir_euler_convergence.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_convergence.jl"),
l2=[
0.0003637241020254405,
0.0003955570866382718,
0.0003955570866383613,
0.00039555708663834417,
0.0007811613481640202,
0.0003637241020254673, 0.00039555708663848046, 0.00039555708663832644, 0.0003955570866385083, 0.0007811613481643962
],
linf=[
0.0024000660244674066,
0.0029635410025339315,
0.0029635410025292686,
0.002963541002525938,
0.007191437359396424,
0.0024000660244567484, 0.002963541002521053, 0.0029635410025201647, 0.002963541002522385, 0.007191437359379549
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
10 changes: 2 additions & 8 deletions test/test_unstructured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,10 @@ end
@trixi_testset "elixir_euler_free_stream.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_free_stream.jl"),
l2=[
3.3937971107485363e-14,
2.447586447887882e-13,
1.4585205789296455e-13,
4.716993468962946e-13,
3.3937365073416665e-14, 2.44759188939065e-13, 1.4585198700082895e-13, 4.716940764877479e-13
],
linf=[
8.804734719092266e-12,
6.261270668606045e-11,
2.93670088247211e-11,
1.205400224080222e-10,
8.804956763697191e-12, 6.261199891888225e-11, 2.936639820205755e-11, 1.20543575121701e-10
],
tspan=(0.0, 0.1),
atol=3.0e-13)
Expand Down

0 comments on commit 83a8270

Please sign in to comment.