------------------------------------------------------------------------------
| 648 | |
| 649 | //------------------------------------------------------------------------------ |
| 650 | void vtkPStructuredGridConnectivity::ExchangeGhostData() |
| 651 | { |
| 652 | assert("pre: Instance has not been initialized!" && this->Initialized); |
| 653 | |
| 654 | // STEP 0: |
| 655 | this->InitializeMessageCounters(); |
| 656 | |
| 657 | // STEP 1: Allocate internal data-structures |
| 658 | this->RemotePoints.resize(this->NumberOfGrids); |
| 659 | this->RemotePointData.resize(this->NumberOfGrids); |
| 660 | this->RemoteCellData.resize(this->NumberOfGrids); |
| 661 | for (unsigned int i = 0; i < this->NumberOfGrids; ++i) |
| 662 | { |
| 663 | this->RemotePoints[i].resize(this->GetNumberOfNeighbors(i), nullptr); |
| 664 | this->RemotePointData[i].resize(this->GetNumberOfNeighbors(i), nullptr); |
| 665 | this->RemoteCellData[i].resize(this->GetNumberOfNeighbors(i), nullptr); |
| 666 | } |
| 667 | |
| 668 | this->SendBuffers.resize(this->NumberOfGrids); |
| 669 | this->RcvBuffers.resize(this->NumberOfGrids); |
| 670 | this->SendBufferSizes.resize(this->NumberOfGrids); |
| 671 | this->RcvBufferSizes.resize(this->NumberOfGrids); |
| 672 | |
| 673 | // STEP 2: Serialize the ghost data and exchange buffer sizes |
| 674 | this->ExchangeGhostDataInit(); |
| 675 | |
| 676 | // STEP 3: Allocate rcv buffers and perform non-blocking communication |
| 677 | this->CommunicateGhostData(); |
| 678 | |
| 679 | // STEP 4: Block until communication is complete and raw rcv buffers are |
| 680 | // de-serialized into the VTK data-structures. |
| 681 | this->ExchangeGhostDataPost(); |
| 682 | |
| 683 | // STEP 5: Synchronize with all processes |
| 684 | this->Controller->Barrier(); |
| 685 | } |
| 686 | |
| 687 | //------------------------------------------------------------------------------ |
| 688 | void vtkPStructuredGridConnectivity::SerializeGhostPoints( |
no test coverage detected