------------------------------------------------------------------------------
| 424 | |
| 425 | //------------------------------------------------------------------------------ |
| 426 | inline void vtkAbstractGridConnectivity::RegisterFieldData( |
| 427 | int gridID, vtkPointData* PointData, vtkCellData* CellData) |
| 428 | { |
| 429 | // Sanity check |
| 430 | assert("pre: GridID is out-of-bound GridPointData" && (gridID >= 0) && |
| 431 | (gridID < static_cast<int>(this->NumberOfGrids))); |
| 432 | assert("pre: GridPointData has not been allocated!" && |
| 433 | (this->GridPointData.size() == this->NumberOfGrids)); |
| 434 | assert("pre: GridCellData has not been allocated!" && |
| 435 | (this->GridCellData.size() == this->NumberOfGrids)); |
| 436 | |
| 437 | // Note: The size of these vectors is allocated in SetNumberOfGrids |
| 438 | if (PointData != nullptr) |
| 439 | { |
| 440 | assert("pre: GridPointData[gridID] must be nullptr" && this->GridPointData[gridID] == nullptr); |
| 441 | this->GridPointData[gridID] = vtkPointData::New(); |
| 442 | this->GridPointData[gridID]->ShallowCopy(PointData); |
| 443 | } |
| 444 | else |
| 445 | { |
| 446 | this->GridPointData[gridID] = nullptr; |
| 447 | } |
| 448 | |
| 449 | if (CellData != nullptr) |
| 450 | { |
| 451 | assert("pre: GridCellData[gridID] must be nullptr" && this->GridCellData[gridID] == nullptr); |
| 452 | this->GridCellData[gridID] = vtkCellData::New(); |
| 453 | this->GridCellData[gridID]->ShallowCopy(CellData); |
| 454 | } |
| 455 | else |
| 456 | { |
| 457 | this->GridCellData[gridID] = nullptr; |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | //------------------------------------------------------------------------------ |
| 462 | inline void vtkAbstractGridConnectivity::RegisterGridNodes(int gridID, vtkPoints* nodes) |
no test coverage detected