------------------------------------------------------------------------------
| 1470 | |
| 1471 | //------------------------------------------------------------------------------ |
| 1472 | bool vtkUnstructuredGrid::AllocateExact(vtkIdType numCells, vtkIdType connectivitySize) |
| 1473 | { |
| 1474 | if (numCells < 1) |
| 1475 | { |
| 1476 | numCells = 1024; |
| 1477 | } |
| 1478 | if (connectivitySize < 1) |
| 1479 | { |
| 1480 | connectivitySize = 1024; |
| 1481 | } |
| 1482 | |
| 1483 | this->DistinctCellTypesUpdateMTime = 0; |
| 1484 | this->DistinctCellTypes = vtkSmartPointer<vtkCellTypes>::New(); |
| 1485 | this->Types = vtkSmartPointer<vtkUnsignedCharArray>::New(); |
| 1486 | this->Connectivity = vtkSmartPointer<vtkCellArray>::New(); |
| 1487 | |
| 1488 | bool result = this->Connectivity->AllocateExact(numCells, connectivitySize); |
| 1489 | if (result) |
| 1490 | { |
| 1491 | result = this->Types->Allocate(numCells) != 0; |
| 1492 | } |
| 1493 | if (result) |
| 1494 | { |
| 1495 | result = this->DistinctCellTypes->Allocate(VTK_NUMBER_OF_CELL_TYPES) != 0; |
| 1496 | } |
| 1497 | |
| 1498 | return result; |
| 1499 | } |
| 1500 | |
| 1501 | //---------------------------------------------------------------------------- |
| 1502 | // Supporting functions for IsCellBoundary() and GetCellNeighbors(). These |
no test coverage detected