Skip to content

Feature ghost interface restructuring overlap#2233

Draft
antjeHP wants to merge 10 commits intofeature-ghost_interface_restructuringfrom
feature-ghost_interface_restructuring_overlap
Draft

Feature ghost interface restructuring overlap#2233
antjeHP wants to merge 10 commits intofeature-ghost_interface_restructuringfrom
feature-ghost_interface_restructuring_overlap

Conversation

@antjeHP
Copy link
Collaborator

@antjeHP antjeHP commented Mar 23, 2026

Closes #2235

Description
Another ghost definition has been added, called overlapping ghost.
Neighborhood is defined here as follows: Elements of a grid have a positive stretch factor. Elements can be stretched by this factor, overlapping (at more than single points or edges) with other stretched elements. If this happens, the elements are considered neighboring.
For example. If all elements have a stretch factor of 1.0 or less, no element has a neighbor.
Another example: Given a uniform square grid all with a factor of 1.3, the neighbors by overlap correspond to the neighbors by common corners.

How works this definition:
The class of the overlapping ghost definition inherits from the base class for ghost definitions. The procedure of the do_ghost method is therefore similar.
A definitions object can be created either with or without a uniform stretch factor for all elements. However, a uniform factor can also be added or removed later.
Since the entire process of searching and exchanging the ghost element is encapsulated in the do_ghost method, the uniform factor cannot be changed instead.

The procedure of the do_ghost method:

  • The procedure of the do_ghost method is similar to that of the base class. First, the communicate_ownerships method of the base class is called. If there is no uniform stretch factor, the maximum stretch factor of each process is determined and exchanged.
  • Subsequently, each process creates a so-called cover locally for all processes, based on the first leaf element of each process previously transmitted. A set of elements is a cover of a process, if for each leaf element in the process, there is an element in the cover, that is equal to an ancestor of this leaf element or equal as the element it self. The elements of the cover are either given the uniform stretch factor or the maximum of the associated process.
  • Now the actual search for the ghost elements begins. Each process searches its elements for those that are neighbors of other processes in order to send these elements to this process. The neighborhood is determined by the local cover of the other process and not by the actual elements of the other process, as one process does not even know these elements locally.
  • In the last step, the communicate_ghost_elements of the base class is called and then clean up: only the memory required for the search is released again.

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!
  • 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).

@antjeHP antjeHP added New feature Adds a new feature to the code priority:medium Should be solved within half a year workload:low Would take half a day or less labels Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New feature Adds a new feature to the code priority:medium Should be solved within half a year workload:low Would take half a day or less

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant