-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into subcell-limiting-entropies
- Loading branch information
Showing
6 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Trixi" | ||
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" | ||
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor Gassner <[email protected]>", "Hendrik Ranocha <[email protected]>", "Andrew R. Winters <[email protected]>", "Jesse Chan <[email protected]>"] | ||
version = "0.7.11-pre" | ||
version = "0.7.12-pre" | ||
|
||
[deps] | ||
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" | ||
|
68 changes: 68 additions & 0 deletions
68
examples/dgmulti_1d/elixir_burgers_gauss_shock_capturing.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using Trixi | ||
using OrdinaryDiffEq | ||
|
||
equations = InviscidBurgersEquation1D() | ||
|
||
############################################################################### | ||
# setup the GSBP DG discretization that uses the Gauss operators from | ||
# Chan, Del Rey Fernandez, Carpenter (2019). | ||
# [https://doi.org/10.1137/18M1209234](https://doi.org/10.1137/18M1209234) | ||
|
||
surface_flux = flux_lax_friedrichs | ||
volume_flux = flux_ec | ||
|
||
polydeg = 3 | ||
basis = DGMultiBasis(Line(), polydeg, approximation_type = GaussSBP()) | ||
|
||
indicator_sc = IndicatorHennemannGassner(equations, basis, | ||
alpha_max = 0.5, | ||
alpha_min = 0.001, | ||
alpha_smooth = true, | ||
variable = first) | ||
volume_integral = VolumeIntegralShockCapturingHG(indicator_sc; | ||
volume_flux_dg = volume_flux, | ||
volume_flux_fv = surface_flux) | ||
|
||
dg = DGMulti(basis, | ||
surface_integral = SurfaceIntegralWeakForm(surface_flux), | ||
volume_integral = volume_integral) | ||
|
||
############################################################################### | ||
# setup the 1D mesh | ||
|
||
cells_per_dimension = (32,) | ||
mesh = DGMultiMesh(dg, cells_per_dimension, | ||
coordinates_min = (-1.0,), coordinates_max = (1.0,), | ||
periodicity = true) | ||
|
||
############################################################################### | ||
# setup the semidiscretization and ODE problem | ||
|
||
semi = SemidiscretizationHyperbolic(mesh, | ||
equations, | ||
initial_condition_convergence_test, | ||
dg) | ||
|
||
tspan = (0.0, 2.0) | ||
ode = semidiscretize(semi, tspan) | ||
|
||
############################################################################### | ||
# setup the callbacks | ||
|
||
# prints a summary of the simulation setup and resets the timers | ||
summary_callback = SummaryCallback() | ||
|
||
# analyse the solution in regular intervals and prints the results | ||
analysis_callback = AnalysisCallback(semi, interval = 100, uEltype = real(dg)) | ||
|
||
# handles the re-calculation of the maximum Δt after each time step | ||
stepsize_callback = StepsizeCallback(cfl = 0.5) | ||
|
||
# collect all callbacks such that they can be passed to the ODE solver | ||
callbacks = CallbackSet(summary_callback, analysis_callback, stepsize_callback) | ||
|
||
# ############################################################################### | ||
# # run the simulation | ||
|
||
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false), | ||
dt = 1.0, save_everystep = false, callback = callbacks); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters