VTK
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 =========================================================================*/
27 #ifndef vtkProcessIdScalars_h
28 #define vtkProcessIdScalars_h
29 
30 #include "vtkFiltersParallelModule.h" // For export macro
31 #include "vtkDataSetAlgorithm.h"
32 
33 class vtkFloatArray;
34 class vtkIntArray;
36 
38 {
39 public:
41 
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
48  void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
49  void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
50  int GetScalarMode() {return this->CellScalarsFlag;}
52 
53  // Dscription:
54  // This option uses a random mapping between pieces and scalar values.
55  // The scalar values are chosen between 0 and 1. By default, random
56  // mode is off.
57  vtkSetMacro(RandomMode, int);
58  vtkGetMacro(RandomMode, int);
59  vtkBooleanMacro(RandomMode, int);
60 
62 
67 
68 
69 protected:
72 
73  // Append the pieces.
76 
77  vtkIntArray *MakeProcessIdScalars(int piece, vtkIdType numScalars);
78  vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
79 
80  vtkSetMacro(CellScalarsFlag,int);
83 
85 
86 private:
87  vtkProcessIdScalars(const vtkProcessIdScalars&); // Not implemented.
88  void operator=(const vtkProcessIdScalars&); // Not implemented.
89 };
90 
91 #endif
vtkProcessIdScalars::New
static vtkProcessIdScalars * New()
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
VTKFILTERSPARALLEL_EXPORT
#define VTKFILTERSPARALLEL_EXPORT
Definition: vtkFiltersParallelModule.h:15
vtkProcessIdScalars::GetScalarMode
int GetScalarMode()
Definition: vtkProcessIdScalars.h:50
vtkProcessIdScalars::~vtkProcessIdScalars
~vtkProcessIdScalars()
vtkProcessIdScalars::MakeProcessIdScalars
vtkIntArray * MakeProcessIdScalars(int piece, vtkIdType numScalars)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:49
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkProcessIdScalars::MakeRandomScalars
vtkFloatArray * MakeRandomScalars(int piece, vtkIdType numScalars)
vtkProcessIdScalars::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkFiltersParallelModule.h
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:51
vtkProcessIdScalars
Sets cell or point scalars to the processor rank.
Definition: vtkProcessIdScalars.h:38
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:85
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:53
vtkProcessIdScalars::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkProcessIdScalars::SetController
virtual void SetController(vtkMultiProcessController *)
vtkProcessIdScalars::vtkProcessIdScalars
vtkProcessIdScalars()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkProcessIdScalars::SetScalarModeToCellData
void SetScalarModeToCellData()
Definition: vtkProcessIdScalars.h:48
vtkProcessIdScalars::CellScalarsFlag
int CellScalarsFlag
Definition: vtkProcessIdScalars.h:80
vtkDataSetAlgorithm.h
vtkProcessIdScalars::RandomMode
int RandomMode
Definition: vtkProcessIdScalars.h:82
vtkProcessIdScalars::Controller
vtkMultiProcessController * Controller
Definition: vtkProcessIdScalars.h:84
vtkProcessIdScalars::SetScalarModeToPointData
void SetScalarModeToPointData()
Definition: vtkProcessIdScalars.h:49