Plot fv 2d for issue #2998#3033
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. |
ranocha
left a comment
There was a problem hiding this comment.
Please clean up the code as discussed offline.
|
@ranocha I've added the requested comments and removed the debug command. |
ranocha
left a comment
There was a problem hiding this comment.
This is the first round of review comments to show you the next steps in class.
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
ranocha
left a comment
There was a problem hiding this comment.
Did you check whether it works correctly for polydeg = 0 and polydeg > 0 also for locally refined meshes?
| # Convert centers to edges to prevent heatmap from clipping boundary cells. | ||
| if length(x) == size(data[variable_id], 1) && length(y) == size(data[variable_id], 2) |
There was a problem hiding this comment.
This is problematic since this check will also be true for the standard DG case.
There was a problem hiding this comment.
I unpack the solver in the first line where things are unpacked (unpack plot_data, variable_id, solver =pds).
I then use it in the if loop (if nnodes(solver)==1 && the things that were there before).
This works with the example from the issue.
|
To check the current behavior for DG methods, you can use code along the lines of (@v1.10) pkg> activate --temp
(jl_kge4bE) pkg> add Trixi OrdinaryDiffEqLowStorageRK Plots
julia> using Trixi, Plots
julia> trixi_include(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_basic.jl"), initial_refinement_level = 1); plot(sol)and run the same commands except the package manager code on your branch for this PR to compare the results. |
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
| xlims --> (x_edges[begin], x_edges[end]) | ||
| ylims --> (y_edges[begin], y_edges[end]) | ||
| aspect_ratio --> :equal | ||
|
|
||
| legend --> :none | ||
| title --> variable_names[variable_id] | ||
| colorbar --> :true | ||
| xguide --> _get_guide(orientation_x) | ||
| yguide --> _get_guide(orientation_y) | ||
| seriestype --> :heatmap |
There was a problem hiding this comment.
What is this --> operator? I could only find documentation for the -> operator
There was a problem hiding this comment.
It is special for plot recipes for Plots.jl, see https://docs.juliaplots.org/stable/RecipesBase/syntax/.
|
Hi @ranocha, I have removed the length checks in recipes_plots.jl. They are not necessary. I verified that both the FV (from the issue description) and DG (the one you sent me) examples are plotting correctly. The DG example works in Julia version 11 (not only in version 10 like a had thought last week). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3033 +/- ##
==========================================
- Coverage 96.92% 96.76% -0.16%
==========================================
Files 635 637 +2
Lines 49338 49624 +286
==========================================
+ Hits 47818 48016 +198
- Misses 1520 1608 +88
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

Marius Nickels (https://github.com/nickki-m) and I worked on issue #2998: "Improve plotting for 2D/3D simulations with polydeg = 0 on the TreeMesh (finite volume case)". With our additions the test example given in issue #2998 shows no red bars any more.
I used an AI assistant to help me get through some Git remote issues regarding the branch publishing/upload process.
I dont know whats wrong with Project.toml. I didnt touch it.