-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adapt Svärd-Kalisch equations to Serre-Green-Naghdi equations #146
Conversation
I plan to make a similar PR for the BBM-BBM equations in the next days, but this will be breaking because it will unify the two equation systems. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 97.76% 97.92% +0.15%
==========================================
Files 23 23
Lines 1747 1784 +37
==========================================
+ Hits 1708 1747 +39
+ Misses 39 37 -2 ☔ View full report in Codecov by Sentry. |
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.
Nice 👍 I have not checked all changes in detail since I assume everything should be fine when tests pass.
I only have some minor suggestions for improving the documentation. From my point of view, this PR can be merged afterward. Thanks a lot! |
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.
Thanks
In this PR I try to make the implementation of the Svärd-Kalisch equations follow a more similar style as in the Serre-Green-Naghdi equations. This includes:
bathymetry_type
as additional field. Up to now, only a variable bathymetry is implemented (as we had before). It might be reasonable to also add the possibility to have abathymetry_flat
and then use the higher-order derivative operators for the dispersive terms (this, however, would require to have a third-derivative operator in thesolver
). I would like to keep this for a separate PR in the future.create_cache
and overwrite them inrhs!
now instead of always allocating them again. Now we have 0 allocations for the hyperbolic part.solve_system_matrix!
from the Serre-Green-Naghdi equations.Additionally, I avoided the allocations in
energy_total_modified
by reusingtmp1
. I don't know if this is a good idea on the other hand. This seems dangerous to me sincetmp1
will be changed. This also changes the returned value, right? Should I revert this change and allocate a new vector each time again, @ranocha?