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

Method RequestData

Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx:132–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132int vtkExtractUnstructuredGridPiece::RequestData(vtkInformation* vtkNotUsed(request),
133 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
134{
135 // get the info objects
136 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
137 vtkInformation* outInfo = outputVector->GetInformationObject(0);
138
139 // get the input and output
140 vtkUnstructuredGrid* input =
141 vtkUnstructuredGrid::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
142 vtkUnstructuredGrid* output =
143 vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
144
145 vtkPointData *pd = input->GetPointData(), *outPD = output->GetPointData();
146 vtkCellData *cd = input->GetCellData(), *outCD = output->GetCellData();
147 int cellType;
148 vtkIntArray* cellTags;
149 int ghostLevel, piece, numPieces;
150 vtkIdType newCellId;
151 vtkIdList* pointMap;
152 vtkIdList* newCellPts = vtkIdList::New();
153 vtkPoints* newPoints;
154 vtkUnsignedCharArray* cellGhostLevels = nullptr;
155 vtkIdList* pointOwnership = nullptr;
156 vtkUnsignedCharArray* pointGhostLevels = nullptr;
157 vtkIdType i, ptId, newId, numPts, numCells;
158 vtkIdType* faceStream;
159 vtkIdType numFaces;
160 vtkIdType numFacePts;
161 double* x;
162 vtkNew<vtkIdList> faceStreamList;
163
164 // Pipeline update piece will tell us what to generate.
165 ghostLevel = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());
166 piece = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());
167 numPieces = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());
168
169 outPD->CopyAllocate(pd);
170 outCD->CopyAllocate(cd);
171
172 numPts = input->GetNumberOfPoints();
173 numCells = input->GetNumberOfCells();
174
175 if (ghostLevel > 0 && this->CreateGhostCells)
176 {
177 cellGhostLevels = vtkUnsignedCharArray::New();
178 cellGhostLevels->Allocate(numCells);
179 // We may want to create point ghost levels even
180 // if there are no ghost cells. Since it cost extra,
181 // and no filter really uses it, and the filter did not
182 // create a point ghost level array for this case before,
183 // I will leave it the way it was.
184 pointOwnership = vtkIdList::New();
185 pointOwnership->Allocate(numPts);
186 pointGhostLevels = vtkUnsignedCharArray::New();
187 pointGhostLevels->Allocate(numPts);
188 }
189

Callers

nothing calls this directly

Calls 15

ComputeCellTagsMethod · 0.95
AddFirstGhostLevelMethod · 0.95
AddGhostLevelMethod · 0.95
TakeFunction · 0.85
GhostArrayNameFunction · 0.85
GetInformationObjectMethod · 0.80
SetNumberOfIdsMethod · 0.80
GoToNextCellMethod · 0.80
InsertIdMethod · 0.80
InsertNextIdMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50

Tested by

no test coverage detected