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

Feature: Read geometry information from t8code #1900

Closed jmark closed 1 month ago

jmark commented 3 months ago

This PR adds geometry information retrieval from t8code into Trixi datastructures. As of now, only for Quads and Hexs.

The following idea might be implemented in the future. But there is no real use case right now. Currently, geometry information is read in during initialization phase. The plan is to change this such that the geometry information is retrieved whenever the mesh changes due to adaptation. This gives much more flexibility and has some other advantages. Thus, this PR is still a draft.

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.

sloede commented 3 months ago

Very cool feature, looking forward to it 😊

benegee commented 2 months ago

Moved the cubed sphere constructor here, making use of the new very convenient constructor which sets up tree_node_coordinates.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.42857% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 96.09%. Comparing base (8a9fc7b) to head (3158c44).

Files Patch % Lines
src/meshes/t8code_mesh.jl 96.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1900 +/- ## ========================================== - Coverage 96.09% 96.09% -0.00% ========================================== Files 453 453 Lines 36461 36481 +20 ========================================== + Hits 35036 35055 +19 - Misses 1425 1426 +1 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1900/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/1900/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `96.09% <96.43%> (-<0.01%)` | :arrow_down: | 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.

jmark commented 2 months ago

The PR is feature complete but needs some testing, reviewing and polishing. Furthermore, this PR depends on the latest developments in t8code, namely t8code version 2... The release is not public yet as are the Julia bindings for that. Hence, this PR has to wait for the t8code release before being ready for merging.

jmark commented 2 months ago

@benegee Please test your elixirs and add them to the test harness.

benegee commented 2 months ago

I added the tests. But I will need to adapt the error figures once the CI jobs are running.

JoshuaLampert commented 2 months ago

To let CI test this PR against the new t8code version from https://github.com/DLR-AMR/T8code.jl/pull/64, I think you can put the following snippet before the - name: Run tests without coverage in ci.yml:

      - name: Configure new T8code.jl version environment
        shell: julia --project="." --color=yes {0}
        run: |
          using Pkg
          Pkg.add(PackageSpec(url="https://github.com/DLR-AMR/T8code.jl", rev="bump-to-t8code-2.0.0"))
          Pkg.instantiate()

IMHO, it would be good to test the new T8code.jl version with this PR before we merge https://github.com/DLR-AMR/T8code.jl/pull/64 to be able to make potential fixes before we break something.

sloede commented 2 months ago

IMHO, it would be good to test the new T8code.jl version with this PR before we merge DLR-AMR/T8code.jl#64 to be able to make potential fixes before we break something.

It's good that you keep track of potential upstream incompatibilities! Alternatively, you could go ahead with the T8code.jl v2.0.0 release, then create a new Trixi.jl PR to update the compat bounds, and if errors are uncovered here, fix them with T8code.jl v2.0.1

jmark commented 2 months ago

The PR is feature complete but needs some testing, reviewing and polishing. Furthermore, this PR depends on the latest developments in t8code, namely t8code version 2... The release is not public yet as are the Julia bindings for that. Hence, this PR has to wait for the t8code release before being ready for merging.

Update: This PR does not actually need the latest t8code v2.0.0. Circumstances have changed. Thus, I relaxed the T8code.jl version requirement.

I suggest to introduce the latest t8code version to Trixi in a separate PR.

jmark commented 2 months ago

@benegee @JoshuaLampert @ranocha @sloede The PR is ready. All tests pass. Please feel free to do a review and/or refer this task someone with free capacities. Let me know if I can be of any help!

jmark commented 2 months ago

@sloede @ranocha Incorporated your suggestions. I kindly ask for a second round of review.

sloede commented 2 months ago

@ranocha would you like to take a look as well? otherwise, this can be merged

jmark commented 1 month ago

@sloede @ranocha The PR should be ready for merge. Thank you very much for your reviews!