VTK  9.3.0
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
23VTK_ABI_NAMESPACE_BEGIN
24class vtkFloatArray;
25class vtkIntArray;
27
28class VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
29{
30public:
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
65 vtkGetObjectMacro(Controller, vtkMultiProcessController);
67
68protected:
71
72 // Append the pieces.
74
76 vtkFloatArray* MakeRandomScalars(int piece, vtkIdType numScalars);
77
80
82
83private:
85 void operator=(const vtkProcessIdScalars&) = delete;
86};
87
88VTK_ABI_NAMESPACE_END
89#endif
Superclass for algorithms that produce output of the same type as input.
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition vtkIntArray.h:35
Multiprocessing communication superclass.
Sets cell or point scalars to the processor rank.
vtkFloatArray * MakeRandomScalars(int piece, vtkIdType numScalars)
~vtkProcessIdScalars() override
int GetScalarMode()
Option to centerate cell scalars of points scalars.
vtkMultiProcessController * Controller
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkIntArray * MakeProcessIdScalars(int piece, vtkIdType numScalars)
virtual void SetController(vtkMultiProcessController *)
By default this filter uses the global controller, but this method can be used to set another instead...
void SetScalarModeToPointData()
Option to centerate cell scalars of points scalars.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315