Commit ded78d2b authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Fix handling of global cell ids.

Fixes two issues with vtkProbeFilter.

1. It was incorrectly using `InterpolateAllocate` to allow array for
   cell data. Cell data is not interpolated, but copied over. Fixed
2. It was not passing cell global ids, is present. There's no reason
   not to copy them as long as they are not tagged as global ids in the
parent 45a5778f
......@@ -46,7 +46,8 @@ int vtkCompositeDataProbeFilter::FillInputPortInformation(
// We have to save vtkDataObject since this filter can work on vtkDataSet
// and vtkCompositeDataSet consisting of vtkDataSet leaf nodes.
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject");
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkCompositeDataSet");
info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
......@@ -297,7 +297,10 @@ void vtkProbeFilter::InitializeForProbing(vtkDataSet* input,
outPD->InterpolateAllocate((*this->PointList), numPts, numPts);
vtkCellData* tempCellData = vtkCellData::New();
tempCellData->InterpolateAllocate( (*this->CellList), numPts, numPts);
// We're okay with copying global ids for cells. we just don't flag them as
// such.
tempCellData->CopyAllocate((*this->CellList), numPts, numPts);
int numCellArrays = tempCellData->GetNumberOfArrays();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment