VTK  9.1.0
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 =========================================================================*/
28 #ifndef vtkProcessIdScalars_h
29 #define vtkProcessIdScalars_h
30 
31 #include "vtkDataSetAlgorithm.h"
32 #include "vtkFiltersParallelModule.h" // For export macro
33 
34 class vtkFloatArray;
35 class vtkIntArray;
37 
38 class VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
39 {
40 public:
42 
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
51  void SetScalarModeToCellData() { this->SetCellScalarsFlag(1); }
52  void SetScalarModeToPointData() { this->SetCellScalarsFlag(0); }
53  vtkSetMacro(CellScalarsFlag, int);
54  int GetScalarMode() { return this->CellScalarsFlag; }
56 
58 
63  vtkSetMacro(RandomMode, vtkTypeBool);
64  vtkGetMacro(RandomMode, vtkTypeBool);
65  vtkBooleanMacro(RandomMode, vtkTypeBool);
67 
69 
74  vtkGetObjectMacro(Controller, vtkMultiProcessController);
76 
77 protected:
80 
81  // Append the pieces.
83 
84  vtkIntArray* MakeProcessIdScalars(int piece, vtkIdType numScalars);
85  vtkFloatArray* MakeRandomScalars(int piece, vtkIdType numScalars);
86 
89 
91 
92 private:
94  void operator=(const vtkProcessIdScalars&) = delete;
95 };
96 
97 #endif
vtkProcessIdScalars::New
static vtkProcessIdScalars * New()
vtkProcessIdScalars::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProcessIdScalars::GetScalarMode
int GetScalarMode()
Option to centerate cell scalars of points scalars.
Definition: vtkProcessIdScalars.h:54
vtkProcessIdScalars::MakeProcessIdScalars
vtkIntArray * MakeProcessIdScalars(int piece, vtkIdType numScalars)
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:145
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkProcessIdScalars::MakeRandomScalars
vtkFloatArray * MakeRandomScalars(int piece, vtkIdType numScalars)
vtkProcessIdScalars::~vtkProcessIdScalars
~vtkProcessIdScalars() override
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:49
vtkProcessIdScalars
Sets cell or point scalars to the processor rank.
Definition: vtkProcessIdScalars.h:39
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:77
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
vtkProcessIdScalars::SetController
virtual void SetController(vtkMultiProcessController *)
By default this filter uses the global controller, but this method can be used to set another instead...
vtkProcessIdScalars::vtkProcessIdScalars
vtkProcessIdScalars()
vtkProcessIdScalars::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkProcessIdScalars::SetScalarModeToCellData
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
Definition: vtkProcessIdScalars.h:51
vtkProcessIdScalars::CellScalarsFlag
int CellScalarsFlag
Definition: vtkProcessIdScalars.h:87
vtkDataSetAlgorithm.h
vtkProcessIdScalars::Controller
vtkMultiProcessController * Controller
Definition: vtkProcessIdScalars.h:90
vtkProcessIdScalars::RandomMode
vtkTypeBool RandomMode
Definition: vtkProcessIdScalars.h:88
vtkProcessIdScalars::SetScalarModeToPointData
void SetScalarModeToPointData()
Option to centerate cell scalars of points scalars.
Definition: vtkProcessIdScalars.h:52
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69