Ghost layer computation can crash on meshes with deleted elements
If elements are deleted, the Ghost algorithm can fail. This happens because a process p currently does not know what elements process q may have deleted. p may think that neighbors of his belong to q, but they are in fact deleted. Therefore q receives a message from p that it does not expect.
This only happens when all possible neighbors of p on q are deleted - so Ghost may seem to work
TODO:
- [x] Disable Ghost algorithm for meshes with holes.
- [ ] Write a test case that covers this case and fails when Ghost is computated
- [ ] Figure out a solution
One solution might be to accept messages even from processes we do not send to. Then check whether the respective elements are in fact neighbors of local elements or neighbors of deleted elements. In the latter case, we do not add the elements as ghost. For symmetry reasons, the other process must check for each local boundary element whether a remote element was received and if not, take this element out of the list of boundary elements. This may result in more messages received than send and will need MPI adaptations.
Had a coding session and discussion with @lukasdreyer about this.
We now abort when the ghost layer is constructed for an incomplete forest. See #827
This improves the situation, since users do not run into unexpected behavior. For the long term we (and specifically @sandro-elsweijer) are working on an extended version of the Ghost algorithm that will be able to handle deleted elements as well.
Replaced by New feature label, since we now abort with error message