Commit 18dbc145 authored by Joachim Pouderoux's avatar Joachim Pouderoux Committed by Kitware Robot

Merge topic 'FixPUnstructuredGridGhostCellsGenerator'

36a816d1 Fix PUnstructuredGridGhostCellsGenerator so it does not modify input
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1024
parents 78f9d207 36a816d1
Pipeline #2696 running with stage
......@@ -216,9 +216,14 @@ int vtkPUnstructuredGridGhostCellsGenerator::RequestData(
vtkPointData *inputPD = input->GetPointData();
this->Internals->InputGlobalPointIds = inputPD->GetGlobalIds();
vtkUnstructuredGridBase* inputGridCopy = NULL;
if (!this->Internals->InputGlobalPointIds)
{
inputGridCopy = input->NewInstance();
inputGridCopy->ShallowCopy(input);
this->Internals->Input = inputGridCopy;
inputPD = inputGridCopy->GetPointData();
this->Internals->InputGlobalPointIds =
inputPD->GetArray(this->GlobalPointIdsArrayName);
inputPD->SetGlobalIds(this->Internals->InputGlobalPointIds);
......@@ -246,7 +251,11 @@ int vtkPUnstructuredGridGhostCellsGenerator::RequestData(
this->Controller->Barrier();
delete this->Internals;
this->Internals = 0;
this->Internals = NULL;
if (inputGridCopy)
{
inputGridCopy->Delete();
}
return 1;
}
......
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