fix: 2D/3D cell co-location in parallel mesh redistribution #3967
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The current
redistributeMeshes()partitions the entire mesh (both 2D and 3D cells) all at once using graph partitioning.However, there is no guarantee that a 2D surface element will be assigned to a rank containing its adjacent 3D face.
This can lead to configurations where 2D cells are orphaned on ranks with no access to their 3D neighbor faces.
See screenshot below for a real life illustration.
A side effect is that the nodes of these orphaned 2D surfaces are seen as owned by that rank and will prevent them from being properly ghosted in the 3D mesh.
Solution
In this PR, the redistribution workflow is refactored in 3 steps to ensure co-location of 2D and 3D cells:
NB: When using MeshDoctor splitting, the fracture elements suffer the exact same problem. These will be addressed in a separate PR.