Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00035 #ifndef __vtkMPIGroup_h
00036 #define __vtkMPIGroup_h
00037 
00038 #include "vtkObject.h"
00039 
00040 class vtkMPIController;
00041 class vtkMPICommunicator;
00042 
00043 class VTK_PARALLEL_EXPORT vtkMPIGroup : public vtkObject
00044 {
00045 
00046 public:
00047 
00048   vtkTypeRevisionMacro( vtkMPIGroup,vtkObject);
00049   
00052   static vtkMPIGroup* New();
00053   
00054   virtual void PrintSelf(ostream& os, vtkIndent indent);
00055 
00058   void Initialize(vtkMPIController* controller);
00059 
00063   int AddProcessId(int processId);
00064 
00067   void RemoveProcessId(int processId);
00068 
00071   int FindProcessId(int processId);
00072 
00075   int GetProcessId(int pos);
00076 
00079   void CopyProcessIdsFrom(vtkMPIGroup* group);
00080 
00082 
00083   int GetNumberOfProcessIds()
00084     {
00085       return this->CurrentPosition;
00086     }
00088 
00089 //BTX
00090 
00091   friend class vtkMPICommunicator;
00092 
00093 //ETX
00094 
00095 protected:
00096 
00099   void CopyFrom(vtkMPIGroup* group);
00100 
00102   void Initialize(int numProcIds);
00103 
00104   int* ProcessIds;
00105   int MaximumNumberOfProcessIds;
00106   int Initialized;
00107   int CurrentPosition;
00108 
00109   vtkMPIGroup();
00110   ~vtkMPIGroup();
00111 
00112 private:
00113   vtkMPIGroup(const vtkMPIGroup&);  // Not implemented.
00114   void operator=(const vtkMPIGroup&);  // Not implemented.
00115 };
00116 
00117 #endif
00118 
00119 
00120 
00121