VTK  9.3.1
vtkProcessIdScalars.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkProcessIdScalars_h
17 #define vtkProcessIdScalars_h
18 
19 #include "vtkDataSetAlgorithm.h"
20 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_3_0
21 #include "vtkFiltersParallelModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkFloatArray;
25 class vtkIntArray;
27 
28 class VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
29 {
30 public:
31  VTK_DEPRECATED_IN_9_3_0("Use `vtkGenerateProcessIds` instead")
32  static vtkProcessIdScalars* New();
33 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
42  void SetScalarModeToCellData() { this->SetCellScalarsFlag(1); }
43  void SetScalarModeToPointData() { this->SetCellScalarsFlag(0); }
44  vtkSetMacro(CellScalarsFlag, int);
45  int GetScalarMode() { return this->CellScalarsFlag; }
47 
49 
54  vtkSetMacro(RandomMode, vtkTypeBool);
55  vtkGetMacro(RandomMode, vtkTypeBool);
56  vtkBooleanMacro(RandomMode, vtkTypeBool);
58 
60 
64  virtual void SetController(vtkMultiProcessController*);
65  vtkGetObjectMacro(Controller, vtkMultiProcessController);
67 
68 protected:
70  ~vtkProcessIdScalars() override;
71 
72  // Append the pieces.
74 
75  vtkIntArray* MakeProcessIdScalars(int piece, vtkIdType numScalars);
76  vtkFloatArray* MakeRandomScalars(int piece, vtkIdType numScalars);
77 
80 
82 
83 private:
85  void operator=(const vtkProcessIdScalars&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif
int GetScalarMode()
Option to centerate cell scalars of points scalars.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
int vtkIdType
Definition: vtkType.h:315
vtkMultiProcessController * Controller
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:34
#define VTK_DEPRECATED_IN_9_3_0(reason)
a simple class to control print indentation
Definition: vtkIndent.h:28
Sets cell or point scalars to the processor rank.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetScalarModeToPointData()
Option to centerate cell scalars of points scalars.
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()
Multiprocessing communication superclass.