-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix create_submesh
by generalising sub index map creation
#2890
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jorgensd
reviewed
Nov 14, 2023
I'm not really sure where the best place (or what the best name) is for the new function for creating sub index maps. I've put it in the index map class for the moment, but since it is really only needed for sub-mesh creation, maybe it's better in mesh? Any thoughts would be much appreciated. |
jpdean
requested review from
garth-wells,
jorgensd,
francesco-ballarin and
IgorBaratta
December 15, 2023 16:16
francesco-ballarin
approved these changes
Dec 18, 2023
garth-wells
reviewed
Dec 18, 2023
garth-wells
reviewed
Dec 18, 2023
garth-wells
approved these changes
Jan 2, 2024
jorgensd
added a commit
to jorgensd/dolfinx_mpc
that referenced
this pull request
Jan 4, 2024
FEniCS/dolfinx#2890 Currently need to rewrite distribute_ghost_data, as it needs all blocks to create the compressed map. Plan is to add it as extra input
jorgensd
added a commit
to jorgensd/dolfinx_mpc
that referenced
this pull request
Jan 8, 2024
* Fixes related to FEniCS/dolfinx#2890 Currently need to rewrite distribute_ghost_data, as it needs all blocks to create the compressed map. Plan is to add it as extra input * Resolve issues with global_to_local. See: FEniCS/dolfinx#2963 * Fix option name * Revert branches * API changes from: FEniCS/dolfinx#2954
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes a problem where sub-meshes can have vertices that are not connected to a cell on the owning process in parallel.
To illustrate, consider the following mesh, which is partitioned across two processes. Blue shading indicates owned entities. Red shading indicates ghost entities. Gray shading indicates entities that are not present on that process. The vertex numbering is local to each process.
Creating an L-shaped sub-mesh yields the following on main:
Note that there is a lone vertex that is not connected to a cell on the process that owns it. This is problematic because we usually perform operations cellwise, and having vertices that are not connected to a cell can yield unexpected results. For example, if a function were to be interpolated on the sub-mesh, any degrees-of-freedom associated with the lone vertex would not be assigned a value on process 0. On process 1, a value would be assigned, but this would be overwritten with a forwards scatter.
This PR changes the submap owners of problematic vertices to avoid this issue, yielding:
The problematic vertex is now owned by process 1 in the submap and has been removed from process 0.