Skip to content
Merged
Show file tree
Hide file tree
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 May 31, 2024
043e1f1
Small updates
sloede May 31, 2024
7ff6d01
Format
sloede May 31, 2024
8a11896
Merge branch 'main' into msl/legendre-gauss-basis
sloede May 31, 2024
a1bae4c
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Oct 25, 2025
faf5f77
Apply suggestions from code review
DanielDoehring Oct 25, 2025
35a85e8
Apply suggestions from code review
DanielDoehring Oct 25, 2025
168b32a
Update examples/tree_2d_dgsem/elixir_euler_convergence_gauss.jl
DanielDoehring Oct 25, 2025
885a3d5
Update src/solvers/dgsem_tree/dg_2d.jl
DanielDoehring Oct 25, 2025
9ab28df
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Feb 22, 2026
f8f7622
shorten
DanielDoehring Feb 22, 2026
b09f410
up
DanielDoehring Feb 22, 2026
aee88c5
optimizations
DanielDoehring Feb 22, 2026
e7cd768
rev
DanielDoehring Feb 22, 2026
482c26d
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Feb 22, 2026
54b0e87
test
DanielDoehring Feb 22, 2026
46a7846
Merge branch 'msl/legendre-gauss-basis' of https://github.com/trixi-f…
DanielDoehring Feb 22, 2026
45807fe
1D
DanielDoehring Feb 22, 2026
0afdd32
test
DanielDoehring Feb 23, 2026
b8b72b1
elaborate
DanielDoehring Feb 23, 2026
815c424
Apply suggestions from code review
DanielDoehring Feb 23, 2026
5c69b66
Update src/solvers/dgsem/basis_gauss_legendre.jl
JoshuaLampert Feb 23, 2026
400893b
ft gen
DanielDoehring Feb 23, 2026
d731d20
move, realt
DanielDoehring Feb 23, 2026
2c76600
adapt
DanielDoehring Feb 23, 2026
43aa4ae
Update src/solvers/dgsem/basis_gauss_legendre.jl
DanielDoehring Feb 23, 2026
d6f34d0
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Feb 23, 2026
e68f365
rm
DanielDoehring Feb 23, 2026
1c36a25
typo
DanielDoehring Feb 23, 2026
cc69a4b
commet
DanielDoehring Feb 23, 2026
45bb50e
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Feb 24, 2026
88ac730
Merge branch 'main' into msl/legendre-gauss-basis
DanielDoehring Feb 24, 2026
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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This enables in particular adaptive mesh refinement for that solver-mesh combina
- The second-order subcell volume integral is no longer limited to reconstruction in primitive variables.
Instead, it is possible to reconstruct in custom variables, if functions `cons2recon` and `recon2cons` are provided to
`VolumeIntegralPureLGLFiniteVolumeO2` and `VolumeIntegralShockCapturingRRG`([#2817]).
- Add Legendre-Gauss basis for DGSEM and implement solver (`VolumeIntegralWeakForm` and `SurfaceIntegralWeakForm` only) support for conforming 1D & 2D `TreeMesh`es ([#1965]).

## Changes when updating to v0.15 from v0.14.x

Expand Down
42 changes: 42 additions & 0 deletions examples/tree_1d_dgsem/elixir_advection_gauss_legendre.jl
Copy link
Copy Markdown
Member

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 _gauss or _gauss_legendre, please?

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);
52 changes: 52 additions & 0 deletions examples/tree_2d_dgsem/elixir_euler_convergence_gauss.jl
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);
2 changes: 1 addition & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export TreeMesh, StructuredMesh, StructuredMeshView, UnstructuredMesh2D, P4estMe
P4estMeshView, P4estMeshCubedSphere, T8codeMesh

export DG,
DGSEM, LobattoLegendreBasis,
DGSEM, LobattoLegendreBasis, GaussLegendreBasis,
FDSBP,
VolumeIntegralWeakForm, VolumeIntegralStrongForm,
VolumeIntegralFluxDifferencing,
Expand Down
2 changes: 1 addition & 1 deletion src/auxiliary/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function _precompile_manual_()
@assert Base.precompile(Tuple{typeof(Trixi.polynomial_interpolation_matrix),
Vector{RealT}, Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.barycentric_weights), Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_Lhat), RealT, Vector{RealT},
@assert Base.precompile(Tuple{typeof(Trixi.calc_L), RealT, Vector{RealT},
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.lagrange_interpolating_polynomials),
RealT, Vector{RealT}, Vector{RealT}})
Expand Down
Loading
Loading