-
Notifications
You must be signed in to change notification settings - Fork 121
Move SWEs to TrixiShallowWater.jl #2379
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
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 |
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.
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
).
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.
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 <[email protected]>
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.
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? |
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.
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 <[email protected]>
270e8f7
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.
Thanks
Now that
TrixiShallowWater.jl
is released, we would like to move the shallow water equations fromTrixi.jl
intoTrixiShallowWater.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:
ShallowWaterEquations1D
ShallowWaterEquations2D
ShallowWaterEquationsQuasi1D
The 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_etal
flux_nonconservative_wintermeyer_etal
flux_fjordholm_etal
flux_nonconservative_fjordholm_etal
lake_at_rest_error
waterheight
waterheight_pressure
AbstractShallowWaterEquations
TODO:
Trixi2Vtk.jl
test that useselixir_shallowwater_ec.jl
(https://github.com/trixi-framework/Trixi.jl/actions/runs/14736003027/job/41362120222?pr=2379#step:9:1284)DissipationLocalLaxFriedrichs
Tree1D
&Tree2D
)UnstructuredMesh2D
hadamard_sum!
Closes #2357