Skip to content
Snippets Groups Projects
Commit 6712859d authored by Dan Lipsa's avatar Dan Lipsa Committed by Kitware Robot
Browse files

Merge topic 'resample-15397'


c0f2e892 BUG #15397: vtkPProbeFilter crash when geometry dataset is distributed.

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: default avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !605
parents b392181d c0f2e892
Branches
Tags
No related merge requests found
......@@ -100,17 +100,28 @@ int vtkPProbeFilter::RequestData(vtkInformation *request,
// and copy array values from all the pointIds which have the mask array
// bit set to 1.
vtkIdType numRemotePoints = remoteProbeOutput->GetNumberOfPoints();
for (pointId=0; (pointId < numRemotePoints) && maskArray; pointId++)
if (output->GetNumberOfCells() != remoteProbeOutput->GetNumberOfCells() ||
output->GetNumberOfPoints() != remoteProbeOutput->GetNumberOfPoints())
{
if (maskArray->GetValue(pointId) == 1)
vtkErrorMacro("vtkPProbeFilter assumes the whole geometry dataset "
"(which determines positions to probe) is available "
"on all nodes, however nodes 0 is different than node "
<< i);
}
else if (maskArray)
{
for (pointId=0; pointId < numRemotePoints; ++pointId)
{
for (k = 0; k < pointData->GetNumberOfArrays(); k++)
if (maskArray->GetValue(pointId) == 1)
{
vtkAbstractArray *oaa = pointData->GetArray(k);
vtkAbstractArray *raa = remotePointData->GetArray(oaa->GetName());
if (raa != NULL)
for (k = 0; k < pointData->GetNumberOfArrays(); ++k)
{
oaa->SetTuple(pointId, pointId, raa);
vtkAbstractArray *oaa = pointData->GetArray(k);
vtkAbstractArray *raa = remotePointData->GetArray(oaa->GetName());
if (raa != NULL)
{
oaa->SetTuple(pointId, pointId, raa);
}
}
}
}
......
......@@ -14,6 +14,9 @@
=========================================================================*/
// .NAME vtkPProbeFilter - probe dataset in parallel
// .SECTION Description
// This filter works correctly only if the whole geometry dataset
// (that specify the point locations used to probe input) is available on all
// nodes.
#ifndef vtkPProbeFilter_h
#define vtkPProbeFilter_h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment