vtkRedistributePolyData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Los Alamos National Laboratory
3 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkRedistributePolyData_h
11 #define vtkRedistributePolyData_h
12 
13 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for export macro
14 #include "vtkPolyDataAlgorithm.h"
15 
16 //*******************************************************************
17 class vtkDataArray;
21 
23  : public vtkPolyDataAlgorithm
24 {
25 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
29  static vtkRedistributePolyData* New();
30 
34  virtual void SetController(vtkMultiProcessController*);
35  vtkGetObjectMacro(Controller, vtkMultiProcessController);
36 
37  vtkGetMacro(ColorProc, int);
38  vtkSetMacro(ColorProc, int);
39  void SetColorProc() { this->ColorProc = 1; };
40 
42 
46  virtual void SetPassThrough(int){};
47  virtual int GetPassThrough() { return 0; };
48  vtkBooleanMacro(PassThrough, int);
50 
51 protected:
53  ~vtkRedistributePolyData() override;
54 
55  enum
56  {
57  CELL_ID_TAG = 10,
58  POINT_COORDS_TAG = 20,
59  NUM_POINTS_TAG = 30,
60  NUM_CELLS_TAG = 40,
61  BOUNDS_TAG = 60,
62  CNT_SEND_TAG = 80,
63  CNT_REC_TAG = 90,
64  SEND_PROC_TAG = 100,
65  SEND_NUM_TAG = 110,
66  REC_PROC_TAG = 120,
67  REC_NUM_TAG = 130,
68  NUM_CURR_CELLS_TAG = 140,
69 
70  CELL_CNT_TAG = 150,
71  CELL_TAG = 160,
72  POINTS_SIZE_TAG = 170,
73  POINTS_TAG = 180
74  };
75 
77  {
78  public:
79  vtkCommSched();
80  ~vtkCommSched();
81 
82  int SendCount;
84  int* SendTo;
89 
92 
93  private:
94  vtkCommSched(const vtkCommSched&) = delete;
95  void operator=(const vtkCommSched&) = delete;
96  };
97 
98  virtual void MakeSchedule(vtkPolyData* input, vtkCommSched*);
99  void OrderSchedule(vtkCommSched*);
100 
101  void SendCellSizes(
103  void CopyCells(vtkIdType*, vtkPolyData*, vtkPolyData*, vtkIdType**);
104  void SendCells(
106  void ReceiveCells(
108 
109  void FindMemReq(vtkIdType*, vtkPolyData*, vtkIdType&, vtkIdType*);
110 
111  void AllocateCellDataArrays(vtkDataSetAttributes*, vtkIdType**, int, vtkIdType*);
112  void AllocatePointDataArrays(vtkDataSetAttributes*, vtkIdType*, int, vtkIdType);
113  void AllocateArrays(vtkDataArray*, vtkIdType);
114 
115  void CopyDataArrays(vtkDataSetAttributes*, vtkDataSetAttributes*, vtkIdType, vtkIdType*, int);
116 
117  void CopyCellBlockDataArrays(
119 
120  void CopyArrays(vtkDataArray*, vtkDataArray*, vtkIdType, vtkIdType*, int);
121 
122  void CopyBlockArrays(
124 
125  void SendDataArrays(
127 
128  void SendCellBlockDataArrays(
130 
131  void SendArrays(vtkDataArray*, vtkIdType, int, vtkIdType*, int);
132 
133  void SendBlockArrays(vtkDataArray*, vtkIdType, int, vtkIdType, int);
134 
135  void ReceiveDataArrays(vtkDataSetAttributes*, vtkIdType, int, vtkIdType*, int);
136 
137  void ReceiveArrays(vtkDataArray*, vtkIdType, int, vtkIdType*, int);
138 
139  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
140  vtkInformationVector* outputVector) override;
141 
142  // Do this as a proprocessing step.
143  void CompleteInputArrays(vtkPolyData* input);
144  void ReceiveInputArrays(vtkDataSetAttributes* attr, int recFrom);
145  void SendInputArrays(vtkDataSetAttributes* attr, int sendTo);
146  int DoubleCheckArrays(vtkPolyData* input);
147 
149 
150  int ColorProc; // Set to 1 to color data according to processor
151 
152 private:
154  void operator=(const vtkRedistributePolyData&) = delete;
155 };
156 
157 //****************************************************************
158 
159 #endif
redistribute poly cells from other processes (special version to color according to processor) ...
int vtkIdType
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
static vtkPolyDataAlgorithm * New()
virtual void SetPassThrough(int)
These are here for ParaView compatibility.
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
virtual void SetSocketController(vtkSocketController *)
These are here for ParaView compatibility.
virtual int GetPassThrough()
These are here for ParaView compatibility.
vtkMultiProcessController * Controller