------------------------------------------------------------------------------
| 244 | |
| 245 | //------------------------------------------------------------------------------ |
| 246 | void vtkStructuredGridConnectivity::ComputeNeighbors() |
| 247 | { |
| 248 | // STEP 0: Acquire data description, i.e., determine how the structured data |
| 249 | // is laid out, e.g., is it volumetric or 2-D along some plane, XY, XZ, or YZ. |
| 250 | this->AcquireDataDescription(); |
| 251 | if (this->DataDescription == vtkStructuredData::VTK_STRUCTURED_EMPTY || |
| 252 | this->DataDescription == vtkStructuredData::VTK_STRUCTURED_SINGLE_POINT) |
| 253 | { |
| 254 | return; |
| 255 | } |
| 256 | |
| 257 | // STEP 1: Establish neighbors based on the structured extents. |
| 258 | for (unsigned int i = 0; i < this->NumberOfGrids; ++i) |
| 259 | { |
| 260 | this->SetBlockTopology(i); |
| 261 | for (unsigned int j = i + 1; j < this->NumberOfGrids; ++j) |
| 262 | { |
| 263 | this->EstablishNeighbors(i, j); |
| 264 | } // END for all j |
| 265 | } // END for all i |
| 266 | |
| 267 | // STEP 2: Fill the ghost arrays |
| 268 | for (unsigned int i = 0; i < this->NumberOfGrids; ++i) |
| 269 | { |
| 270 | // NOTE: typically remote grids have nullptr ghost arrays, by this approach |
| 271 | // ComputeNeighbors() can be called transparently from |
| 272 | // vtkPStructuredGridConnectivity without any modification. |
| 273 | if (this->GridPointGhostArrays[i] != nullptr) |
| 274 | { |
| 275 | this->FillGhostArrays(i, this->GridPointGhostArrays[i], this->GridCellGhostArrays[i]); |
| 276 | } |
| 277 | } // END for all grids |
| 278 | } |
| 279 | |
| 280 | //------------------------------------------------------------------------------ |
| 281 | void vtkStructuredGridConnectivity::SearchNeighbors( |