Skip to content
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

Separation of TrixiShallowWater.jl #1809

Merged
merged 20 commits into from
Feb 23, 2024

Conversation

patrickersing
Copy link
Contributor

@patrickersing patrickersing commented Jan 19, 2024

This PR prepares the separation of the planned TrixiShallowWater.jl package and removes some shallow water specific features, that will move into the new package.

Features that move to the new package are:

  • Two-layer shallow water equations (both 1D/2D)
  • Wet/Dry functionality which includes:
    • threshold_limiter, threshold_wet
    • PositivityPreservingLimiterShallowWater
    • IndicatorHennemannGassnerShallowWater
    • All functions related to the hydrostatic_reconstruction_chen_noelle

The features including respective examples and tests, will be removed from Trixi.jl and be included in TrixiShallowWater.jl. There, the shallow water equations with wet/dry functionality will be provided by a new equation set ShallowWaterEquationsWetDry. The basic ShallowWaterEquations and ShallowWaterEquationsQuasi1D without Wet/Dry functionality will remain in Trixi.jl.

In order to do the separation, this PR should be prepared together with a companion PR that introduces these features in TrixiShallowWater.jl. For the separation process we should then first merge this PR and then add these features in TrixiShallowWater.jl.

Copy link
Contributor

Review checklist

This 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

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (c3c0986) 89.67% compared to head (e96453f) 73.26%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/equations/shallow_water_1d.jl 66.67% 1 Missing ⚠️
src/equations/shallow_water_quasi_1d.jl 66.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1809       +/-   ##
===========================================
- Coverage   89.67%   73.26%   -16.41%     
===========================================
  Files         458      438       -20     
  Lines       36400    35342     -1058     
===========================================
- Hits        32640    25891     -6749     
- Misses       3760     9451     +5691     
Flag Coverage Δ
unittests 73.26% <77.78%> (-16.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @patrickersing ! This rips out anything marked for removal having to do with the wet/dry functionality and returns the ShallowWaterEquations struct to its original form without the different threshold values. Also, the computation of the well-balancedness error returns to its original strategy.

We need to coordinate this breaking change to Trixi with the others and then deal with reviews on the re-implementation of all this functionality into your PR in TrixiShallowWater.jl.

For the modifications to the ShallowWaterEquationsQuasi1D we need some input from @jlchan . Does the testing and/or functionality of this equation system required the wetting and drying capabilities?

@sloede
Copy link
Member

sloede commented Jan 31, 2024

We need to coordinate this breaking change to Trixi with the others

Coordinate yes, but only in the sense that once both PRs are ready, we announce "we are doing this now", merge the PRs and create a new breaking Trixi.jl release immediately.

@sloede
Copy link
Member

sloede commented Jan 31, 2024

Ah, I forgot about #1726. If you are more or less ready here, please bring up this amicable divorce at the next Trixi.jl Meeting!

@andrewwinters5000 andrewwinters5000 mentioned this pull request Jan 31, 2024
8 tasks
@andrewwinters5000
Copy link
Member

We need to coordinate this breaking change to Trixi with the others

Coordinate yes, but only in the sense that once both PRs are ready, we announce "we are doing this now", merge the PRs and create a new breaking Trixi.jl release immediately.

Yes, this is what I meant. As a development team we need to all be on the same page and "push the button" so to say on this divorce. In doing so, we can merge any other breaking changes that are ready to go.

@andrewwinters5000
Copy link
Member

Ah, I forgot about #1726. If you are more or less ready here, please bring up this amicable divorce at the next Trixi.jl Meeting!

I will add this to the meeting agenda for next week. Also, I will do a review of the corresponding PR in TrixiShallowWater.jl to make sure everything is clean there. That way, I figure the process would be

  1. Merge this PR to Trixi main
  2. Release a new version of Trixi that is then available for TrixiShallowWater
  3. Clean-up any comments or so in this PR
  4. Merge that PR into TrixiShallowWater main
  5. Live happily ever after :)

@sloede
Copy link
Member

sloede commented Jan 31, 2024

That way, I figure the process would be

1. Merge this PR to Trixi `main`

2. Release a new version of Trixi that is then available for TrixiShallowWater

3. Clean-up any comments or so in [this PR](https://github.com/trixi-framework/TrixiShallowWater.jl/pull/18)

4. Merge that PR into TrixiShallowWater `main`

5. Live happily ever after :)

Sounds good to me! It would also be great if you could maybe do the first review of this PR here. From a brief look it seems to include only technical changes at the moment. However, I think we should think about how to present the relationship between Trixi.jl and TrixiSW.jl in the Trixi.jl docs. For instance, I think it should be reflected in the feature list of the README, it needs to be properly documented in the NEWS, and we should also maybe write a short statement about the growing Trixi.jl ecosphere (either in the README or in an extra section).

@andrewwinters5000
Copy link
Member

However, I think we should think about how to present the relationship between Trixi.jl and TrixiSW.jl in the Trixi.jl docs.

That is true, a strategy for the docs of both packages is something that needs to be hammered out and discussed.

Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! It would be good if @ranocha can have a last look before the merge.

Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I did only a sanity check and didn't, e.g., verify exactly what was removed. What's missing, however, is an appropriate NEWS.md item

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @sloede - we should get some NEWS.md entry for breaking changes when upgrading to the new Trixi.jl version.

src/Trixi.jl Show resolved Hide resolved
@patrickersing
Copy link
Contributor Author

I have added an entry to NEWS.md regarding the breaking changes from this PR. Let me know if anything is missing.

Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I like the additional unit tests and the NEWS item looks good.

NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
@ranocha
Copy link
Member

ranocha commented Feb 13, 2024

I would like to fix the recent CI failures before releasing the breaking version.

@andrewwinters5000
Copy link
Member

I would like to fix the recent CI failures before releasing the breaking version.

Okay, that is reasonable.

@ranocha ranocha merged commit 62610bb into trixi-framework:main Feb 23, 2024
28 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants