------------------------------------------------------------------------------
| 815 | |
| 816 | //------------------------------------------------------------------------------ |
| 817 | void vtkAMRResampleFilter::ExtractRegion( |
| 818 | vtkOverlappingAMR* amrds, vtkMultiBlockDataSet* mbds, vtkOverlappingAMR* vtkNotUsed(metadata)) |
| 819 | { |
| 820 | |
| 821 | assert("pre: input AMR data-structure is nullptr" && (amrds != nullptr)); |
| 822 | assert("pre: resampled grid should not be nullptr" && (mbds != nullptr)); |
| 823 | |
| 824 | // std::cout << "NumBlocks: " << this->ROI->GetNumberOfBlocks() << std::endl; |
| 825 | // std::cout << "NumProcs: " << this->Controller->GetNumberOfProcesses() << std::endl; |
| 826 | // std::cout.flush(); |
| 827 | |
| 828 | assert("pre: NumProcs must be less than or equal to NumBlocks" && |
| 829 | (!this->Controller || |
| 830 | (static_cast<int>(this->ROI->GetNumberOfBlocks()) <= |
| 831 | this->Controller->GetNumberOfProcesses()))); |
| 832 | |
| 833 | mbds->SetNumberOfBlocks(this->ROI->GetNumberOfBlocks()); |
| 834 | for (unsigned int block = 0; block < this->ROI->GetNumberOfBlocks(); ++block) |
| 835 | { |
| 836 | if (this->CheckAbort()) |
| 837 | { |
| 838 | break; |
| 839 | } |
| 840 | if (this->IsRegionMine(block)) |
| 841 | { |
| 842 | vtkUniformGrid* grid = vtkUniformGrid::New(); |
| 843 | grid->ShallowCopy(this->ROI->GetBlock(block)); |
| 844 | this->TransferSolution(grid, amrds); |
| 845 | mbds->SetBlock(block, grid); |
| 846 | grid->Delete(); |
| 847 | } |
| 848 | else |
| 849 | { |
| 850 | mbds->SetBlock(block, nullptr); |
| 851 | } |
| 852 | } // END for all blocks |
| 853 | } |
| 854 | |
| 855 | //------------------------------------------------------------------------------ |
| 856 | void vtkAMRResampleFilter::ComputeAMRBlocksToLoad(vtkOverlappingAMR* metadata) |
no test coverage detected