Handling a corner case in diy based ghost cells generator
This follows !7548 (merged). Currently, ghosts are computed with only one rank communication pass: ranks adjacent to each other exchange ghosts. This works well if your input is not "sliced". Let's say you want to generate ghost cells between 3D vtkImageData
such that they are all stacked to each other in one dimension with image datas of thickness 1 voxel in this stacking dimension. The ghost cell generator will fail to exchange more than 1 layer of ghosts.
In order to be able to exchange more layer of ghosts, iterative communication between ranks needs to be added. Let's take an example. Block A
communicates with block B
. B
is very thin and can send one layer of ghosts. However we want to generate 3 of them. A
and B
exchange their respective geometry, A
notices that B
didn't provide enough for 3 layers. In the meanwhile, B
might have gather information from another block C
which provides one additional layer of ghosts to B
. In an additional communication between A
and B
, A
can be aware of this additional geometry. If A
doesn't have all its layers still (one is missing, in our example), the process can be looped over until no additional new geometry can be shared between blocks lacking ghost layers, or until every block has the wanted amount of ghost layers.
A similar mechanism will need to be done when exchanging ghost data (point data, cell data for instance). Ideally, this convoluted process should be done generically so new data types can be added without too much extra work.