31 #include "vtkFiltersParallelModule.h"
36 VTK_ABI_NAMESPACE_BEGIN
50 void PrintTables(ostream& os,
vtkIndent indent);
77 int CreateProcessCellCountData();
87 int CreateGlobalDataArrayBounds();
107 vtkGetMacro(RegionAssignment,
int);
120 int AssignRegions(
int* map,
int numRegions);
127 int AssignRegionsRoundRobin();
137 int AssignRegionsContiguous();
157 int GetRegionAssignmentList(
int procId,
vtkIntArray* list);
167 void GetAllProcessesBorderingOnPoint(
float x,
float y,
float z,
vtkIntArray* list);
172 int GetProcessAssignedToRegion(
int regionId);
178 int HasData(
int processId,
int regionId);
184 int GetProcessCellCountForRegion(
int processId,
int regionId);
190 int GetTotalProcessesInRegion(
int regionId);
197 int GetProcessListForRegion(
int regionId,
vtkIntArray* processes);
206 int GetProcessesCellCountForRegion(
int regionId,
int* count,
int len);
212 int GetTotalRegionsForProcess(
int processId);
218 int GetRegionListForProcess(
int processId,
vtkIntArray* regions);
227 int GetRegionsCellCountForProcess(
int ProcessId,
int* count,
int len);
270 int ViewOrderAllProcessesInDirection(
271 const double directionOfProjection[3],
vtkIntArray* orderedList);
280 int ViewOrderAllProcessesFromPosition(
const double cameraPosition[3],
vtkIntArray* orderedList);
290 int GetCellArrayGlobalRange(
const char*
name,
float range[2]);
291 int GetPointArrayGlobalRange(
const char*
name,
float range[2]);
292 int GetCellArrayGlobalRange(
const char*
name,
double range[2]);
293 int GetPointArrayGlobalRange(
const char*
name,
double range[2]);
295 int GetCellArrayGlobalRange(
int arrayIndex,
double range[2]);
296 int GetPointArrayGlobalRange(
int arrayIndex,
double range[2]);
297 int GetCellArrayGlobalRange(
int arrayIndex,
float range[2]);
298 int GetPointArrayGlobalRange(
int arrayIndex,
float range[2]);
304 void SingleProcessBuildLocator();
305 int MultiProcessBuildLocator(
double* bounds);
308 int RegionAssignment;
314 void StrDupWithNew(
const char* s,
std::string& output);
322 std::vector<int> RegionAssignmentMap;
323 std::vector<std::vector<int>> ProcessAssignmentMap;
324 std::vector<int> NumRegionsAssigned;
326 int UpdateRegionAssignment();
331 std::vector<char> DataLocationMap;
333 std::vector<int> NumProcessesInRegion;
334 std::vector<std::vector<int>> ProcessList;
336 std::vector<int> NumRegionsInProcess;
337 std::vector<std::vector<int>> ParallelRegionList;
339 std::vector<std::vector<vtkIdType>> CellCountList;
341 std::vector<double> CellDataMin;
342 std::vector<double> CellDataMax;
343 std::vector<double> PointDataMin;
344 std::vector<double> PointDataMax;
345 std::vector<std::string> CellDataName;
346 std::vector<std::string> PointDataName;
352 int BuildGlobalIndexLists(
vtkIdType ncells);
354 std::vector<vtkIdType> StartVal;
355 std::vector<vtkIdType> EndVal;
356 std::vector<vtkIdType> NumCells;
362 int _whoHas(
int L,
int R,
int pos);
363 float* GetLocalVal(
int pos);
364 float* GetLocalValNext(
int pos);
365 void SetLocalVal(
int pos,
float* val);
366 void ExchangeVals(
int pos1,
int pos2);
367 void ExchangeLocalVals(
int pos1,
int pos2);
373 float* CurrentPtArray;
377 std::vector<int> SelectBuffer;
381 int AllCheckForFailure(
int rc,
const char* where,
const char* how);
382 void AllCheckParameters();
389 bool VolumeBounds(
double*);
391 int BreadthFirstDivide(
double* bounds);
395 int Select(
int dim,
int L,
int R);
396 void _select(
int L,
int R,
int K,
int dim);
397 void DoTransfer(
int from,
int to,
int fromIndex,
int toIndex,
int count);
399 int* PartitionAboutMyValue(
int L,
int R,
int K,
int dim);
400 int* PartitionAboutOtherValue(
int L,
int R,
float T,
int dim);
401 int* PartitionSubArray(
int L,
int R,
int K,
int dim,
int p1,
int p2);
404 #ifdef YIELDS_INCONSISTENT_REGION_BOUNDARIES
405 void RetrieveData(
vtkKdNode* kd,
int* buf);
407 void ReduceData(
vtkKdNode* kd,
int* sources);
411 void GetDataBounds(
int L,
int K,
int R,
float dataBounds[12]);
412 void GetLocalMinMax(
int L,
int R,
int me,
float* min,
float*
max);
418 static void CheckFixRegionBoundaries(
vtkKdNode* tree);
422 int AllocateDoubleBuffer();
423 void FreeDoubleBuffer();
424 void SwitchDoubleBuffer();
425 void AllocateSelectBuffer();
426 void FreeSelectBuffer();
428 void InitializeGlobalIndexLists();
429 void AllocateAndZeroGlobalIndexLists();
430 void FreeGlobalIndexLists();
431 void InitializeRegionAssignmentLists();
432 void AllocateAndZeroRegionAssignmentLists();
433 void FreeRegionAssignmentLists();
434 void InitializeProcessDataLists();
435 void AllocateAndZeroProcessDataLists();
436 void FreeProcessDataLists();
437 void InitializeFieldArrayMinMax();
438 void AllocateAndZeroFieldArrayMinMax();
439 void FreeFieldArrayMinMax();
441 void ReleaseTables();
445 void AddProcessRegions(
int procId,
vtkKdNode* kd);
446 void BuildRegionListsForProcesses();
450 bool CollectLocalRegionProcessData(std::vector<int>&);
451 int BuildRegionProcessTables();
452 int BuildFieldArrayMinMax();
453 void AddEntry(
int* list,
int len,
int id);
454 #ifdef VTK_USE_64BIT_IDS
459 static int FindNextLocalArrayIndex(
460 const char* n,
const std::vector<std::string>& names,
int len,
int start = 0);
466 VTK_ABI_NAMESPACE_END
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.