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

Method RedistributeDataSet

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:504–531  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

502
503//------------------------------------------------------------------------------
504vtkUnstructuredGrid* vtkPDistributedDataFilter::RedistributeDataSet(
505 vtkDataSet* set, vtkDataSet* input, int filterOutDuplicateCells)
506{
507 TimeLog timer("RedistributeDataSet", this->Timing);
508 (void)timer;
509
510 // Create global cell ids before redistributing data. These
511 // will be necessary if we need ghost cells later on.
512
513 vtkDataSet* inputPlus = set;
514
515 if ((this->GhostLevel > 0) && (this->GetGlobalElementIdArray(set) == nullptr))
516 {
517 if (set == input)
518 {
519 inputPlus = set->NewInstance();
520 inputPlus->ShallowCopy(set);
521 }
522
523 this->AssignGlobalElementIds(inputPlus);
524 }
525
526 // next call deletes inputPlus at the earliest opportunity
527
528 vtkUnstructuredGrid* finalGrid = this->MPIRedistribute(inputPlus, input, filterOutDuplicateCells);
529
530 return finalGrid;
531}
532
533//------------------------------------------------------------------------------
534int vtkPDistributedDataFilter::PartitionDataAndAssignToProcesses(vtkDataSet* set)

Callers 1

RequestDataInternalMethod · 0.95

Calls 5

MPIRedistributeMethod · 0.95
NewInstanceMethod · 0.45
ShallowCopyMethod · 0.45

Tested by

no test coverage detected