Move SWEs to TrixiShallowWater.jl#2379
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2379 +/- ##
===========================================
+ Coverage 85.73% 96.80% +11.06%
===========================================
Files 512 494 -18
Lines 41815 40825 -990
===========================================
+ Hits 35850 39518 +3668
+ Misses 5965 1307 -4658
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I prefer defining them in a central place and adding specialized methods in our sub-packages. Otherwise, it will be annoying to work with different sub-packages in the same project. |
That sounds good to me. If we want to avoid problems from duplicate function names in the sub-packages it would also be good to add a test like this to both TrixiShallowWater and TrixiAtmo: @testset "Namespace conflicts" begin
# Test for namespace conflicts between TrixiShallowWater.jl and TrixiAtmo.jl
for name in names(TrixiAtmo)
@test !(name in names(TrixiShallowWater))
end
end |
|
The function |
|
|
@patrickersing I haven't used However, I recently looked at what you did in your hydrostatic reconstruction paper to test well balancedness (taking a perturbed state and seeing if the scheme dissipates it to recover a lake at rest) and I can see how Edit: to directly answer your question, I would prefer if it stays in Trixi.jl for this PR as I want to extend it in TrixiAtmo.jl. But it's not super important, as I can just make it |
Okay, then we can just keep the function in |
andrewwinters5000
left a comment
There was a problem hiding this comment.
The removal looks good with appropriate changes to the README and a NEWS item. The empty functions waterheight, waterheight_pressure, lake_at_rest_error live in equations.jl and the empty Wintermeyer or Fjordholm based fluxes live in numerical_fluxes.jl which makes sense. The new tests that exercise the Dirichilet and nonconservative terms via MHD onion elixirs (for TreeMesh2D and UnstructuredMesh2D) or a Quasi 1D Euler run (for TreeMesh1D).
DanielDoehring
left a comment
There was a problem hiding this comment.
I have only questions about whether or not to have docstrings (of the admittedly still exported) functions. I would feel like having the documentation closer to the implementation.
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
andrewwinters5000
left a comment
There was a problem hiding this comment.
This is good to go from my side. The Downstream should pass again once the corresponding TrixiShallowWater PR is merged and released.
|
@andrewwinters5000 thanks for the review! Yes, that the downstream testing fails is okay, since we manually test compatibility in the respective TrixiShallowWater.jl PR. @trixi-framework/principal-developers Can someone have a second look over this? |
ranocha
left a comment
There was a problem hiding this comment.
Thanks a lot! I just have a few minor formatting comments. Could you please check them, @patrickersing, and apply them in TrixiShallowWater.jl accordingly?
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
270e8f7
Now that
TrixiShallowWater.jlis released, we would like to move the shallow water equations fromTrixi.jlintoTrixiShallowWater.jl. The aim of this PR is to test how such a separation would affect the coverage and testing in Trixi.jl and it should provide a basis for discussion on how to structure the separation and which functionality should remain in Trixi.jl. To coordinate the move the corresponding PR (trixi-framework/TrixiShallowWater.jl#96) has been created in TrixiShallowWater.jl .Right now it is planned to move the following equations:
ShallowWaterEquations1DShallowWaterEquations2DShallowWaterEquationsQuasi1DThe functions below are currently exported by Trixi.jl and used by both TrixiShallowWater.jl and TrixiAtmo.jl. so we should discuss whether each subpackage would define their own version or if we want to keep empty versions of those functions in Trixi.jl:
flux_wintermeyer_etalflux_nonconservative_wintermeyer_etalflux_fjordholm_etalflux_nonconservative_fjordholm_etallake_at_rest_errorwaterheightwaterheight_pressureAbstractShallowWaterEquationsTODO:
Trixi2Vtk.jltest that useselixir_shallowwater_ec.jl(https://github.com/trixi-framework/Trixi.jl/actions/runs/14736003027/job/41362120222?pr=2379#step:9:1284)DissipationLocalLaxFriedrichsTree1D&Tree2D)UnstructuredMesh2Dhadamard_sum!Closes #2357