Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkProcessIdScalars.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProcessIdScalars.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00027 #ifndef __vtkProcessIdScalars_h
00028 #define __vtkProcessIdScalars_h
00029 
00030 #include "vtkDataSetAlgorithm.h"
00031 
00032 class vtkFloatArray;
00033 class vtkIntArray;
00034 class vtkMultiProcessController;
00035 
00036 class VTK_PARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
00037 {
00038 public:
00039   static vtkProcessIdScalars *New();
00040 
00041   vtkTypeRevisionMacro(vtkProcessIdScalars,vtkDataSetAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00047   void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
00048   void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
00049   int GetScalarMode() {return this->CellScalarsFlag;}
00051 
00052   // Dscription:
00053   // This option uses a random mapping between pieces and scalar values.
00054   // The scalar values are choosen between 0 and 1.  By default, random
00055   // mode is off.
00056   vtkSetMacro(RandomMode, int);
00057   vtkGetMacro(RandomMode, int);
00058   vtkBooleanMacro(RandomMode, int);
00059 
00061 
00063   virtual void SetController(vtkMultiProcessController*);
00064   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00066   
00067   
00068 protected:
00069   vtkProcessIdScalars();
00070   ~vtkProcessIdScalars();
00071   
00072   // Append the pieces.
00073   int RequestData(
00074     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00075   
00076   vtkIntArray *MakeProcessIdScalars(int piece, vtkIdType numScalars);
00077   vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
00078   
00079   vtkSetMacro(CellScalarsFlag,int);
00080   int CellScalarsFlag;
00081   int RandomMode;
00082 
00083   vtkMultiProcessController* Controller;
00084 
00085 private:
00086   vtkProcessIdScalars(const vtkProcessIdScalars&);  // Not implemented.
00087   void operator=(const vtkProcessIdScalars&);  // Not implemented.
00088 };
00089 
00090 #endif

Generated on Mon Jan 21 23:07:33 2008 for VTK by  doxygen 1.4.3-20050530