Skip to content

Add a helper function to compute neighbor element subfaces #2215

@dutkalex

Description

@dutkalex

Feature request

Implement a helper function to complement the information provided by t8_forest_leaf_face_neighbors_ext in the case of coarser neighbors.

Is your feature request related to a problem? Please describe.
For high-order (DG-like) solvers, it is common to have to build a detailed face connectivity data structure, most of which can be filled by calling t8_forest_leaf_face_neighbors_ext on each of the partition-local leaves. However, in the particular case where the neighbor across a face is coarser, this function does not tell which subface of the neighbor is touching the considered element.

Describe the solution or feature you'd like
Adding a helper function that can be called after t8_forest_leaf_face_neighbors_ext to compute the neighbor subface id would be an efficient and backwards-compatible way to solve the problem.

Describe alternatives you've considered
As discussed with @holke, a possible alternative (that only works for local neighbors for now but will shortly become a general solution when #1736 gets merged) is to call a second time t8_forest_leaf_face_neighbors_ext on the neighbor. However, this implies a lot of wasted work, since only a small fraction of the output would be useful (the major part is redundant).

Estimated priority
Which of these is most applicable (remove the others):

"Priority: high" Should be solved as soon as possible

"Priority: medium" Should be solved within half a year

"Priority: low" Should be solved eventually

Additional context
This is somewhat related to #2190

Metadata

Metadata

Assignees

Labels

priority:mediumShould be solved within half a yearworkload:mediumWould take a week or less

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions