| 3277 | } |
| 3278 | |
| 3279 | int vtkPKdTree::ViewOrderAllProcessesInDirection(const double dop[3], vtkIntArray* orderedList) |
| 3280 | { |
| 3281 | assert("pre: orderedList_exists" && orderedList != nullptr); |
| 3282 | |
| 3283 | vtkIntArray* regionList = vtkIntArray::New(); |
| 3284 | |
| 3285 | this->ViewOrderAllRegionsInDirection(dop, regionList); |
| 3286 | |
| 3287 | orderedList->SetNumberOfValues(this->NumProcesses); |
| 3288 | |
| 3289 | int nextId = 0; |
| 3290 | |
| 3291 | // if regions were not assigned contiguously, this |
| 3292 | // produces the wrong result |
| 3293 | |
| 3294 | for (int r = 0; r < this->GetNumberOfRegions();) |
| 3295 | { |
| 3296 | int procId = this->RegionAssignmentMap[regionList->GetValue(r)]; |
| 3297 | |
| 3298 | orderedList->SetValue(nextId++, procId); |
| 3299 | |
| 3300 | int nregions = this->NumRegionsAssigned[procId]; |
| 3301 | |
| 3302 | r += nregions; |
| 3303 | } |
| 3304 | |
| 3305 | regionList->Delete(); |
| 3306 | |
| 3307 | return this->NumProcesses; |
| 3308 | } |
| 3309 | |
| 3310 | int vtkPKdTree::ViewOrderAllProcessesFromPosition(const double pos[3], vtkIntArray* orderedList) |
| 3311 | { |
no test coverage detected