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

Method AddFirstGhostLevel

Filters/Parallel/vtkExtractUnstructuredGridPiece.cxx:375–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void vtkExtractUnstructuredGridPiece::AddFirstGhostLevel(
376 vtkUnstructuredGrid* input, vtkIntArray* cellTags, int piece, int numPieces)
377{
378 const vtkIdType numCells = input->GetNumberOfCells();
379 vtkNew<vtkIdList> cellPointIds;
380 vtkNew<vtkIdList> neighborIds;
381
382 // for level 1 we have an optimal implementation
383 // that can compute the subset of cells we need to check
384 vtkIdType minCell = 0;
385 vtkIdType maxCell = 0;
386 determineMinMax(piece, numPieces, numCells, minCell, maxCell);
387 for (vtkIdType idx = minCell; idx < maxCell; ++idx)
388 {
389 input->GetCellPoints(idx, cellPointIds);
390 const vtkIdType numCellPoints = cellPointIds->GetNumberOfIds();
391 for (vtkIdType j = 0; j < numCellPoints; j++)
392 {
393 const vtkIdType pointId = cellPointIds->GetId(j);
394 input->GetPointCells(pointId, neighborIds);
395
396 const vtkIdType numNeighbors = neighborIds->GetNumberOfIds();
397 for (vtkIdType k = 0; k < numNeighbors; ++k)
398 {
399 const vtkIdType neighborCellId = neighborIds->GetId(k);
400 if (cellTags->GetValue(neighborCellId) == -1)
401 {
402 cellTags->SetValue(neighborCellId, 1);
403 }
404 }
405 }
406 }
407}
408
409void vtkExtractUnstructuredGridPiece::AddGhostLevel(
410 vtkUnstructuredGrid* input, vtkIntArray* cellTags, int level)

Callers 1

RequestDataMethod · 0.95

Calls 8

determineMinMaxFunction · 0.85
GetNumberOfCellsMethod · 0.45
GetCellPointsMethod · 0.45
GetNumberOfIdsMethod · 0.45
GetIdMethod · 0.45
GetPointCellsMethod · 0.45
GetValueMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected