VTK
dox/Parallel/vtkMPIGroup.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMPIGroup.h
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 =========================================================================*/
00025 #ifndef __vtkMPIGroup_h
00026 #define __vtkMPIGroup_h
00027 
00028 #include "vtkObject.h"
00029 
00030 class vtkMPIController;
00031 class vtkMPICommunicator;
00032 class vtkProcessGroup;
00033 
00034 #ifndef VTK_REMOVE_LEGACY_CODE
00035 class VTK_PARALLEL_EXPORT vtkMPIGroup : public vtkObject
00036 {
00037 
00038 public:
00039 
00040   vtkTypeMacro( vtkMPIGroup,vtkObject);
00041   
00044   static vtkMPIGroup* New();
00045   
00046   VTK_LEGACY(virtual void PrintSelf(ostream& os, vtkIndent indent));
00047 
00050   VTK_LEGACY(void Initialize(vtkMPIController* controller));
00051 
00055   VTK_LEGACY(int AddProcessId(int processId));
00056 
00059   VTK_LEGACY(void RemoveProcessId(int processId));
00060 
00063   VTK_LEGACY(int FindProcessId(int processId));
00064 
00067   VTK_LEGACY(int GetProcessId(int pos));
00068 
00071   VTK_LEGACY(void CopyProcessIdsFrom(vtkMPIGroup* group));
00072 
00073 //BTX
00075 
00076   VTK_LEGACY(int GetNumberOfProcessIds());
00077 //ETX
00079 
00082   void CopyInto(vtkProcessGroup *destination, vtkMPICommunicator *mpiComm);
00083 
00084 //BTX
00085 
00086   friend class vtkMPICommunicator;
00087 
00088 //ETX
00089 
00090 protected:
00091 
00094   void CopyFrom(vtkMPIGroup* group);
00095 
00097   void Initialize(int numProcIds);
00098 
00099   int* ProcessIds;
00100   int MaximumNumberOfProcessIds;
00101   int Initialized;
00102   int CurrentPosition;
00103 
00104   vtkMPIGroup();
00105   ~vtkMPIGroup();
00106 
00107 private:
00108   vtkMPIGroup(const vtkMPIGroup&);  // Not implemented.
00109   void operator=(const vtkMPIGroup&);  // Not implemented.
00110 };
00111 #endif
00112 
00113 #endif
00114 
00115 
00116 
00117