46 #include "vtkFiltersParallelModule.h" 63 void PrintTables(ostream& os,
vtkIndent indent);
80 vtkIdType GetTotalNumberOfCells(){
return this->TotalNumCells;}
90 int CreateProcessCellCountData();
100 int CreateGlobalDataArrayBounds();
120 vtkGetMacro(RegionAssignment,
int);
133 int AssignRegions(
int *map,
int numRegions);
140 int AssignRegionsRoundRobin();
150 int AssignRegionsContiguous();
157 {
return this->RegionAssignmentMap; }
163 vtkGetMacro(RegionAssignmentMapLength,
int);
171 int GetRegionAssignmentList(
int procId,
vtkIntArray *list);
181 void GetAllProcessesBorderingOnPoint(
float x,
float y,
float z,
187 int GetProcessAssignedToRegion(
int regionId);
193 int HasData(
int processId,
int regionId);
199 int GetProcessCellCountForRegion(
int processId,
int regionId);
205 int GetTotalProcessesInRegion(
int regionId);
212 int GetProcessListForRegion(
int regionId,
vtkIntArray *processes);
221 int GetProcessesCellCountForRegion(
int regionId,
int *count,
int len);
227 int GetTotalRegionsForProcess(
int processId);
233 int GetRegionListForProcess(
int processId,
vtkIntArray *regions);
242 int GetRegionsCellCountForProcess(
int ProcessId,
int *count,
int len);
270 vtkIdType GetCellListsForProcessRegions(
int ProcessId,
int set,
274 vtkIdType GetCellListsForProcessRegions(
int ProcessId,
286 int ViewOrderAllProcessesInDirection(
const double directionOfProjection[3],
296 int ViewOrderAllProcessesFromPosition(
const double cameraPosition[3],
307 int GetCellArrayGlobalRange(
const char *
name,
float range[2]);
308 int GetPointArrayGlobalRange(
const char *
name,
float range[2]);
309 int GetCellArrayGlobalRange(
const char *
name,
double range[2]);
310 int GetPointArrayGlobalRange(
const char *
name,
double range[2]);
312 int GetCellArrayGlobalRange(
int arrayIndex,
double range[2]);
313 int GetPointArrayGlobalRange(
int arrayIndex,
double range[2]);
314 int GetCellArrayGlobalRange(
int arrayIndex,
float range[2]);
315 int GetPointArrayGlobalRange(
int arrayIndex,
float range[2]);
322 void SingleProcessBuildLocator();
323 int MultiProcessBuildLocator(
double *bounds);
327 int RegionAssignment;
333 static
char *StrDupWithNew(const
char *s);
341 int *RegionAssignmentMap;
342 int RegionAssignmentMapLength;
343 int **ProcessAssignmentMap;
344 int *NumRegionsAssigned;
346 int UpdateRegionAssignment();
351 char *DataLocationMap;
353 int *NumProcessesInRegion;
356 int *NumRegionsInProcess;
363 double *PointDataMin;
364 double *PointDataMax;
366 char **PointDataName;
372 int BuildGlobalIndexLists(
vtkIdType ncells);
382 int _whoHas(
int L,
int R,
int pos);
383 float *GetLocalVal(
int pos);
384 float *GetLocalValNext(
int pos);
385 void SetLocalVal(
int pos,
float *val);
386 void ExchangeVals(
int pos1,
int pos2);
387 void ExchangeLocalVals(
int pos1,
int pos2);
391 float *CurrentPtArray;
399 int AllCheckForFailure(
int rc, const
char *where, const
char *how);
400 void AllCheckParameters();
407 bool VolumeBounds(
double*);
409 int BreadthFirstDivide(
double *bounds);
413 int Select(
int dim,
int L,
int R);
414 void _select(
int L,
int R,
int K,
int dim);
415 void DoTransfer(
int from,
int to,
int fromIndex,
int toIndex,
int count);
417 int *PartitionAboutMyValue(
int L,
int R,
int K,
int dim);
418 int *PartitionAboutOtherValue(
int L,
int R,
float T,
int dim);
419 int *PartitionSubArray(
int L,
int R,
int K,
int dim,
int p1,
int p2);
422 #ifdef YIELDS_INCONSISTENT_REGION_BOUNDARIES 423 void RetrieveData(
vtkKdNode *kd,
int *buf);
425 void ReduceData(
vtkKdNode *kd,
int *sources);
429 float *DataBounds(
int L,
int K,
int R);
430 void GetLocalMinMax(
int L,
int R,
int me,
float *min,
float *
max);
436 static void CheckFixRegionBoundaries(
vtkKdNode *tree);
440 int AllocateDoubleBuffer();
441 void FreeDoubleBuffer();
442 void SwitchDoubleBuffer();
443 int AllocateSelectBuffer();
444 void FreeSelectBuffer();
446 void InitializeGlobalIndexLists();
447 int AllocateAndZeroGlobalIndexLists();
448 void FreeGlobalIndexLists();
449 void InitializeRegionAssignmentLists();
450 int AllocateAndZeroRegionAssignmentLists();
451 void FreeRegionAssignmentLists();
452 void InitializeProcessDataLists();
453 int AllocateAndZeroProcessDataLists();
454 void FreeProcessDataLists();
455 void InitializeFieldArrayMinMax();
456 int AllocateAndZeroFieldArrayMinMax();
457 void FreeFieldArrayMinMax();
459 void ReleaseTables();
463 void AddProcessRegions(
int procId,
vtkKdNode *kd);
464 void BuildRegionListsForProcesses();
468 int *CollectLocalRegionProcessData();
469 int BuildRegionProcessTables();
470 int BuildFieldArrayMinMax();
471 void AddEntry(
int *list,
int len,
int id);
472 #ifdef VTK_USE_64BIT_IDS 477 static int FindNextLocalArrayIndex(
const char *n,
const char **names,
int len,
int start=0);
static const int RoundRobinAssignment
This class represents a single spatial region in an 3D axis aligned binary spatial partitioning...
const int * GetRegionAssignmentMap()
Returns the region assignment map where index is the region and value is the processes id for that re...
Build a k-d tree decomposition of a list of points.
abstract class to specify dataset behavior
void operator=(const vtkKdTree &) VTK_DELETE_FUNCTION
void BuildLocator() override
Create the k-d tree decomposition of the cells of the data set or data sets.
dynamic, self-adjusting array of int
a simple class to control print indentation
list of point or cell ids
static const int ContiguousAssignment
virtual void PrintTiming(ostream &os, vtkIndent indent)
Print timing of k-d tree build.
scalable collective communication for a subset of members of a parallel VTK application ...
static const int NoRegionAssignment
a Kd-tree spatial decomposition of a set of points
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static const int UserDefinedAssignment
Used to send/receive messages in a multiprocess environment.
Multiprocessing communication superclass.