------------------------------------------------------------------------------
| 840 | |
| 841 | //------------------------------------------------------------------------------ |
| 842 | void vtkStructuredGridConnectivity::SetNeighbors( |
| 843 | int i, int j, int i2jOrientation[3], int j2iOrientation[3], int overlapExtent[6]) |
| 844 | { |
| 845 | vtkStructuredNeighbor Ni2j(j, overlapExtent, i2jOrientation); |
| 846 | vtkStructuredNeighbor Nj2i(i, overlapExtent, j2iOrientation); |
| 847 | |
| 848 | // STEP 0: Setup i-to-j |
| 849 | this->Neighbors[i].push_back(Ni2j); |
| 850 | int i2jNeiIdx = static_cast<int>(this->Neighbors[i].size()) - 1; |
| 851 | std::pair<int, int> i2jPair = std::make_pair(i, j); |
| 852 | assert("ERROR: Duplicate neighboring pair!" && |
| 853 | this->NeighborPair2NeighborListIndex.find(i2jPair) == |
| 854 | this->NeighborPair2NeighborListIndex.end()); |
| 855 | this->NeighborPair2NeighborListIndex[i2jPair] = i2jNeiIdx; |
| 856 | |
| 857 | // STEP 1: Setup j-to-i |
| 858 | this->Neighbors[j].push_back(Nj2i); |
| 859 | int j2iNeiIdx = static_cast<int>(this->Neighbors[j].size()) - 1; |
| 860 | std::pair<int, int> j2iPair = std::make_pair(j, i); |
| 861 | assert("ERROR: Duplicate neighboring pair!" && |
| 862 | this->NeighborPair2NeighborListIndex.find(j2iPair) == |
| 863 | this->NeighborPair2NeighborListIndex.end()); |
| 864 | this->NeighborPair2NeighborListIndex[j2iPair] = j2iNeiIdx; |
| 865 | } |
| 866 | |
| 867 | //------------------------------------------------------------------------------ |
| 868 | void vtkStructuredGridConnectivity::PrintExtent(int ex[6]) |