RedistributeDataSet does not generate ghost cells as it should
RedistributedDataSet (RDS) does not generate any ghost array but it should.
Steps to reproduce:
mpirun -np 4 ./bin/pvserver
- run ParaView
- connect to server
- UnstructuredCellTypes, Apply
- RandomAttributes, RandomPointScalar on, Apply
- RedistributeDataSet, AssignToAllRegions, Apply
- Gradient, Apply
Result clearly shows that ghost cells are not present:
A workaround is to add a GhostCellGenerator on top of it, clearly not optimized though.
Dev note:
One layer of ghost cells is generated in vtkRedistributeDataSetFilter::MarkGhostCells then removed later in vtkRedistributeDataSetFilter::RequestData, definitely not the correct way to do this. It should be fixed by generating the right number of ghost cells AND points as requested by the pipeline, on the fly, in MarkGhostCells.
Please note there is a small bug that should be fixed:
@@ -1046,7 +1046,7 @@ void vtkRedistributeDataSetFilter::MarkGhostCells(vtkPartitionedDataSet* pieces)
}
auto cell_ownership =
- vtkIntArray::SafeDownCast(dataset->GetCellData()->GetArray(CELL_OWNERSHIP_ARRAYNAME));
+ vtkIdTypeArray::SafeDownCast(dataset->GetCellData()->GetArray(CELL_OWNERSHIP_ARRAYNAME));
if (!cell_ownership)
{
// cell_ownership is not generated if cells are being assigned uniquely to
Edited by Mathieu Westphal (Kitware)