-
Notifications
You must be signed in to change notification settings - Fork 151
Add Legendre-Gauss basis for DGSEM and implement solver support for 1D/2D TreeMesh
#1965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
82ac094
Add Legendre-Gauss basis for DGSEM and implement solver support for 2…
sloede 043e1f1
Small updates
sloede 7ff6d01
Format
sloede 8a11896
Merge branch 'main' into msl/legendre-gauss-basis
sloede a1bae4c
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring faf5f77
Apply suggestions from code review
DanielDoehring 35a85e8
Apply suggestions from code review
DanielDoehring 168b32a
Update examples/tree_2d_dgsem/elixir_euler_convergence_gauss.jl
DanielDoehring 885a3d5
Update src/solvers/dgsem_tree/dg_2d.jl
DanielDoehring 9ab28df
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring f8f7622
shorten
DanielDoehring b09f410
up
DanielDoehring aee88c5
optimizations
DanielDoehring e7cd768
rev
DanielDoehring 482c26d
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring 54b0e87
test
DanielDoehring 46a7846
Merge branch 'msl/legendre-gauss-basis' of https://github.com/trixi-f…
DanielDoehring 45807fe
1D
DanielDoehring 0afdd32
test
DanielDoehring b8b72b1
elaborate
DanielDoehring 815c424
Apply suggestions from code review
DanielDoehring 5c69b66
Update src/solvers/dgsem/basis_gauss_legendre.jl
JoshuaLampert 400893b
ft gen
DanielDoehring d731d20
move, realt
DanielDoehring 2c76600
adapt
DanielDoehring 43aa4ae
Update src/solvers/dgsem/basis_gauss_legendre.jl
DanielDoehring d6f34d0
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring e68f365
rm
DanielDoehring 1c36a25
typo
DanielDoehring cc69a4b
commet
DanielDoehring 45bb50e
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring 88ac730
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,42 @@ | ||
| using OrdinaryDiffEqLowStorageRK | ||
| using Trixi | ||
|
|
||
| ############################################################################### | ||
| # semidiscretization of the linear advection equation | ||
|
|
||
| advection_velocity = 1.0 | ||
| equations = LinearScalarAdvectionEquation1D(advection_velocity) | ||
|
|
||
| basis = GaussLegendreBasis(3) | ||
| solver = DGSEM(basis, flux_godunov) | ||
|
|
||
| coordinates_min = -1.0 | ||
| coordinates_max = 1.0 | ||
|
|
||
| mesh = TreeMesh(coordinates_min, coordinates_max, | ||
| initial_refinement_level = 4, | ||
| n_cells_max = 30_000, periodicity = true) | ||
|
|
||
| semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test, | ||
| solver; | ||
| boundary_conditions = boundary_condition_periodic) | ||
|
|
||
| ############################################################################### | ||
| # ODE solvers, callbacks etc. | ||
|
|
||
| ode = semidiscretize(semi, (0.0, 1.0)) | ||
|
|
||
| summary_callback = SummaryCallback() | ||
|
|
||
| analysis_callback = AnalysisCallback(semi, interval = 100) | ||
|
|
||
| stepsize_callback = StepsizeCallback(cfl = 0.8) | ||
|
|
||
| callbacks = CallbackSet(summary_callback, analysis_callback, | ||
| stepsize_callback) | ||
|
|
||
| ############################################################################### | ||
| # run the simulation | ||
|
|
||
| sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false); dt = 1.0, | ||
| ode_default_options()..., callback = callbacks); |
This file contains hidden or 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,52 @@ | ||
| using OrdinaryDiffEqLowStorageRK | ||
| using Trixi | ||
|
|
||
| ############################################################################### | ||
| # semidiscretization of the compressible Euler equations | ||
|
|
||
| equations = CompressibleEulerEquations2D(1.4) | ||
|
|
||
| initial_condition = initial_condition_convergence_test | ||
|
|
||
| surface_flux = flux_lax_friedrichs | ||
|
|
||
| polydeg = 3 | ||
| basis = GaussLegendreBasis(polydeg) | ||
| solver = DGSEM(polydeg = 3, basis = basis, surface_flux = surface_flux) | ||
|
|
||
| coordinates_min = (0.0, 0.0) | ||
| coordinates_max = (2.0, 2.0) | ||
| mesh = TreeMesh(coordinates_min, coordinates_max, | ||
| initial_refinement_level = 2, | ||
| n_cells_max = 100_000, | ||
| periodicity = true) | ||
|
|
||
| semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver, | ||
| source_terms = source_terms_convergence_test; | ||
| boundary_conditions = boundary_condition_periodic) | ||
|
|
||
| ############################################################################### | ||
| # ODE solvers, callbacks etc. | ||
|
|
||
| tspan = (0.0, 2.0) | ||
| ode = semidiscretize(semi, tspan) | ||
|
|
||
| summary_callback = SummaryCallback() | ||
|
|
||
| analysis_interval = 1000 | ||
| analysis_callback = AnalysisCallback(semi, interval = analysis_interval) | ||
|
|
||
| alive_callback = AliveCallback(analysis_interval = analysis_interval) | ||
|
|
||
| stepsize_callback = StepsizeCallback(cfl = 0.9) | ||
|
|
||
| callbacks = CallbackSet(summary_callback, | ||
| analysis_callback, alive_callback, | ||
| stepsize_callback) | ||
|
|
||
| ############################################################################### | ||
| # run the simulation | ||
|
|
||
| sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false), | ||
| dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback | ||
| save_everystep = false, callback = callbacks); |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a uniform naming pattern - either
_gaussor_gauss_legendre, please?