-
Notifications
You must be signed in to change notification settings - Fork 113
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
In-situ visualization #0: Make Makie available in 2D VisualizationCallback #2225
base: main
Are you sure you want to change the base?
In-situ visualization #0: Make Makie available in 2D VisualizationCallback #2225
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 #2225 +/- ##
==========================================
- Coverage 96.88% 96.79% -0.08%
==========================================
Files 490 491 +1
Lines 39491 39524 +33
==========================================
Hits 38257 38257
- Misses 1234 1267 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Nice! Looking forward to this! |
Ready for review @trixi-framework/developers . This PR involves places I have not been before (visualization, packages extensions, ...). Any feedback or hints would be highly appreciated. |
examples/tree_2d_dgsem/elixir_advection_amr_visualization_makie.jl
Outdated
Show resolved
Hide resolved
# prevents anyone from using other packages, given that appropriate `plot_creator`s are | ||
# passed. | ||
|
||
# TODO: rest of this comment? |
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 should be resolved in the merged source code.
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.
Yes, definitely!
I just need some explanation about the Requires.jl stuff.
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.
@sloede It's been a while since you added this note. Could you help with updating it?
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.
What's the current status - isn't Plots still using Requires.jl? What do we need to update - isn't this comment still valid?
…ee/Trixi.jl into bg/makie-2d-visualization-callback
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 just had a quick look. This definitely should get an entry in NEWS.md
@@ -166,7 +179,7 @@ function (visualization_callback::VisualizationCallback)(integrator) | |||
end | |||
|
|||
""" | |||
show_plot(plot_data, variable_names; | |||
show_plot(visualization_callback, plot_data, variable_names; |
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.
There are changes to documented API, so this is breaking. We should either enable the previous behavior again or include this only in a breaking release.
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.
True!
In fact, I did not think about someone calling show_plot
directly. For the callback it is only called internally.
Waiting for a breaking release would of course be fine.
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 guess nobody is using it actively, but it's documented API.
Project.toml
Outdated
@@ -55,11 +55,13 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | |||
[weakdeps] | |||
Convex = "f65535da-76fb-5f13-bab9-19810c17039a" | |||
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199" | |||
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" |
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.
Does it need to be GLMakie.jl, or could it be also one of the other backends?
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.
Having the 3D case in mind, it would be nice if you could interactively turn your plot around.
But I am not sufficiently familiar with Makie. Can you make the implementation independent of a certain backend?
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.
Apparently that is how it is supposed to work. I feel amazed...
I now removed the GLMakie extension and moved its content to our existing Makie extension. For the added elixir both using GLMakie
and using CairoMakie
work (although the latter might not be too useful).
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 👍
moved stuff to Makie extension
I converted this to a draft PR so that nobody accidentally merges it. |
Shall we include this in the breaking release scheduled for soon? If so, please update the PR accordingly. |
This is the first step in reintegrating @s6nistam's work on in-situ visualization.
As an alternative to Plots.jl it adds plotting with GLMakie for 2D TreeMesh setups.