VTK  9.2.5
vtkProcessIdScalars.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProcessIdScalars.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
31#ifndef vtkProcessIdScalars_h
32#define vtkProcessIdScalars_h
33
34#include "vtkDataSetAlgorithm.h"
35#include "vtkFiltersParallelModule.h" // For export macro
36
37class vtkFloatArray;
38class vtkIntArray;
40
41class VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
42{
43public:
45
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
54 void SetScalarModeToCellData() { this->SetCellScalarsFlag(1); }
55 void SetScalarModeToPointData() { this->SetCellScalarsFlag(0); }
56 vtkSetMacro(CellScalarsFlag, int);
57 int GetScalarMode() { return this->CellScalarsFlag; }
59
61
66 vtkSetMacro(RandomMode, vtkTypeBool);
67 vtkGetMacro(RandomMode, vtkTypeBool);
68 vtkBooleanMacro(RandomMode, vtkTypeBool);
70
72
77 vtkGetObjectMacro(Controller, vtkMultiProcessController);
79
80protected:
83
84 // Append the pieces.
86
88 vtkFloatArray* MakeRandomScalars(int piece, vtkIdType numScalars);
89
92
94
95private:
97 void operator=(const vtkProcessIdScalars&) = delete;
98};
99
100#endif
Superclass for algorithms that produce output of the same type as input.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
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:69
int vtkIdType
Definition: vtkType.h:332