------------------------------------------------------------------------------
| 601 | |
| 602 | //------------------------------------------------------------------------------ |
| 603 | inline void vtkStructuredGridConnectivity::GetGhostedExtent( |
| 604 | int* ghostedExtent, int GridExtent[6], int minIdx, int maxIdx, int N) |
| 605 | { |
| 606 | assert("pre: Number of ghost layers must be N >= 1" && (N >= 1)); |
| 607 | assert("pre: ghosted extent pointer is nullptr" && ghostedExtent != nullptr); |
| 608 | |
| 609 | ghostedExtent[minIdx] = GridExtent[minIdx] - N; |
| 610 | ghostedExtent[maxIdx] = GridExtent[maxIdx] + N; |
| 611 | |
| 612 | // Clamp the ghosted extent to be within the WholeExtent |
| 613 | ghostedExtent[minIdx] = (ghostedExtent[minIdx] < this->WholeExtent[minIdx]) |
| 614 | ? this->WholeExtent[minIdx] |
| 615 | : ghostedExtent[minIdx]; |
| 616 | ghostedExtent[maxIdx] = (ghostedExtent[maxIdx] > this->WholeExtent[maxIdx]) |
| 617 | ? this->WholeExtent[maxIdx] |
| 618 | : ghostedExtent[maxIdx]; |
| 619 | } |
| 620 | |
| 621 | //------------------------------------------------------------------------------ |
| 622 | inline void vtkStructuredGridConnectivity::SetGhostedGridExtent(int gridID, int ext[6]) |