Skip to content

Mesh competence tutorial - #2370

Open
Vyp3er wants to merge 17 commits into
DLR-AMR:mainfrom
Vyp3er:mesh_competence_tutorial
Open

Mesh competence tutorial#2370
Vyp3er wants to merge 17 commits into
DLR-AMR:mainfrom
Vyp3er:mesh_competence_tutorial

Conversation

@Vyp3er

@Vyp3er Vyp3er commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes here:

All these boxes must be checked by the AUTHOR before requesting review:

  • The PR is small enough to be reviewed easily. If not, consider splitting up the changes in multiple PRs.
  • The title starts with one of the following prefixes: Documentation:, Bugfix:, Feature:, Improvement: or Other:.
  • If the PR is related to an issue, make sure to link it.
  • The author made sure that, as a reviewer, he/she would check all boxes below.

All these boxes must be checked by the REVIEWERS before merging the pull request:

As a reviewer please read through all the code lines and make sure that the code is fully understood, bug free, well-documented and well-structured.

General

  • The reviewer executed the new code features at least once and checked the results manually.
  • The code follows the t8code coding guidelines.
  • New source/header files are properly added to the CMake files.
  • The code is well documented. In particular, all function declarations, structs/classes and their members have a proper doxygen documentation. Make sure to add a file documentation for each file!
  • README.md files are updated if necessary.
  • All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue).

Tests

  • The code is covered in an existing or new test case using Google Test.
  • The code coverage of the project (reported in the CI) should not decrease. If coverage is decreased, make sure that this is reasonable and acceptable.
  • Valgrind doesn't find any bugs in the new code. This script can be used to check for errors; see also this wiki article.

If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):

  • Should this use case be added to the github action?
  • If not, does the specific use case compile and all tests pass (check manually).

Scripts and Wiki

  • If a new directory with source files is added, it must be covered by the scripts/internal/find_all_source_files.sh to check the indentation of these files.
  • If this PR introduces a new feature, it must be covered in an example or tutorial and a Wiki article.

License

  • The author added a BSD statement to doc/ (or already has one).

@Vyp3er
Vyp3er marked this pull request as ready for review July 20, 2026 11:33
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.36%. Comparing base (c7d150a) to head (785f333).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2370   +/-   ##
=======================================
  Coverage   82.36%   82.36%           
=======================================
  Files         125      125           
  Lines       20708    20708           
=======================================
  Hits        17056    17056           
  Misses       3652     3652           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lenaploetzke
lenaploetzke self-requested a review July 20, 2026 12:14
@lenaploetzke lenaploetzke self-assigned this Jul 21, 2026

@lenaploetzke lenaploetzke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tutorial! Maybe a bit more of explanation would help :)

Comment thread tutorials/CMakeLists.txt Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_competences.cxx Outdated
@lenaploetzke lenaploetzke assigned Vyp3er and unassigned lenaploetzke Jul 27, 2026
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
@lenaploetzke lenaploetzke removed their assignment Aug 7, 2026
Vyp3er and others added 2 commits August 10, 2026 12:52
Co-authored-by: lenaploetzke <70579874+lenaploetzke@users.noreply.github.com>
@Vyp3er Vyp3er assigned lenaploetzke and unassigned Vyp3er Aug 10, 2026
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx
@lenaploetzke lenaploetzke assigned Vyp3er and unassigned lenaploetzke Aug 10, 2026
@Vyp3er Vyp3er assigned lenaploetzke and unassigned Vyp3er Aug 10, 2026

@lenaploetzke lenaploetzke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx
Comment thread tutorials/mesh_handle/t8_mesh_stepA_competences.cxx Outdated
@lenaploetzke lenaploetzke assigned Vyp3er and unassigned lenaploetzke Aug 10, 2026
@Vyp3er
Vyp3er force-pushed the mesh_competence_tutorial branch from 4102fbb to ef8c074 Compare August 23, 2026 09:30
@Vyp3er Vyp3er assigned lenaploetzke and unassigned Vyp3er Aug 23, 2026
* After finishing the core t8code features, we will now go into an important feature which is native to the mesh handle.
* These so called competences are a way to extend the functionality of the mesh handle and its elements.
*
* The competences are organized in different types, depending the functionality.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The competences are organized in different types, depending the functionality.
* The competences are organized in different types, depending on the functionality.

* The competences are organized in different types, depending the functionality.
* Element data competences are used to store data in the mesh elements and work with it in different ways.
* Cache competences are used to store data in the mesh elements to avoid recomputing the same data multiple times.
* The keypoint about competences though is, that you can create your own competence packs with all the competences you want to use and then use this pack to create a mesh handle with all the functionality you need.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check that these lines are not too long?

* \param [in] mesh The mesh to compute the total volume of.
* \param [in] comm The MPI communicator to use for the reduction of the total volume.
*/
template <t8_mesh_handle::T8MeshType TMeshClass>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the namespace is not necessary here because of the using at the top right?

@lenaploetzke lenaploetzke assigned Vyp3er and unassigned lenaploetzke Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants