-
Notifications
You must be signed in to change notification settings - Fork 151
Gauss-Legendre DGSEM Solver: 2D P4estMesh periodic
#2847
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
ranocha
merged 66 commits into
trixi-framework:main
from
DanielDoehring:GL_P4est2D_Periodic
Apr 9, 2026
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
cde9904
Start
DanielDoehring ad69308
Revert "Start"
DanielDoehring 8baf170
Start
DanielDoehring a20bdb2
test
DanielDoehring 9a8fc4d
fmt
DanielDoehring 4c40546
restrict
DanielDoehring 9deee47
typo
DanielDoehring bbad434
Merge branch 'main' into GL_P4est2D_Periodic
ranocha 54e40b5
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 15da164
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 94570f5
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 883d999
pre-comp
DanielDoehring 89efbbe
optimize
DanielDoehring 1e9284d
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 734b221
Interface normal directions
DanielDoehring f17dcd3
example
DanielDoehring d69e570
comment
DanielDoehring 63eb696
3d dummy version
DanielDoehring 4672a79
typo
DanielDoehring 920037b
fix
DanielDoehring 2b797a4
comment
DanielDoehring 5e67e89
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 9cce03b
rev
DanielDoehring 6ba5bc7
db
DanielDoehring 4a36ed9
rev
DanielDoehring 7e63a5a
comment
DanielDoehring c9ff85f
fmt
DanielDoehring 602a8ba
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 5f79f2e
other version t8coe
DanielDoehring 825872d
inc
DanielDoehring b22dfe7
Merge branch 'GL_P4est2D_Periodic' of github.com:DanielDoehring/Trixi…
DanielDoehring 4f288c8
Merge branch 'main' into GL_P4est2D_Periodic
ranocha 022244d
restore
DanielDoehring 2c82916
fix
DanielDoehring da16a96
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring bbf38c4
check if function is trixi atmo compatible
DanielDoehring ed1473e
restore
DanielDoehring 19690e0
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring fb71bee
comments
DanielDoehring 5e3c2e3
unions
DanielDoehring 3f81bdf
order yp eparams
DanielDoehring 596854b
db
DanielDoehring 0e0104f
typo
DanielDoehring bd670cd
lift
DanielDoehring 3263c11
rev
DanielDoehring c304077
ac
DanielDoehring 5fff783
rm
DanielDoehring dab10d9
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring b141982
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 084a539
Merge branch 'GL_P4est2D_Periodic' of github.com:DanielDoehring/Trixi…
DanielDoehring 9d598b1
adapt
DanielDoehring a39aa9b
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 3c54c19
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 7047203
adapt
DanielDoehring 96ff9fa
cont
DanielDoehring 69d898c
modularize
DanielDoehring d5e7b49
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 6c80410
Update examples/p4est_2d_dgsem/elixir_advection_flag_gauss_legendre.jl
DanielDoehring bc2f70c
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 7f96827
Merge branch 'main' into GL_P4est2D_Periodic
DanielDoehring 2d57922
Merge branch 'main' into GL_P4est2D_Periodic
ranocha 4fe7262
Update src/solvers/dgsem_p4est/containers_2d.jl
DanielDoehring e2c0029
rev
DanielDoehring ad35542
rm
DanielDoehring 4608071
Update examples/p4est_2d_dgsem/elixir_advection_flag_gauss_legendre.jl
DanielDoehring 40acf2b
test
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
49 changes: 49 additions & 0 deletions
49
examples/p4est_2d_dgsem/elixir_advection_flag_gauss_legendre.jl
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,49 @@ | ||
| using OrdinaryDiffEqLowStorageRK | ||
| using Trixi | ||
|
|
||
| ############################################################################### | ||
| # semidiscretization of the linear advection equation | ||
|
|
||
| advection_velocity = (0.2, -0.7) | ||
| equations = LinearScalarAdvectionEquation2D(advection_velocity) | ||
|
|
||
| solver = DGSEM(polydeg = 4, surface_flux = flux_lax_friedrichs, | ||
| basis_type = GaussLegendreBasis) | ||
|
|
||
| # Deformed rectangle that looks like a waving flag, | ||
| # lower and upper faces are sinus curves, left and right are vertical lines. | ||
| f1(s) = SVector(-1.0, s - 1.0) | ||
| f2(s) = SVector(1.0, s + 1.0) | ||
| f3(s) = SVector(s, -1.0 + sinpi(0.5 * s)) | ||
| f4(s) = SVector(s, 1.0 + sinpi(0.5 * s)) | ||
|
|
||
| # Create P4estMesh with 3 x 2 trees and 6 x 4 elements, | ||
| # approximate the geometry with a smaller polydeg for testing. | ||
| trees_per_dimension = (3, 2) | ||
| mesh = P4estMesh(trees_per_dimension, polydeg = 3, | ||
| faces = (f1, f2, f3, f4), | ||
| periodicity = true, | ||
| initial_refinement_level = 1) | ||
|
|
||
| semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test, | ||
| solver; | ||
| boundary_conditions = boundary_condition_periodic) | ||
|
|
||
| ############################################################################### | ||
| # ODE solvers, callbacks etc. | ||
|
|
||
| ode = semidiscretize(semi, (0.0, 0.2)) | ||
|
|
||
| summary_callback = SummaryCallback() | ||
| analysis_callback = AnalysisCallback(semi, interval = 100) | ||
| stepsize_callback = StepsizeCallback(cfl = 0.5) | ||
|
|
||
| callbacks = CallbackSet(summary_callback, analysis_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 | ||
| 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
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.
Uh oh!
There was an error while loading. Please reload this page.