trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
505 stars 98 forks source link

Extend TimeSeriesCallback for TreeMesh1D/3D #1873

Closed patrickersing closed 3 months ago

patrickersing commented 3 months ago

This PR extends the TimeSeriesCallback on TreeMesh to 1D and 3D. The existing routines worked pretty much out of the box and the extension only required one additional function. Since many of the methods in time_series_dg_2d.jl are actually independent of mesh and dimension, I would suggest to relocate them into time_series_dg.jl. Furthermore, since most functions for TreeMesh are independent of the dimension, I think it makes sense to split these off into a file time_series_dg_tree.jl to avoid code duplication.

github-actions[bot] commented 3 months ago

Review checklist

This 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 :heart: by the Trixi.jl community.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.31%. Comparing base (2dfde7f) to head (0111b0a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1873 +/- ## ======================================= Coverage 96.30% 96.31% ======================================= Files 439 440 +1 Lines 35749 35797 +48 ======================================= + Hits 34428 34476 +48 Misses 1321 1321 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1873/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1873/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `96.31% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

patrickersing commented 3 months ago

I also tested convergence by running the test elixirs with refined meshes and comparing the gauge point data (point_data) from the callback to the analytical solution (exact_data).

Results for tree_1d_dgsem/elixir_euler_source_terms.jl: initial_refinement_level norm(point_data - exact_data)
4 1.587e-1
6 3.883e-10
8 3.966e-13
Results for tree_3d_dgsem/elixir_euler_source_terms.jl: initial_refinement_level norm(point_data - exact_data)
2 2.701e-1
3 9.439e-2
4 2.170e-5