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

vtkMPIGroup.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMPIGroup.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 =========================================================================*/
00042 #ifndef __vtkMPIGroup_h
00043 #define __vtkMPIGroup_h
00044 
00045 #include "vtkObject.h"
00046 
00047 class vtkMPIController;
00048 class vtkMPICommunicator;
00049 
00050 class VTK_PARALLEL_EXPORT vtkMPIGroup : public vtkObject
00051 {
00052 
00053 public:
00054 
00055   vtkTypeRevisionMacro( vtkMPIGroup,vtkObject);
00056   
00059   static vtkMPIGroup* New();
00060   
00061   virtual void PrintSelf(ostream& os, vtkIndent indent);
00062 
00065   void Initialize(vtkMPIController* controller);
00066 
00070   int AddProcessId(int processId);
00071 
00074   void RemoveProcessId(int processId);
00075 
00078   int FindProcessId(int processId);
00079 
00082   int GetProcessId(int pos);
00083 
00086   void CopyProcessIdsFrom(vtkMPIGroup* group);
00087 
00089 
00090   int GetNumberOfProcessIds()
00091     {
00092       return this->CurrentPosition;
00093     }
00095 
00096 //BTX
00097 
00098   friend class vtkMPICommunicator;
00099 
00100 //ETX
00101 
00102 protected:
00103 
00106   void CopyFrom(vtkMPIGroup* group);
00107 
00109   void Initialize(int numProcIds);
00110 
00111   int* ProcessIds;
00112   int MaximumNumberOfProcessIds;
00113   int Initialized;
00114   int CurrentPosition;
00115 
00116   vtkMPIGroup();
00117   ~vtkMPIGroup();
00118 
00119 private:
00120   vtkMPIGroup(const vtkMPIGroup&);  // Not implemented.
00121   void operator=(const vtkMPIGroup&);  // Not implemented.
00122 };
00123 
00124 #endif
00125 
00126 
00127 
00128