From 344342b67791888f6ebb2f550f7bcb996f3d2d75 Mon Sep 17 00:00:00 2001 From: Lena Ploetzke Date: Tue, 24 Mar 2026 16:31:52 +0100 Subject: [PATCH 1/4] add mesh competence pack --- mesh_handle/README.md | 1 + mesh_handle/competence_pack.hxx | 52 ++++-- mesh_handle/data_handler.hxx | 171 ++++++++++++++++++ mesh_handle/element.hxx | 41 +---- .../internal/competence_pack_union.hxx | 40 ++-- mesh_handle/mesh.hxx | 101 +++-------- .../t8_gtest_adapt_partition_balance.cxx | 5 +- .../mesh_handle/t8_gtest_cache_competence.cxx | 14 +- .../t8_gtest_custom_competence.cxx | 5 +- test/mesh_handle/t8_gtest_ghost.cxx | 4 +- test/mesh_handle/t8_gtest_handle_data.cxx | 9 +- test/mesh_handle/t8_gtest_mesh_handle.cxx | 14 +- 12 files changed, 295 insertions(+), 162 deletions(-) create mode 100644 mesh_handle/data_handler.hxx diff --git a/mesh_handle/README.md b/mesh_handle/README.md index 20f220981d..8be544983a 100644 --- a/mesh_handle/README.md +++ b/mesh_handle/README.md @@ -12,5 +12,6 @@ The folder's most important files are: - The [element.hxx](element.hxx) defines the elements (mesh or ghost elements) of the mesh handle. - The [competences.hxx](competences.hxx) defines additional competences/functionality of an element to access additional data. - The [competence_pack.hxx](competence_pack.hxx) is needed to pack element or mesh competences to pass it as template parameter to the mesh. +- The [data_handler.hxx](data_handler.hxx) provides competences to work with element data. Headers in the [internal/](internal/) folder are only intended to implement details of the mesh handle, so they should not need to be included for any other purpose. \ No newline at end of file diff --git a/mesh_handle/competence_pack.hxx b/mesh_handle/competence_pack.hxx index d7406b5112..39a413d4a6 100644 --- a/mesh_handle/competence_pack.hxx +++ b/mesh_handle/competence_pack.hxx @@ -21,7 +21,8 @@ */ /** \file competence_pack.hxx - * Define to pack different competences into one template parameter for the \ref t8_mesh_handle::mesh class. + * Define classes to pack different competences into one template parameter for the \ref t8_mesh_handle::mesh class. + * We have one class for element competences and one for mesh competences. */ #pragma once @@ -30,29 +31,50 @@ #include "internal/competence_pack_union.hxx" namespace t8_mesh_handle { -/** Class to pack different competences into one template parameter for the \ref mesh class. - * \tparam TCompetence The competences to be packed. +// --- Element competence pack. --- +/** Class to pack different element competences into one template parameter for the \ref mesh class. + * \tparam TElementCompetence The competences to be packed. */ -template