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

# vtkMPIGroup Class Reference

`#include <vtkMPIGroup.h>`

Inheritance diagram for vtkMPIGroup:

[legend]
Collaboration diagram for vtkMPIGroup:

[legend]
List of all members.

## Detailed Description

Class for creating MPI groups.

Date:
  2002/01/22 15:34:38

Revision:
  1.7

This class is used to create MPI groups. A vtkMPIGroup object has to be initialized by passing the controller. Then the group can be modified by adding, removing ids and copying the contents of another group.

See also:
  vtkMPIController vtkMPICommunicator

Created by:
  - Geveci, Berk

CVS contributions (if > 5%):
  - Geveci, Berk (90%)
  - Schroeder, Will (6%)

CVS logs (CVSweb):
  - .`h` (`/Parallel/vtkMPIGroup.h)`
  - .`cxx` (`/Parallel/vtkMPIGroup.cxx)`

Tests:
  vtkMPIGroup (Tests)

Definition at line 54 of file vtkMPIGroup.h.

## Public Types
typedef vtkObject | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
virtual void | PrintSelf (ostream &os, vtkIndent indent)
void | Initialize (vtkMPIController *controller)
int | AddProcessId (int processId)
void | RemoveProcessId (int processId)
int | FindProcessId (int processId)
int | GetProcessId (int pos)
void | CopyProcessIdsFrom (vtkMPIGroup *group)
int | GetNumberOfProcessIds ()
## Static Public Methods
int | IsTypeOf (const char *type)
vtkMPIGroup * | SafeDownCast (vtkObject *o)
vtkMPIGroup * | New ()
## Protected Methods
void | CopyFrom (vtkMPIGroup *group)
void | Initialize (int numProcIds)
| vtkMPIGroup ()
| ~vtkMPIGroup ()
## Protected Attributes
int * | ProcessIds
int | MaximumNumberOfProcessIds
int | Initialized
int | CurrentPosition
## Friends
class | vtkMPICommunicator

## Member Typedef Documentation

typedef vtkObject vtkMPIGroup::Superclass

| Reimplemented from vtkObject. Definition at line 59 of file vtkMPIGroup.h.

## Constructor & Destructor Documentation

vtkMPIGroup::vtkMPIGroup | ( |  | ) | `[protected]`

vtkMPIGroup::~vtkMPIGroup | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkMPIGroup::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject.

int vtkMPIGroup::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

virtual int vtkMPIGroup::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

vtkMPIGroup* vtkMPIGroup::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject.

vtkMPIGroup* vtkMPIGroup::New | ( |  | ) | `[static]`

| Construct a vtkMPIGroup with the following initial state: Processes = 0, MaximumNumberOfProcesses = 0. Reimplemented from vtkObject.

virtual void vtkMPIGroup::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject.

void vtkMPIGroup::Initialize | ( | vtkMPIController * | controller | ) |

| Allocate memory for N process ids where N = controller->NumberOfProcesses

int vtkMPIGroup::AddProcessId | ( | int | processId | ) |

| Add a process id to the end of the list (if it is not already in the group). Returns non-zero on success. This will not add a process id >= MaximumNumberOfProcessIds.

void vtkMPIGroup::RemoveProcessId | ( | int | processId | ) |

| Remove the given process id from the list and shift all ids, starting from the position of the removed id, left by one.

int vtkMPIGroup::FindProcessId | ( | int | processId | ) |

| Find the location of a process id in the group. Returns -1 if the process id is not on the list.

int vtkMPIGroup::GetProcessId | ( | int | pos | ) |

| Get the process id at position pos. Returns -1 if pos >= max. available pos.

void vtkMPIGroup::CopyProcessIdsFrom | ( | vtkMPIGroup * | group | ) |

| Copy the process ids from a given group. This will copy N ids, where N is the smallest MaximumNumberOfProcessIds.

int vtkMPIGroup::GetNumberOfProcessIds | ( |  | ) | `[inline]`

| Returns the number of ids currently stored. Definition at line 94 of file vtkMPIGroup.h.

void vtkMPIGroup::CopyFrom | ( | vtkMPIGroup * | group | ) | `[protected]`

| Copies all the information from group, erasing previously stored data. Similar to copy constructor

void vtkMPIGroup::Initialize | ( | int | numProcIds | ) | `[protected]`

| Allocate memory for numProcIds process ids

## Friends And Related Function Documentation

friend class vtkMPICommunicator`[friend]`

| Definition at line 102 of file vtkMPIGroup.h.

## Member Data Documentation

int* vtkMPIGroup::ProcessIds`[protected]`

| Definition at line 115 of file vtkMPIGroup.h.

int vtkMPIGroup::MaximumNumberOfProcessIds`[protected]`

| Definition at line 116 of file vtkMPIGroup.h.

int vtkMPIGroup::Initialized`[protected]`

| Definition at line 117 of file vtkMPIGroup.h.

int vtkMPIGroup::CurrentPosition`[protected]`

| Definition at line 118 of file vtkMPIGroup.h.

The documentation for this class was generated from the following file:

- Parallel/vtkMPIGroup.h