FindCell in vtkPointData does not work for partitioned grids like those read with vtkXMLPUnstructuredGridReader
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
For grids that are made up of several parts, like those put together from parallel computations or read with one of the vtkXMLP* readers, the function FindCell() is not guaranteed to find the cell containing a point at the border of two parts of the grid.
FindCell() uses the following strategy: Find the closest point to the query point and then check which one of the cells contains the query point.
However, when the grid is made up of several parts, the same physical point may be listed several times in the mesh, once for each part of the mesh it is contained in. So the closest point used in FindCell is always has the correct coordinates but maybe the wrong ID. It could refer to the ID of the point with the correct coordinates but from a part of the grid that does not contain the query point.
A solution, which I already tried out and which works is to try not only the closest points but the ClosestNPoints as returned by the point locator. Then, all point IDs referring to the closest physical point in the mesh can be tried out and the cell containing the query point can always be found.
Another solution would be to establish cell neighborhood information when reading grids made up of several parts with vtkXMLPUnstructuredGridReader.