------------------------------------------------------------------------------
| 49 | |
| 50 | //------------------------------------------------------------------------------ |
| 51 | int vtkHyperTreeGridGenerateProcessIds::RequestData(vtkInformation* vtkNotUsed(request), |
| 52 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 53 | { |
| 54 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 55 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 56 | |
| 57 | vtkHyperTreeGrid* inputHTG = vtkHyperTreeGrid::GetData(inInfo); |
| 58 | vtkHyperTreeGrid* outputHTG = vtkHyperTreeGrid::GetData(outInfo); |
| 59 | |
| 60 | if (!inputHTG || !outputHTG) |
| 61 | { |
| 62 | vtkErrorMacro(<< "Unable to retrieve input / output as supported type."); |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | vtkIdType piece = |
| 67 | this->Controller ? static_cast<vtkIdType>(this->Controller->GetLocalProcessId()) : 0; |
| 68 | outputHTG->ShallowCopy(inputHTG); |
| 69 | |
| 70 | vtkIdType numberOfCells = inputHTG->GetNumberOfCells(); |
| 71 | auto processIds = ::GenerateProcessIds(piece, numberOfCells); |
| 72 | processIds->SetName(PROCESS_ID_ARR_NAME); |
| 73 | outputHTG->GetCellData()->SetProcessIds(processIds); |
| 74 | |
| 75 | return 1; |
| 76 | } |
| 77 | |
| 78 | //------------------------------------------------------------------------------ |
| 79 | vtkMultiProcessController* vtkHyperTreeGridGenerateProcessIds::GetController() |
nothing calls this directly
no test coverage detected