-
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
WIP: In-situ visualization #1: Make Makie available in VisualizationCallback #2195
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. |
@@ -13,6 +13,7 @@ mutable struct VisualizationCallback{SolutionVariables, VariableNames, PlotDataC | |||
show_mesh::Bool | |||
plot_data_creator::PlotDataCreator | |||
plot_creator::PlotCreator | |||
figure |
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.
[JuliaFormatter] reported by reviewdog 🐶
figure | |
figure::Any |
@@ -98,7 +99,7 @@ | |||
visualization_callback = VisualizationCallback(interval, | |||
solution_variables, variable_names, | |||
show_mesh, | |||
plot_data_creator, plot_creator, | |||
plot_data_creator, plot_creator, nothing, |
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.
[JuliaFormatter] reported by reviewdog 🐶
plot_data_creator, plot_creator, nothing, | |
plot_data_creator, plot_creator, | |
nothing, |
@@ -110,8 +111,9 @@ | |||
# Requires.jl only when Plots is present. | |||
# In the future, we should update/remove this warning if other plotting packages are | |||
# starting to be used. | |||
if !(:Plots in names(@__MODULE__, all = true)) | |||
@warn "Package `Plots` not loaded but required by `VisualizationCallback` to visualize results" | |||
if !(:Plots in names(@__MODULE__, all = true) || :Makie in names(@__MODULE__, all = true)) |
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.
[JuliaFormatter] reported by reviewdog 🐶
if !(:Plots in names(@__MODULE__, all = true) || :Makie in names(@__MODULE__, all = true)) | |
if !(:Plots in names(@__MODULE__, all = true) || | |
:Makie in names(@__MODULE__, all = true)) |
@@ -158,7 +160,7 @@ | |||
# Create plot | |||
plot_creator(plot_data, variable_names; | |||
show_mesh = show_mesh, plot_arguments = plot_arguments, | |||
time = integrator.t, timestep = integrator.stats.naccept) | |||
time = integrator.t, timestep = integrator.stats.naccept, figure = figure) |
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.
[JuliaFormatter] reported by reviewdog 🐶
time = integrator.t, timestep = integrator.stats.naccept, figure = figure) | |
time = integrator.t, timestep = integrator.stats.naccept, | |
figure = figure) |
function show_plot_makie(plot_data, variable_names; | ||
show_mesh = true, plot_arguments = Dict{Symbol, Any}(), | ||
time = nothing, timestep = nothing, figure = nothing) | ||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
No description provided.