Skip to content

Conversation

@schnellerhase
Copy link
Contributor

@schnellerhase schnellerhase commented May 13, 2025

The dual graph computation previously assumed that at most two cells could be connected through a facet. This is not true for branching/non-orientable meshes. This extends the local dual graph computation to allow for such meshes. It implies no overhead for meshes without branches/joints.

Therefore we are now able to deal with non-orientable meshes correctly where the branching does not happen over a process boundary.

This fixes #2374. Since the input is provided on one process.

The problem still persists if the joint lies on a process boundary facet (Global dual graph computation fails to detect joint edge). This behavior is now documented and its fixing is tracked in #3733.

Fixes #3729 (Solution strategy in there turned out to be not the right approach - needs to be fixed on dual graph level, boundary vertices need to be computed based on a correct dual graph, this can not be corrected for on vertex level).

Additionally

  • adds documentation to build_local_dual_graph.
  • moves boundary_vertices_fn to own function which could be moved to cpp at some point.

The important changes are in https://github.com/FEniCS/dolfinx/pull/3730/files#diff-c24d3c0de0058214385657cf17a71f410f74a4e709bde7d858de41b5b94e52d7R510-R521. It changes from introducing edges cell_0 -> cell_i to adding all combinations cell_a -> cell_b for a<b

@schnellerhase
Copy link
Contributor Author

Output for mfe from #2374

(tdim=0, rank=0): size_global = 4, global_indices = []
(tdim=1, rank=0): size_global = 3, global_indices = []
(tdim=0, rank=1): size_global = 4, global_indices = [0 1 2 3]
(tdim=1, rank=1): size_global = 3, global_indices = [0 1 2]

@schnellerhase schnellerhase changed the title Allow for custom boundary vertex functions in mesh creation Local dual graph for branching meshes May 15, 2025
@schnellerhase schnellerhase marked this pull request as ready for review May 15, 2025 11:14
jorgensd and others added 2 commits May 15, 2025 15:12
Co-authored-by: Chris Richardson <chris@bpi.cam.ac.uk>
@michalhabera
Copy link
Contributor

Any more comments @chrisrichardson ? This is a blocker for us, will merge tomorrow if no more comments.

@chrisrichardson chrisrichardson self-requested a review May 27, 2025 15:21
@jorgensd jorgensd added this pull request to the merge queue May 27, 2025
Merged via the queue into FEniCS:main with commit 8590134 May 27, 2025
15 checks passed
@schnellerhase schnellerhase deleted the fix_2374 branch July 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants