MCPcopy Create free account
hub / github.com/Kitware/VTK / ExchangeGhostData

Method ExchangeGhostData

Filters/ParallelGeometry/vtkPStructuredGridConnectivity.cxx:650–685  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

648
649//------------------------------------------------------------------------------
650void 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//------------------------------------------------------------------------------
688void vtkPStructuredGridConnectivity::SerializeGhostPoints(

Callers 1

CreateGhostLayersMethod · 0.95

Calls 8

ExchangeGhostDataInitMethod · 0.95
CommunicateGhostDataMethod · 0.95
ExchangeGhostDataPostMethod · 0.95
assertFunction · 0.50
resizeMethod · 0.45
GetNumberOfNeighborsMethod · 0.45
BarrierMethod · 0.45

Tested by

no test coverage detected