VTK  9.3.20240423
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
29 "Use `vtkGenerateProcessIds` instead") VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars
30 : public vtkDataSetAlgorithm
31{
32public:
34
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
43 void SetScalarModeToCellData() { this->SetCellScalarsFlag(1); }
44 void SetScalarModeToPointData() { this->SetCellScalarsFlag(0); }
45 vtkSetMacro(CellScalarsFlag, int);
46 int GetScalarMode() { return this->CellScalarsFlag; }
48
50
55 vtkSetMacro(RandomMode, vtkTypeBool);
56 vtkGetMacro(RandomMode, vtkTypeBool);
57 vtkBooleanMacro(RandomMode, vtkTypeBool);
59
61
66 vtkGetObjectMacro(Controller, vtkMultiProcessController);
68
69protected:
72
73 // Append the pieces.
75
77 vtkFloatArray* MakeRandomScalars(int piece, vtkIdType numScalars);
78
81
83
84private:
86 void operator=(const vtkProcessIdScalars&) = delete;
87};
88
89VTK_ABI_NAMESPACE_END
90#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Multiprocessing communication superclass.
Sets cell or point scalars to the processor rank.
static vtkProcessIdScalars * New()
vtkFloatArray * MakeRandomScalars(int piece, vtkIdType numScalars)
~vtkProcessIdScalars() override
int GetScalarMode()
Option to centerate cell scalars of points scalars.
vtkMultiProcessController * Controller
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
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 PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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