| 1390 | { |
| 1391 | template <class OffsetsT, class ConnectivityT, class CellTypesT> |
| 1392 | void operator()(OffsetsT* offsets, ConnectivityT* conn, CellTypesT* cellTypes, ExtractUG* This, |
| 1393 | vtkIdType beginHash, vtkIdType endHash) |
| 1394 | { |
| 1395 | auto& localData = This->LocalData.Local(); |
| 1396 | auto& faceHashLinks = This->FaceHashLinks; |
| 1397 | auto& faceList = localData.FaceList; |
| 1398 | auto& polys = localData.Polys; |
| 1399 | |
| 1400 | using ValueType = GetAPIType<OffsetsT>; |
| 1401 | const auto connectivityPtr = GetRange(conn).begin(); |
| 1402 | const auto offsetsRange = GetRange(offsets); |
| 1403 | const auto cellTypesRange = vtk::DataArrayValueRange<1, unsigned char>(cellTypes); |
| 1404 | |
| 1405 | vtkIdType localFaceId; |
| 1406 | bool isGhost, isDuplicate; |
| 1407 | const bool isFirst = vtkSMPTools::GetSingleThread(); |
| 1408 | const auto checkAbortInterval = std::min((endHash - beginHash) / 10 + 1, (vtkIdType)1000); |
| 1409 | for (vtkIdType hash = beginHash; hash < endHash; ++hash) |
| 1410 | { |
| 1411 | if (hash % checkAbortInterval == 0) |
| 1412 | { |
| 1413 | if (isFirst) |
| 1414 | { |
| 1415 | This->Self->CheckAbort(); |
| 1416 | } |
| 1417 | if (This->Self->GetAbortOutput()) |
| 1418 | { |
| 1419 | break; |
| 1420 | } |
| 1421 | } |
| 1422 | const auto numberOfFaces = faceHashLinks.GetNumberOfFacesInHash(hash); |
| 1423 | if (numberOfFaces == 0) |
| 1424 | { |
| 1425 | continue; |
| 1426 | } |
| 1427 | const auto cellsOfFacesInHash = faceHashLinks.GetCellIdOfFacesInHash(hash); |
| 1428 | const auto facesOfFacesInHash = faceHashLinks.GetFaceIdOfFacesInHash(hash); |
| 1429 | for (localFaceId = 0; localFaceId < numberOfFaces; ++localFaceId) |
| 1430 | { |
| 1431 | auto& cellId = cellsOfFacesInHash[localFaceId]; |
| 1432 | auto& faceId = facesOfFacesInHash[localFaceId]; |
| 1433 | // ----------------------------------Ghost explanation------------------------------------ |
| 1434 | // Note: This->MASKED_CELL is dynamically set based on RemoveGhostInterfaces. |
| 1435 | // |
| 1436 | // 1) For 0D-1D-2D cells: |
| 1437 | // - When RemoveGhostInterfaces is ON: All ghost types are skipped (dim < 3). |
| 1438 | // - When RemoveGhostInterfaces is OFF: We skip only hidden/refined cells; |
| 1439 | // duplicates are kept as they are considered part of the visible geometry. |
| 1440 | // |
| 1441 | // 2) For 3D cells: |
| 1442 | // - HIDDEN/REFINED Cells: These are ALWAYS skipped. By skipping them, their |
| 1443 | // faces never enter the FaceList to cancel neighbors, which forces the |
| 1444 | // adjacent "real" cells to generate a capping surface. |
| 1445 | // - DUPLICATE Cells: |
| 1446 | // - When RemoveGhostInterfaces is ON: We do NOT skip 3D duplicates. We |
| 1447 | // process them so their faces enter the FaceList and cancel out the |
| 1448 | // faces of local "real" cells, making the partition interface invisible. |
| 1449 | // - When RemoveGhostInterfaces is OFF: We skip 3D duplicates (via isGhost) |
nothing calls this directly
no test coverage detected