Skip to content

vtkGhostCellsGenerator: exchanging ghost values at interfaces

As reported by paraview/paraview#21347 (closed), point values were not shared at the interface. It isn't in general a problem as points are supposed to have the same values. It becomes a problem when one wants to keep track of who is the owner of a ghost point at the interface by sharing a process id array, for instance.

Given a point belonging to multiple partitions in the input, the partition of lowest id in the DIY environment is set to be the owner of this point. Blocks don't send interfaces to the blocks of lower id, but receives them from the latter.

Making the ghost cells generator function in this instance required those few changes:

  • There is no more a shallow-copy when requesting zero layers of ghosts, as the point data array of the input is written over
  • Computing the point ids to share needed reworked. Now, the owner of the points at the interface sends them as well, but the processes who will only hold a ghost copy of them do not send theirs.
  • In the structured data version, skipping duplicate point needs to be done on received points to ensure that the block of lowest ID is the only one setting this point.
  • Newly allocated ghost points and cells need to be set to zero. They ended up being not set when the input had hidden ghosts and this was messing up their final values because we're setting them by only editing one bit.
Edited by Yohann Bearzi (Kitware)

Merge request reports