Skip to content

Commit

Permalink
Use local limiting in free stream elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed May 15, 2024
1 parent 2ddd78a commit 98c2144
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ volume_flux = flux_ranocha
polydeg = 3
basis = LobattoLegendreBasis(polydeg)
limiter_idp = SubcellLimiterIDP(equations, basis;
positivity_variables_cons = ["rho"],
positivity_variables_nonlinear = [pressure])
local_twosided_variables_cons = ["rho"],
local_onesided_variables_nonlinear = [(Trixi.entropy_guermond_etal,
min)])

volume_integral = VolumeIntegralSubcellLimiting(limiter_idp;
volume_flux_dg = volume_flux,
Expand Down Expand Up @@ -61,12 +62,12 @@ analysis_callback = AnalysisCallback(semi, interval = analysis_interval)

alive_callback = AliveCallback(analysis_interval = analysis_interval)

save_solution = SaveSolutionCallback(interval = 10000,
save_solution = SaveSolutionCallback(interval = 100,
save_initial_solution = true,
save_final_solution = true,
solution_variables = cons2prim)

stepsize_callback = StepsizeCallback(cfl = 0.9)
stepsize_callback = StepsizeCallback(cfl = 0.7)

callbacks = CallbackSet(summary_callback,
analysis_callback, alive_callback,
Expand Down
16 changes: 8 additions & 8 deletions test/test_structured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -556,16 +556,16 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_euler_free_stream_sc_subcell.jl"),
l2=[
1.4663777294625118e-15,
2.320054900530864e-14,
3.487555722563465e-14,
2.008802099296406e-14,
2.5709100186298863e-16,
2.184017068634721e-15,
2.1781991538183746e-15,
4.935868571076398e-15,
],
linf=[
2.3092638912203256e-14,
2.0623780461193064e-13,
2.6795232699328153e-13,
2.362554596402333e-13,
4.218847493575595e-15,
2.7602919949742954e-14,
3.533284775869561e-14,
5.861977570020827e-14,
],
atol=7.0e-13)
# Ensure that we do not have excessive memory allocations
Expand Down

0 comments on commit 98c2144

Please sign in to comment.