------------------------------------------------------------------------------
| 676 | |
| 677 | //------------------------------------------------------------------------------ |
| 678 | void vtkPDistributedDataFilter::SingleProcessExecute(vtkDataSet* input, vtkUnstructuredGrid* output) |
| 679 | { |
| 680 | TimeLog timer("SingleProcessExecute", this->Timing); |
| 681 | (void)timer; |
| 682 | |
| 683 | vtkDebugMacro(<< "vtkPDistributedDataFilter::SingleProcessExecute()"); |
| 684 | |
| 685 | // we run the input through vtkMergeCells which will remove |
| 686 | // duplicate points |
| 687 | |
| 688 | vtkDataSet* tmp = input->NewInstance(); |
| 689 | tmp->ShallowCopy(input); |
| 690 | |
| 691 | float tolerance = 0.0; |
| 692 | |
| 693 | if (this->RetainKdtree) |
| 694 | { |
| 695 | if (this->Kdtree == nullptr) |
| 696 | { |
| 697 | this->Kdtree = vtkPKdTree::New(); |
| 698 | if (this->UserCuts) |
| 699 | { |
| 700 | this->Kdtree->SetCuts(this->UserCuts); |
| 701 | } |
| 702 | this->Kdtree->SetTiming(this->GetTiming()); |
| 703 | } |
| 704 | |
| 705 | this->Kdtree->SetDataSet(tmp); |
| 706 | this->Kdtree->BuildLocator(); |
| 707 | tolerance = (float)this->Kdtree->GetFudgeFactor(); |
| 708 | this->Kdtree->CreateGlobalDataArrayBounds(); |
| 709 | } |
| 710 | else if (this->Kdtree) |
| 711 | { |
| 712 | this->Kdtree->Delete(); |
| 713 | this->Kdtree = nullptr; |
| 714 | } |
| 715 | |
| 716 | vtkUnstructuredGrid* clean = |
| 717 | vtkPDistributedDataFilter::MergeGrids(&tmp, 1, DeleteYes, 1, tolerance, 0); |
| 718 | |
| 719 | output->ShallowCopy(clean); |
| 720 | clean->Delete(); |
| 721 | |
| 722 | if (this->GhostLevel > 0) |
| 723 | { |
| 724 | // Add the vtkGhostType arrays. We have the whole |
| 725 | // data set, so all cells are level 0. |
| 726 | |
| 727 | vtkPDistributedDataFilter::AddConstantUnsignedCharPointArray( |
| 728 | output, vtkDataSetAttributes::GhostArrayName(), 0); |
| 729 | vtkPDistributedDataFilter::AddConstantUnsignedCharCellArray( |
| 730 | output, vtkDataSetAttributes::GhostArrayName(), 0); |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | //------------------------------------------------------------------------------ |
| 735 | void vtkPDistributedDataFilter::ComputeMyRegionBounds() |
no test coverage detected