-
Notifications
You must be signed in to change notification settings - Fork 112
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
Show for Indicator Vortex #2060
Show for Indicator Vortex #2060
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 #2060 +/- ##
=======================================
Coverage 96.32% 96.32%
=======================================
Files 470 470
Lines 37446 37447 +1
=======================================
+ Hits 36069 36070 +1
Misses 1377 1377
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Very obvious improvement!
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 idea
@@ -57,6 +56,11 @@ function periodic_distance_2d(coordinates, center, domain_length) | |||
return sqrt(sum(abs2, dx_periodic)) | |||
end | |||
|
|||
# Optional: Nicer display of the indicator | |||
function Base.show(io::IO, ::MIME"text/plain", indicator::IndicatorVortex) | |||
Trixi.summary_box(io, "IndicatorVortex") |
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.
Do we need the summary box here? This is leaking an implementation detail into the examples/official API, so we should consider 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.
Hm not really for the "use case" indicated by the screenshots above. But if you assign a variable
indicator = TrixiExtension.IndicatorVortex(semi)
in the REPL you would see this box, which I use for consistency with the other indicators.
I use the isentropic vortex with AMR for convergence studies a lot. One thing that bothered me all the time is this abomination of a print you get when you run the example:
Now you see this: