| 373 | } |
| 374 | |
| 375 | void 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 | |
| 409 | void vtkExtractUnstructuredGridPiece::AddGhostLevel( |
| 410 | vtkUnstructuredGrid* input, vtkIntArray* cellTags, int level) |
no test coverage detected