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

Method ExchangeMergeSubGrids

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:1198–1242  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1196
1197//------------------------------------------------------------------------------
1198vtkUnstructuredGrid* vtkPDistributedDataFilter::ExchangeMergeSubGrids(vtkIdList** cellIds,
1199 int deleteCellIds, vtkDataSet* myGrid, int deleteMyGrid, int filterOutDuplicateCells,
1200 int ghostCellFlag, int tag)
1201{
1202 TimeLog timer("ExchangeMergeSubGrids(1)", this->Timing);
1203 (void)timer;
1204
1205 int nprocs = this->NumProcesses;
1206
1207 int* numLists = new int[nprocs];
1208
1209 vtkIdList*** listOfLists = new vtkIdList**[nprocs];
1210
1211 for (int i = 0; i < nprocs; i++)
1212 {
1213 if (cellIds[i] == nullptr)
1214 {
1215 numLists[i] = 0;
1216 }
1217 else
1218 {
1219 numLists[i] = 1;
1220 }
1221
1222 listOfLists[i] = &cellIds[i];
1223 }
1224
1225 vtkUnstructuredGrid* grid = nullptr;
1226
1227 if (this->UseMinimalMemory)
1228 {
1229 grid = this->ExchangeMergeSubGridsLean(listOfLists, numLists, deleteCellIds, myGrid,
1230 deleteMyGrid, filterOutDuplicateCells, ghostCellFlag, tag);
1231 }
1232 else
1233 {
1234 grid = this->ExchangeMergeSubGridsFast(listOfLists, numLists, deleteCellIds, myGrid,
1235 deleteMyGrid, filterOutDuplicateCells, ghostCellFlag, tag);
1236 }
1237
1238 delete[] numLists;
1239 delete[] listOfLists;
1240
1241 return grid;
1242}
1243
1244//------------------------------------------------------------------------------
1245vtkUnstructuredGrid* vtkPDistributedDataFilter::ExchangeMergeSubGrids(vtkIdList*** cellIds,

Calls 2

Tested by 1