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

Method GrowGrid

Filters/ParallelMPI/vtkStructuredImplicitConnectivity.cxx:1457–1485  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1455
1456//------------------------------------------------------------------------------
1457void vtkStructuredImplicitConnectivity::GrowGrid(int dim)
1458{
1459 assert("pre: dimension index out-of-bounds!" && (dim >= 0) && (dim <= 2));
1460 assert("pre: input grid is nullptr!" && this->InputGrid != nullptr);
1461
1462 // STEP 0: Allocate buffers & associated data-structures
1463 this->AllocateBuffers(dim);
1464 assert("pre: CommManager is nullptr!" && (this->CommManager != nullptr));
1465
1466 // STEP 1: Exchange data
1467 this->CommManager->Exchange(this->Controller);
1468
1469 // STEP 4: Unpack data to output grid
1470 size_t nNeis = this->InputGrid->Neighbors.size();
1471 for (size_t nei = 0; nei < nNeis; ++nei)
1472 {
1473 vtk::detail::ImplicitNeighbor* neiPtr = &(this->InputGrid->Neighbors)[nei];
1474 int orient = neiPtr->Orientation[dim];
1475 int neiRank = neiPtr->Rank;
1476
1477 if (orient == vtk::detail::IntervalsConnect::IMPLICIT_HI)
1478 {
1479 unsigned char* buffer = this->CommManager->GetRcvBuffer(neiRank);
1480 unsigned int size = this->CommManager->GetRcvBufferSize(neiRank);
1481 this->UnPackData(buffer, size);
1482 } // END if rcv'ed data
1483
1484 } // END for all neighbors
1485}
1486
1487//------------------------------------------------------------------------------
1488void vtkStructuredImplicitConnectivity::ExchangeData()

Callers 1

ExchangeDataMethod · 0.95

Calls 7

AllocateBuffersMethod · 0.95
UnPackDataMethod · 0.95
GetRcvBufferMethod · 0.80
GetRcvBufferSizeMethod · 0.80
assertFunction · 0.50
ExchangeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected