46 #include "vtkFiltersParallelModule.h" 64 void PrintTables(ostream& os,
vtkIndent indent);
91 int CreateProcessCellCountData();
101 int CreateGlobalDataArrayBounds();
121 vtkGetMacro(RegionAssignment,
int);
134 int AssignRegions(
int* map,
int numRegions);
141 int AssignRegionsRoundRobin();
151 int AssignRegionsContiguous();
171 int GetRegionAssignmentList(
int procId,
vtkIntArray* list);
181 void GetAllProcessesBorderingOnPoint(
float x,
float y,
float z,
vtkIntArray* list);
186 int GetProcessAssignedToRegion(
int regionId);
192 int HasData(
int processId,
int regionId);
198 int GetProcessCellCountForRegion(
int processId,
int regionId);
204 int GetTotalProcessesInRegion(
int regionId);
211 int GetProcessListForRegion(
int regionId,
vtkIntArray* processes);
220 int GetProcessesCellCountForRegion(
int regionId,
int* count,
int len);
226 int GetTotalRegionsForProcess(
int processId);
232 int GetRegionListForProcess(
int processId,
vtkIntArray* regions);
241 int GetRegionsCellCountForProcess(
int ProcessId,
int* count,
int len);
284 int ViewOrderAllProcessesInDirection(
285 const double directionOfProjection[3],
vtkIntArray* orderedList);
294 int ViewOrderAllProcessesFromPosition(
const double cameraPosition[3],
vtkIntArray* orderedList);
304 int GetCellArrayGlobalRange(
const char*
name,
float range[2]);
305 int GetPointArrayGlobalRange(
const char*
name,
float range[2]);
306 int GetCellArrayGlobalRange(
const char*
name,
double range[2]);
307 int GetPointArrayGlobalRange(
const char*
name,
double range[2]);
309 int GetCellArrayGlobalRange(
int arrayIndex,
double range[2]);
310 int GetPointArrayGlobalRange(
int arrayIndex,
double range[2]);
311 int GetCellArrayGlobalRange(
int arrayIndex,
float range[2]);
312 int GetPointArrayGlobalRange(
int arrayIndex,
float range[2]);
318 void SingleProcessBuildLocator();
319 int MultiProcessBuildLocator(
double* bounds);
322 int RegionAssignment;
328 void StrDupWithNew(
const char* s,
std::string& output);
336 std::vector<int> RegionAssignmentMap;
337 std::vector<std::vector<int> > ProcessAssignmentMap;
338 std::vector<int> NumRegionsAssigned;
340 int UpdateRegionAssignment();
345 std::vector<char> DataLocationMap;
347 std::vector<int> NumProcessesInRegion;
348 std::vector<std::vector<int> > ProcessList;
350 std::vector<int> NumRegionsInProcess;
351 std::vector<std::vector<int> > ParallelRegionList;
353 std::vector<std::vector<vtkIdType> > CellCountList;
355 std::vector<double> CellDataMin;
356 std::vector<double> CellDataMax;
357 std::vector<double> PointDataMin;
358 std::vector<double> PointDataMax;
359 std::vector<std::string> CellDataName;
360 std::vector<std::string> PointDataName;
366 int BuildGlobalIndexLists(
vtkIdType ncells);
368 std::vector<vtkIdType> StartVal;
369 std::vector<vtkIdType> EndVal;
370 std::vector<vtkIdType> NumCells;
376 int _whoHas(
int L,
int R,
int pos);
377 float* GetLocalVal(
int pos);
378 float* GetLocalValNext(
int pos);
379 void SetLocalVal(
int pos,
float* val);
380 void ExchangeVals(
int pos1,
int pos2);
381 void ExchangeLocalVals(
int pos1,
int pos2);
387 float* CurrentPtArray;
391 std::vector<int> SelectBuffer;
395 int AllCheckForFailure(
int rc,
const char* where,
const char* how);
396 void AllCheckParameters();
403 bool VolumeBounds(
double*);
405 int BreadthFirstDivide(
double* bounds);
409 int Select(
int dim,
int L,
int R);
410 void _select(
int L,
int R,
int K,
int dim);
411 void DoTransfer(
int from,
int to,
int fromIndex,
int toIndex,
int count);
413 int* PartitionAboutMyValue(
int L,
int R,
int K,
int dim);
414 int* PartitionAboutOtherValue(
int L,
int R,
float T,
int dim);
415 int* PartitionSubArray(
int L,
int R,
int K,
int dim,
int p1,
int p2);
418 #ifdef YIELDS_INCONSISTENT_REGION_BOUNDARIES 419 void RetrieveData(
vtkKdNode* kd,
int* buf);
421 void ReduceData(
vtkKdNode* kd,
int* sources);
425 void GetDataBounds(
int L,
int K,
int R,
float dataBounds[12]);
426 void GetLocalMinMax(
int L,
int R,
int me,
float* min,
float*
max);
432 static void CheckFixRegionBoundaries(
vtkKdNode* tree);
436 int AllocateDoubleBuffer();
437 void FreeDoubleBuffer();
438 void SwitchDoubleBuffer();
439 void AllocateSelectBuffer();
440 void FreeSelectBuffer();
442 void InitializeGlobalIndexLists();
443 void AllocateAndZeroGlobalIndexLists();
444 void FreeGlobalIndexLists();
445 void InitializeRegionAssignmentLists();
446 void AllocateAndZeroRegionAssignmentLists();
447 void FreeRegionAssignmentLists();
448 void InitializeProcessDataLists();
449 void AllocateAndZeroProcessDataLists();
450 void FreeProcessDataLists();
451 void InitializeFieldArrayMinMax();
452 void AllocateAndZeroFieldArrayMinMax();
453 void FreeFieldArrayMinMax();
455 void ReleaseTables();
459 void AddProcessRegions(
int procId,
vtkKdNode* kd);
460 void BuildRegionListsForProcesses();
464 bool CollectLocalRegionProcessData(std::vector<int>&);
465 int BuildRegionProcessTables();
466 int BuildFieldArrayMinMax();
467 void AddEntry(
int* list,
int len,
int id);
468 #ifdef VTK_USE_64BIT_IDS 473 static int FindNextLocalArrayIndex(
474 const char* n,
const std::vector<std::string>& names,
int len,
int start = 0);
int DivideRegion(vtkKdNode *kd, float *c1, int *ids, int nlevels)
void operator=(const vtkKdTree &)=delete
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.
int GetRegionAssignmentMapLength()
/ Returns the number of regions in the region assignment map.
abstract class to specify dataset behavior
vtkIdType GetTotalNumberOfCells()
Get the total number of cells distributed across the data files read by all processes.
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
static int Select(int dim, float *c1, int *ids, int nvals, double &coord)
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.