Parallel/vtkMPIGroup.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Parallel/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 =========================================================================*/
    00046 #ifndef __vtkMPIGroup_h
    00047 #define __vtkMPIGroup_h
    00048
    00049 #include "vtkObject.h"
    00050
    00051 class vtkMPIController;
    00052 class vtkMPICommunicator;
    00053
    00054 class VTK_PARALLEL_EXPORT vtkMPIGroup : public vtkObject
    00055 {
    00056
    00057 public:
    00058
    00059   vtkTypeRevisionMacro( vtkMPIGroup,vtkObject);
    00060
    00063   static vtkMPIGroup* New();
    00064
    00065   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00066
    00069   void Initialize(vtkMPIController* controller);
    00070
    00074   int AddProcessId(int processId);
    00075
    00078   void RemoveProcessId(int processId);
    00079
    00082   int FindProcessId(int processId);
    00083
    00086   int GetProcessId(int pos);
    00087
    00090   void CopyProcessIdsFrom(vtkMPIGroup* group);
    00091
    00093
    00094   int GetNumberOfProcessIds()
    00095     {
    00096       return this->CurrentPosition;
    00097     }
    00099
    00100 //BTX
    00101
    00102   friend class vtkMPICommunicator;
    00103
    00104 //ETX
    00105
    00106 protected:
    00107
    00110   void CopyFrom(vtkMPIGroup* group);
    00111
    00113   void Initialize(int numProcIds);
    00114
    00115   int* ProcessIds;
    00116   int MaximumNumberOfProcessIds;
    00117   int Initialized;
    00118   int CurrentPosition;
    00119
    00120   vtkMPIGroup();
    00121   ~vtkMPIGroup();
    00122
    00123 private:
    00124   vtkMPIGroup(const vtkMPIGroup&);  // Not implemented.
    00125   void operator=(const vtkMPIGroup&);  // Not implemented.
    00126 };
    00127
    00128 #endif
    00129
    00130
    00131
    00132