-
Notifications
You must be signed in to change notification settings - Fork 10
Move SWEs from Trixi.jl to TrixiShallowWater.jl #96
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
andrewwinters5000
merged 45 commits into
trixi-framework:main
from
patrickersing:swe_separation
May 28, 2025
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
77f5714
move SWEs from Trixi.jl
patrickersing b939764
Merge branch 'main' into swe_separation
patrickersing 98cf8f5
switch to trixi version from separationPR for testing
patrickersing 33bb97b
switch to Trixi.jl version from PR for testing
patrickersing 3184b49
try alternative way to test with PR version
patrickersing d32ccd5
update ci.yml
patrickersing 9150d90
include workaround for test without coverage
patrickersing 1d94df8
add dgmulti and t8code testing
patrickersing 62021bd
add ci workaround to documenter.yml
patrickersing cfcd83d
fix dostring references
patrickersing 8f59d9f
apply formatter
patrickersing 8d8dd45
update documenter.yml
patrickersing d72d352
update documenter.yml
patrickersing a7ea4d4
fix comments
patrickersing 25606eb
add debug statement to documenter.yml
patrickersing 395b525
update documenter.yml
patrickersing 098d3c5
remove debug statements
patrickersing ba34e7a
with external references in docs
patrickersing 37f075a
Merge branch 'main' into swe_separation
patrickersing b5edb23
rename SWE_WetDry to SWE
patrickersing 90336bb
update docstrings
patrickersing 83da950
fix documenter.yml to julia v1.10
patrickersing eb71a73
add news.md entry
patrickersing 1a01248
fix wavespeed estimates for SWE1D
patrickersing df74dbb
adjust test tolerances to the floating-point format
patrickersing 987d4d0
Update examples/unstructured_2d_dgsem/elixir_shallowwater_ec_float32.jl
patrickersing 154633b
Merge branch 'main' into swe_separation
andrewwinters5000 60db631
Update elixir_shallowwater_perturbation_wet_dry_amr.jl
andrewwinters5000 325085c
adjust equation name in new coarsen/refine routines
andrewwinters5000 a3ab80b
run formatter
andrewwinters5000 e99beb8
Apply suggestions from code review
patrickersing c36813e
rename swe files
patrickersing 8cc14ec
uncomment type tests and remove experimental warning
patrickersing 566f8c3
apply suggestion from code review
patrickersing 7c17308
Update src/equations/equations.jl
patrickersing 888a6ea
Merge branch 'main' into swe_separation
patrickersing a01aa33
Merge branch 'main' into swe_separation
patrickersing c7dedd2
Merge branch 'main' into swe_separation
andrewwinters5000 a85075c
Merge branch 'swe_separation' of github.com:patrickersing/TrixiShallo…
andrewwinters5000 b527ae2
Merge branch 'main' into swe_separation
andrewwinters5000 b2d8e9c
remove code highlighting for package names
patrickersing 5e3fd27
test against Trixi/main
patrickersing 7af4147
allow Trixi.jl v0.12 for docs
ranocha e12d3dd
update version
patrickersing 8048a78
update docstring reference for FluxHydrostaticReconstruction
patrickersing 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
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
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
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,49 @@ | ||
| using OrdinaryDiffEqSSPRK, OrdinaryDiffEqLowStorageRK | ||
| using Trixi | ||
| using TrixiShallowWater | ||
|
|
||
| ############################################################################### | ||
| # Semidiscretization of the quasi 1d shallow water equations | ||
| # See Chan et al. https://doi.org/10.48550/arXiv.2307.12089 for details | ||
|
|
||
| equations = ShallowWaterEquationsQuasi1D(gravity = 9.81) | ||
|
|
||
| initial_condition = initial_condition_convergence_test | ||
|
|
||
| volume_flux = (flux_chan_etal, flux_nonconservative_chan_etal) | ||
| surface_flux = (FluxPlusDissipation(flux_chan_etal, DissipationLocalLaxFriedrichs()), | ||
| flux_nonconservative_chan_etal) | ||
|
|
||
| dg = DGMulti(polydeg = 4, element_type = Line(), approximation_type = SBP(), | ||
| surface_integral = SurfaceIntegralWeakForm(surface_flux), | ||
| volume_integral = VolumeIntegralFluxDifferencing(volume_flux)) | ||
|
|
||
| cells_per_dimension = (8,) | ||
| mesh = DGMultiMesh(dg, cells_per_dimension, | ||
| coordinates_min = (0.0,), coordinates_max = (sqrt(2),), | ||
| periodicity = true) | ||
| semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg; | ||
| source_terms = source_terms_convergence_test) | ||
|
|
||
| ############################################################################### | ||
| # ODE solvers, callbacks etc. | ||
|
|
||
| tspan = (0.0, 1.0) | ||
| ode = semidiscretize(semi, tspan) | ||
|
|
||
| summary_callback = SummaryCallback() | ||
|
|
||
| analysis_interval = 100 | ||
| analysis_callback = AnalysisCallback(semi, interval = analysis_interval, uEltype = real(dg)) | ||
|
|
||
| alive_callback = AliveCallback(analysis_interval = analysis_interval) | ||
|
|
||
| callbacks = CallbackSet(summary_callback, | ||
| analysis_callback, | ||
| alive_callback) | ||
|
|
||
| ############################################################################### | ||
| # run the simulation | ||
|
|
||
| sol = solve(ode, RDPK3SpFSAL49(); abstol = 1.0e-8, reltol = 1.0e-8, | ||
| 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,46 @@ | ||
| using OrdinaryDiffEqSSPRK, OrdinaryDiffEqLowStorageRK | ||
| using Trixi | ||
| using TrixiShallowWater | ||
|
|
||
| ############################################################################### | ||
| # semidiscretization of the shallow water equations | ||
|
|
||
| equations = ShallowWaterEquations2D(gravity = 9.81) | ||
|
|
||
| initial_condition = initial_condition_convergence_test | ||
|
|
||
| volume_flux = (flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal) | ||
| surface_flux = (flux_lax_friedrichs, flux_nonconservative_fjordholm_etal) | ||
| dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = SBP(), | ||
| surface_integral = SurfaceIntegralWeakForm(surface_flux), | ||
| volume_integral = VolumeIntegralFluxDifferencing(volume_flux)) | ||
|
|
||
| cells_per_dimension = (8, 8) | ||
| mesh = DGMultiMesh(dg, cells_per_dimension, | ||
| coordinates_min = (0.0, 0.0), coordinates_max = (sqrt(2), sqrt(2)), | ||
| periodicity = true) | ||
|
|
||
| semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg; | ||
| source_terms = source_terms_convergence_test) | ||
|
|
||
| ############################################################################### | ||
| # ODE solvers, callbacks etc. | ||
|
|
||
| tspan = (0.0, 0.4) | ||
| ode = semidiscretize(semi, tspan) | ||
|
|
||
| summary_callback = SummaryCallback() | ||
|
|
||
| analysis_interval = 100 | ||
| analysis_callback = AnalysisCallback(semi, interval = analysis_interval, uEltype = real(dg)) | ||
| alive_callback = AliveCallback(analysis_interval = analysis_interval) | ||
|
|
||
| callbacks = CallbackSet(summary_callback, | ||
| analysis_callback, | ||
| alive_callback) | ||
|
|
||
| ############################################################################### | ||
| # run the simulation | ||
|
|
||
| sol = solve(ode, RDPK3SpFSAL49(); abstol = 1.0e-7, reltol = 1.0e-7, | ||
| 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.