-
Notifications
You must be signed in to change notification settings - Fork 120
Save additional node variables in SaveSolutionCallback
#2298
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
base: main
Are you sure you want to change the base?
Save additional node variables in SaveSolutionCallback
#2298
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2298 +/- ##
==========================================
- Coverage 96.95% 96.69% -0.26%
==========================================
Files 504 504
Lines 41721 41806 +85
==========================================
- Hits 40448 40423 -25
- Misses 1273 1383 +110
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:
|
Currently, the PR is somewhat inconsistent as for hyperbolic equations there is a dispatch based on the volume integral type, and for the parabolic equations we use an if-clause. This should be unified IMO. |
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.
In general, this looks good to me. Unfortunately, the correct export of the "limiting coefficient" is not CI tested extensively.
But, if you tested it locally and say it works properly, I'm fine with merging this after the one issue.
Maybe it also makes sense to add new functions |
@JoshuaLampert could you maybe also take a look and leave your thoughts here? |
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! I can image, this is a very useful feature. However, I would like to discuss the interface first, see my comment below.
I generalized the implementation such that now users can supply their own functions to be stored in the solution file. I need to test the mpi-implementations, but from my side this is ready for review. |
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.
Looks very nice to me.
Thus, in 1D this is a two integer tuple `indices = i, element`, | ||
in 2D a three integer tuple `indices = i, j, element`, | ||
and in 3D a four integer tuple `indices = i, j, k, element`. |
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.
Thus, in 1D this is a two integer tuple `indices = i, element`, | |
in 2D a three integer tuple `indices = i, j, element`, | |
and in 3D a four integer tuple `indices = i, j, k, element`. | |
Thus, in 1D this is a two integer tuple `indices = (i, element)`, | |
in 2D a three integer tuple `indices = (i, j, element)`, | |
and in 3D a four integer tuple `indices = (i, j, k, element)`. |
In case that the [`SubcellLimiterIDP`](@ref) is used, the `extra_node_variables` tuple is automatically extended by the | ||
`:limiting_coefficient` key which contains the limiting coefficient for each node. |
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.
TODO: Change the if
-clauses in the function get_node_variables!
to really check for IDP and not only subcell vol integral (see also failing downstream tests)
First attempt to save additional stuff in the solution callback. Not sure if the current implementation works for all cases already.
This could be extended to other quantities such as local Mach number, temperature, ...