------------------------------------------------------------------------------
| 999 | |
| 1000 | //------------------------------------------------------------------------------ |
| 1001 | void vtkStructuredGridConnectivity::CreateGhostedExtent(int gridID, int N) |
| 1002 | { |
| 1003 | assert("pre: gridID is out-of-bounds!" && (gridID >= 0) && |
| 1004 | (gridID < static_cast<int>(this->NumberOfGrids))); |
| 1005 | assert("pre: ghosted-extents vector has not been allocated" && |
| 1006 | (this->NumberOfGrids == this->GhostedExtents.size() / 6)); |
| 1007 | assert( |
| 1008 | "pre: Number of ghost-layers requested should not be 0" && (this->NumberOfGhostLayers > 0)); |
| 1009 | |
| 1010 | int ext[6]; |
| 1011 | this->GetGridExtent(gridID, ext); |
| 1012 | this->SetGhostedGridExtent(gridID, ext); |
| 1013 | |
| 1014 | int* ghostedExtent = &this->GhostedExtents[gridID * 6]; |
| 1015 | |
| 1016 | switch (this->DataDescription) |
| 1017 | { |
| 1018 | case vtkStructuredData::VTK_STRUCTURED_X_LINE: |
| 1019 | this->GetGhostedExtent(ghostedExtent, ext, 0, 1, N); |
| 1020 | break; |
| 1021 | case vtkStructuredData::VTK_STRUCTURED_Y_LINE: |
| 1022 | this->GetGhostedExtent(ghostedExtent, ext, 2, 3, N); |
| 1023 | break; |
| 1024 | case vtkStructuredData::VTK_STRUCTURED_Z_LINE: |
| 1025 | this->GetGhostedExtent(ghostedExtent, ext, 4, 5, N); |
| 1026 | break; |
| 1027 | case vtkStructuredData::VTK_STRUCTURED_XY_PLANE: |
| 1028 | this->GetGhostedExtent(ghostedExtent, ext, 0, 1, N); |
| 1029 | this->GetGhostedExtent(ghostedExtent, ext, 2, 3, N); |
| 1030 | break; |
| 1031 | case vtkStructuredData::VTK_STRUCTURED_YZ_PLANE: |
| 1032 | this->GetGhostedExtent(ghostedExtent, ext, 2, 3, N); |
| 1033 | this->GetGhostedExtent(ghostedExtent, ext, 4, 5, N); |
| 1034 | break; |
| 1035 | case vtkStructuredData::VTK_STRUCTURED_XZ_PLANE: |
| 1036 | this->GetGhostedExtent(ghostedExtent, ext, 0, 1, N); |
| 1037 | this->GetGhostedExtent(ghostedExtent, ext, 4, 5, N); |
| 1038 | break; |
| 1039 | case vtkStructuredData::VTK_STRUCTURED_XYZ_GRID: |
| 1040 | this->GetGhostedExtent(ghostedExtent, ext, 0, 1, N); |
| 1041 | this->GetGhostedExtent(ghostedExtent, ext, 2, 3, N); |
| 1042 | this->GetGhostedExtent(ghostedExtent, ext, 4, 5, N); |
| 1043 | break; |
| 1044 | default: |
| 1045 | std::cout << "Data description is: " << this->DataDescription << "\n"; |
| 1046 | std::cout.flush(); |
| 1047 | assert("pre: Undefined data-description!" && false); |
| 1048 | } // END switch |
| 1049 | } |
| 1050 | |
| 1051 | //------------------------------------------------------------------------------ |
| 1052 | void vtkStructuredGridConnectivity::CreateGhostedMaskArrays(int gridID) |
no test coverage detected