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?
|
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>
|
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:
|
ranocha
left a comment
There was a problem hiding this comment.
Can you please also check a non-uniform case? For example, the output of
julia> using Trixi, Plots
julia> trixi_include(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_amr.jl"), polydeg = 0); plot(sol)with the release version of Trixi.jl and this branch? Please also add some regression test involving AMR.
| # Map the continuous spatial coordinates from [-1, 1] to discrete matrix indices [1, true_resolution]. | ||
| # The +0.5 shift combined with round() acts as a floor-like cell assignment. | ||
| ix = round(Int, (cx + 1) / 2 * true_resolution + 0.5) | ||
| iy = round(Int, (cy + 1) / 2 * true_resolution + 0.5) |
There was a problem hiding this comment.
The spell checker complains about iy. While this is kind of a false positive, we use the indices i, j, k for x, y, z elsewhere in the code. Could you please adapt this?
|
|
||
| # OrdinaryDiffEq's `solve` method evolves the solution in time and executes the passed callbacks | ||
| sol = solve(ode, Euler(); | ||
| dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback |
There was a problem hiding this comment.
| dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback | |
| dt = 1, # solve needs some value here but it will be overwritten by the stepsize_callback |
We recently changed the default values to improve GPU support.

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.