46 #include "vtkFiltersParallelModule.h"
65 void PrintTables(ostream& os,
vtkIndent indent);
92 int CreateProcessCellCountData();
102 int CreateGlobalDataArrayBounds();
122 vtkGetMacro(RegionAssignment,
int);
135 int AssignRegions(
int *map,
int numRegions);
142 int AssignRegionsRoundRobin();
152 int AssignRegionsContiguous();
159 {
return &this->RegionAssignmentMap[0]; }
166 {
return static_cast<int>(this->RegionAssignmentMap.size()); }
174 int GetRegionAssignmentList(
int procId,
vtkIntArray *list);
184 void GetAllProcessesBorderingOnPoint(
float x,
float y,
float z,
190 int GetProcessAssignedToRegion(
int regionId);
196 int HasData(
int processId,
int regionId);
202 int GetProcessCellCountForRegion(
int processId,
int regionId);
208 int GetTotalProcessesInRegion(
int regionId);
215 int GetProcessListForRegion(
int regionId,
vtkIntArray *processes);
224 int GetProcessesCellCountForRegion(
int regionId,
int *count,
int len);
230 int GetTotalRegionsForProcess(
int processId);
236 int GetRegionListForProcess(
int processId,
vtkIntArray *regions);
245 int GetRegionsCellCountForProcess(
int ProcessId,
int *count,
int len);
273 vtkIdType GetCellListsForProcessRegions(
int ProcessId,
int set,
277 vtkIdType GetCellListsForProcessRegions(
int ProcessId,
289 int ViewOrderAllProcessesInDirection(
const double directionOfProjection[3],
299 int ViewOrderAllProcessesFromPosition(
const double cameraPosition[3],
310 int GetCellArrayGlobalRange(
const char *
name,
float range[2]);
311 int GetPointArrayGlobalRange(
const char *
name,
float range[2]);
312 int GetCellArrayGlobalRange(
const char *
name,
double range[2]);
313 int GetPointArrayGlobalRange(
const char *
name,
double range[2]);
315 int GetCellArrayGlobalRange(
int arrayIndex,
double range[2]);
316 int GetPointArrayGlobalRange(
int arrayIndex,
double range[2]);
317 int GetCellArrayGlobalRange(
int arrayIndex,
float range[2]);
318 int GetPointArrayGlobalRange(
int arrayIndex,
float range[2]);
325 void SingleProcessBuildLocator();
326 int MultiProcessBuildLocator(
double *bounds);
330 int RegionAssignment;
336 void StrDupWithNew(
const char *s,
std::string& output);
344 std::vector<int> RegionAssignmentMap;
345 std::vector<std::vector<int> > ProcessAssignmentMap;
346 std::vector<int> NumRegionsAssigned;
348 int UpdateRegionAssignment();
353 std::vector<char> DataLocationMap;
355 std::vector<int> NumProcessesInRegion;
356 std::vector<std::vector<int> > ProcessList;
358 std::vector<int> NumRegionsInProcess;
359 std::vector<std::vector<int> > ParallelRegionList;
361 std::vector<std::vector<vtkIdType> > CellCountList;
363 std::vector<double> CellDataMin;
364 std::vector<double> CellDataMax;
365 std::vector<double> PointDataMin;
366 std::vector<double> PointDataMax;
367 std::vector<std::string> CellDataName;
368 std::vector<std::string> PointDataName;
374 int BuildGlobalIndexLists(
vtkIdType ncells);
376 std::vector<vtkIdType> StartVal;
377 std::vector<vtkIdType> EndVal;
378 std::vector<vtkIdType> NumCells;
384 int _whoHas(
int L,
int R,
int pos);
385 float *GetLocalVal(
int pos);
386 float *GetLocalValNext(
int pos);
387 void SetLocalVal(
int pos,
float *val);
388 void ExchangeVals(
int pos1,
int pos2);
389 void ExchangeLocalVals(
int pos1,
int pos2);
395 float *CurrentPtArray;
399 std::vector<int> SelectBuffer;
403 int AllCheckForFailure(
int rc,
const char *where,
const char *how);
404 void AllCheckParameters();
411 bool VolumeBounds(
double*);
413 int BreadthFirstDivide(
double *bounds);
417 int Select(
int dim,
int L,
int R);
418 void _select(
int L,
int R,
int K,
int dim);
419 void DoTransfer(
int from,
int to,
int fromIndex,
int toIndex,
int count);
421 int *PartitionAboutMyValue(
int L,
int R,
int K,
int dim);
422 int *PartitionAboutOtherValue(
int L,
int R,
float T,
int dim);
423 int *PartitionSubArray(
int L,
int R,
int K,
int dim,
int p1,
int p2);
426 #ifdef YIELDS_INCONSISTENT_REGION_BOUNDARIES
427 void RetrieveData(
vtkKdNode *kd,
int *buf);
429 void ReduceData(
vtkKdNode *kd,
int *sources);
433 void GetDataBounds(
int L,
int K,
int R,
float dataBounds[12]);
434 void GetLocalMinMax(
int L,
int R,
int me,
float *min,
float *
max);
440 static void CheckFixRegionBoundaries(
vtkKdNode *tree);
444 int AllocateDoubleBuffer();
445 void FreeDoubleBuffer();
446 void SwitchDoubleBuffer();
447 void AllocateSelectBuffer();
448 void FreeSelectBuffer();
450 void InitializeGlobalIndexLists();
451 void AllocateAndZeroGlobalIndexLists();
452 void FreeGlobalIndexLists();
453 void InitializeRegionAssignmentLists();
454 void AllocateAndZeroRegionAssignmentLists();
455 void FreeRegionAssignmentLists();
456 void InitializeProcessDataLists();
457 void AllocateAndZeroProcessDataLists();
458 void FreeProcessDataLists();
459 void InitializeFieldArrayMinMax();
460 void AllocateAndZeroFieldArrayMinMax();
461 void FreeFieldArrayMinMax();
463 void ReleaseTables();
467 void AddProcessRegions(
int procId,
vtkKdNode *kd);
468 void BuildRegionListsForProcesses();
472 bool CollectLocalRegionProcessData(std::vector<int>&);
473 int BuildRegionProcessTables();
474 int BuildFieldArrayMinMax();
475 void AddEntry(
int *list,
int len,
int id);
476 #ifdef VTK_USE_64BIT_IDS
481 static int FindNextLocalArrayIndex(
const char *n,
const std::vector<std::string>& names,
482 int len,
int start=0);