Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/literate/src/files/shock_capturing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@
# ````
# Then, the limiter is added to the time integration method in the `solve` function. For instance, like
# ````julia
# CarpenterKennedy2N54(stage_limiter!, williamson_condition=false)
# CarpenterKennedy2N54(; stage_limiter!, williamson_condition=false)
# ````
# or
# ````julia
# SSPRK43(stage_limiter!).
# SSPRK43(; stage_limiter!).
# ````

# # Simulation with shock capturing and positivity preserving
Expand Down Expand Up @@ -229,7 +229,7 @@ callbacks = CallbackSet(analysis_callback, stepsize_callback);
stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-6),
variables = (Trixi.density, pressure))

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);

Expand Down Expand Up @@ -363,7 +363,7 @@ callbacks = CallbackSet(summary_callback,
stage_limiter! = EntropyBoundedLimiter()

# We run the simulation with the SSPRK33 method and the entropy bounded limiter:
sol = solve(ode, SSPRK33(stage_limiter!);
sol = solve(ode, SSPRK33(; stage_limiter!);
dt = 1.0,
callback = callbacks);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
###############################################################################
# Run the simulation

sol = solve(ode, SSPRK33(stage_limiter! = stage_limiter!, thread = Trixi.True());
sol = solve(ode, SSPRK33(; stage_limiter! = stage_limiter!, thread = Trixi.True());
dt = 1.6e-5, # Fixed timestep works decent here
ode_default_options()..., callback = callbacks);
2 changes: 1 addition & 1 deletion examples/p4est_2d_dgsem/elixir_euler_double_mach_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,5 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-

###############################################################################
# run the simulation
sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ volume_integral_blend_low_order = VolumeIntegralPureLGLFiniteVolumeO2(basis;
reconstruction_mode = reconstruction_O2_inner,
slope_limiter = minmod)

# This volume integral applies blended DG-FV shock capturing on the elements based on the shock indicator
# This volume integral applies blended DG-FV shock capturing on the elements based on the shock indicator
shock_indicator = IndicatorHennemannGassner(equations, basis,
alpha_max = 0.5, alpha_min = 5e-2,
alpha_smooth = true,
Expand Down Expand Up @@ -167,6 +167,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-

###############################################################################
# run the simulation
sol = solve(ode, SSPRK43(stage_limiter! = stage_limiter!, thread = Trixi.True());
sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True());
dt = 5e-7, # Reducing initial timestep allows AMR interval of 2 instead of 1
adaptive = true, ode_default_options()..., callback = callbacks);
2 changes: 1 addition & 1 deletion examples/p4est_2d_dgsem/elixir_euler_forward_step_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-

###############################################################################
# run the simulation
sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
maxiters = 999999, ode_default_options()...,
callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-7, 1.0e-

###############################################################################
# run the simulation
sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-7, 1.0e-
# We supply a small initial timestep to be able to use a larger AMR interval (3 instead of 1) throughout the simulation.
# This pays off almost immediately as only the first couple timesteps use this timestep before it is ramped up.
dt0 = 1e-8
sol = solve(ode, SSPRK43(stage_limiter! = stage_limiter!, thread = Trixi.True());
sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True());
adaptive = true, dt = dt0,
ode_default_options()..., callback = callbacks);
4 changes: 2 additions & 2 deletions examples/p4est_3d_dgsem/elixir_mhd_amr_entropy_bounded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ initial_condition = initial_condition_blast_wave
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxLaxFriedrichs(max_abs_speed_naive), flux_nonconservative_powell)
volume_flux = (flux_hindenlang_gassner, flux_nonconservative_powell)
Expand Down Expand Up @@ -129,6 +129,6 @@ stage_limiter! = EntropyBoundedLimiter(exp_entropy_decrease_max = -5e-3)
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (1.0e-4, 1.0e-
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ stage_limiter! = EntropyBoundedLimiter()
###############################################################################
# run the simulation

sol = solve(ode, SSPRK33(stage_limiter!);
sol = solve(ode, SSPRK33(; stage_limiter!);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()...,
callback = callbacks);
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_euler_modified_sod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ callbacks = CallbackSet(summary_callback,
stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-6),
variables = (Trixi.density, pressure))

ode_alg = SSPRK43(stage_limiter! = stage_limiter!)
ode_alg = SSPRK43(; stage_limiter! = stage_limiter!)
=#
# Flux-differencing volume integral does not require positivity preservation for this test case.
ode_alg = SSPRK43()
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_euler_positivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ callbacks = CallbackSet(summary_callback,
stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6,),
variables = (pressure,))

sol = solve(ode, SSPRK54(stage_limiter! = stage_limiter!);
sol = solve(ode, SSPRK54(; stage_limiter! = stage_limiter!);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
3 changes: 2 additions & 1 deletion examples/tree_2d_dgsem/elixir_advection_callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ example_stage_callback! = TrixiExtensionExample.ExampleStageCallback()
# run the simulation

sol = solve(ode,
CarpenterKennedy2N54(example_stage_callback!, williamson_condition = false);
CarpenterKennedy2N54(; stage_limiter! = example_stage_callback!,
williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);

Expand Down
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_euler_astro_jet_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
###############################################################################
# run the simulation
# use adaptive time stepping based on error estimates, time step roughly dt = 1e-7
sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
ode_default_options()..., callback = callbacks);
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
# run the simulation

# use adaptive time stepping based on error estimates
sol = solve(ode, SSPRK43(stage_limiter! = stage_limiter!, thread = Trixi.True());
sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True());
controller = PIDController(0.55, -0.27, 0.05),
ode_default_options()..., callback = callbacks);
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_euler_colliding_flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
###############################################################################
# run the simulation
# use adaptive time stepping based on error estimates, time step roughly dt = 5e-3
sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
ode_default_options()..., callback = callbacks);
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ stage_limiter! = EntropyBoundedLimiter(exp_entropy_decrease_max = -1.3e-4)
###############################################################################
# run the simulation

sol = solve(ode, SSPRK43(stage_limiter!);
sol = solve(ode, SSPRK43(; stage_limiter!);
dt = 1e-2, ode_default_options()..., adaptive = true,
callback = callbacks);
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_euler_positivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e-
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
2 changes: 1 addition & 1 deletion examples/tree_3d_dgsem/elixir_euler_blob_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (1.0e-4, 1.0e-
###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(stage_limiter!, williamson_condition = false);
sol = solve(ode, CarpenterKennedy2N54(; stage_limiter!, williamson_condition = false);
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback
ode_default_options()..., callback = callbacks);
Loading