MCPcopy Create free account
hub / github.com/Kitware/VTK / RequestData

Method RequestData

Filters/Parallel/vtkHyperTreeGridGenerateProcessIds.cxx:51–76  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

49
50//------------------------------------------------------------------------------
51int 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//------------------------------------------------------------------------------
79vtkMultiProcessController* vtkHyperTreeGridGenerateProcessIds::GetController()

Callers

nothing calls this directly

Calls 9

GenerateProcessIdsFunction · 0.85
GetInformationObjectMethod · 0.80
SetProcessIdsMethod · 0.80
GetDataFunction · 0.50
GetLocalProcessIdMethod · 0.45
ShallowCopyMethod · 0.45
GetNumberOfCellsMethod · 0.45
SetNameMethod · 0.45
GetCellDataMethod · 0.45

Tested by

no test coverage detected