Epetra_SerialComm Class Reference

Epetra_SerialComm: The Epetra Serial Communication Class. More...

#include <Epetra_SerialComm.h>

Inheritance diagram for Epetra_SerialComm:

Inheritance graph
[legend]
List of all members.

Constructor/Destructor Methods

 Epetra_SerialComm ()
 Epetra_SerialComm Serial Constructor.
 Epetra_SerialComm (const Epetra_SerialComm &Comm)
 Epetra_SerialComm Copy Constructor.
Epetra_CommClone () const
 Clone method.
virtual ~Epetra_SerialComm ()
 Epetra_SerialComm Destructor.

Barrier Methods

void Barrier () const
 Epetra_SerialComm Barrier function.

Broadcast Methods

int Broadcast (double *MyVals, int Count, int Root) const
 Epetra_SerialComm Broadcast function.
int Broadcast (int *MyVals, int Count, int Root) const
 Epetra_SerialComm Broadcast function.
int Broadcast (long *MyVals, int Count, int Root) const
 Epetra_SerialComm Broadcast function.
int Broadcast (char *MyVals, int Count, int Root) const
 Epetra_SerialComm Broadcast function.

Gather Methods

int GatherAll (double *MyVals, double *AllVals, int Count) const
 Epetra_SerialComm All Gather function.
int GatherAll (int *MyVals, int *AllVals, int Count) const
 Epetra_SerialComm All Gather function.
int GatherAll (long *MyVals, long *AllVals, int Count) const
 Epetra_SerialComm All Gather function.

Sum Methods

int SumAll (double *PartialSums, double *GlobalSums, int Count) const
 Epetra_SerialComm Global Sum function.
int SumAll (int *PartialSums, int *GlobalSums, int Count) const
 Epetra_SerialComm Global Sum function.
int SumAll (long *PartialSums, long *GlobalSums, int Count) const
 Epetra_SerialComm Global Sum function.

Max/Min Methods

int MaxAll (double *PartialMaxs, double *GlobalMaxs, int Count) const
 Epetra_SerialComm Global Max function.
int MaxAll (int *PartialMaxs, int *GlobalMaxs, int Count) const
 Epetra_SerialComm Global Max function.
int MaxAll (long *PartialMaxs, long *GlobalMaxs, int Count) const
 Epetra_SerialComm Global Max function.
int MinAll (double *PartialMins, double *GlobalMins, int Count) const
 Epetra_SerialComm Global Min function.
int MinAll (int *PartialMins, int *GlobalMins, int Count) const
 Epetra_SerialComm Global Min function.
int MinAll (long *PartialMins, long *GlobalMins, int Count) const
 Epetra_SerialComm Global Min function.

Parallel Prefix Methods

int ScanSum (double *MyVals, double *ScanSums, int Count) const
 Epetra_SerialComm Scan Sum function.
int ScanSum (int *MyVals, int *ScanSums, int Count) const
 Epetra_SerialComm Scan Sum function.
int ScanSum (long *MyVals, long *ScanSums, int Count) const
 Epetra_SerialComm Scan Sum function.

Attribute Accessor Methods

int MyPID () const
 Return my process ID.
int NumProc () const
 Returns total number of processes (always returns 1 for SerialComm).

Gather/Scatter and Directory Constructors

Epetra_DistributorCreateDistributor () const
 Create a distributor object.
Epetra_DirectoryCreateDirectory (const Epetra_BlockMap &Map) const
 Create a directory object for the given Epetra_BlockMap.

Print object to an output stream

void Print (ostream &os) const
 Print method that implements Epetra_Object virtual Print method.
void PrintInfo (ostream &os) const
 Print method that implements Epetra_Comm virtual PrintInfo method.

Expert Users and Developers Only

int ReferenceCount () const
 Returns the reference count of SerialCommData.
const Epetra_SerialCommDataDataPtr () const
 Returns a pointer to the SerialCommData instance this SerialComm uses.

Public Member Functions

Epetra_SerialCommoperator= (const Epetra_SerialComm &Comm)
 Assignment Operator.

Private Member Functions

void CleanupData ()

Private Attributes

Epetra_SerialCommDataSerialCommData_

Detailed Description

Epetra_SerialComm: The Epetra Serial Communication Class.

The Epetra_SerialComm class is an implementation of Epetra_Comm, providing the general information and services needed for other Epetra classes to run on a serial computer.

Definition at line 49 of file Epetra_SerialComm.h.


Constructor & Destructor Documentation

Epetra_SerialComm::Epetra_SerialComm (  ) 

Epetra_SerialComm Serial Constructor.

Builds an instance of a serial communicator. Even if the application is running in parallel via MPI, this communicator will execute in serial. The access functions return the number of processors to be 1 and the processor ID to be 0.

Definition at line 35 of file Epetra_SerialComm.cpp.

Epetra_SerialComm::Epetra_SerialComm ( const Epetra_SerialComm Comm  ) 

Epetra_SerialComm Copy Constructor.

Makes an exact copy of an existing Epetra_SerialComm instance.

Definition at line 40 of file Epetra_SerialComm.cpp.

Epetra_SerialComm::~Epetra_SerialComm (  )  [virtual]

Epetra_SerialComm Destructor.

Completely deletes a Epetra_SerialComm object.

Warning:
Note: All objects that depend on a Epetra_SerialComm instance should be destroyed prior to calling this function.

Definition at line 164 of file Epetra_SerialComm.cpp.


Member Function Documentation

Epetra_Comm* Epetra_SerialComm::Clone (  )  const [inline, virtual]

Clone method.

Implements Epetra_Comm.

Definition at line 70 of file Epetra_SerialComm.h.

void Epetra_SerialComm::Barrier (  )  const [virtual]

Epetra_SerialComm Barrier function.

A no-op for a serial communicator.

Implements Epetra_Comm.

Definition at line 47 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::Broadcast ( double *  MyVals,
int  Count,
int  Root 
) const [virtual]

Epetra_SerialComm Broadcast function.

A no-op for a serial communicator.

Parameters:
MyVals InOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
Count In On entry, contains the length of the list of MyVals.
Root In On entry, contains the processor from which all processors will receive a copy of MyVals.

Implements Epetra_Comm.

Definition at line 49 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::Broadcast ( int *  MyVals,
int  Count,
int  Root 
) const [virtual]

Epetra_SerialComm Broadcast function.

A no-op for a serial communicator.

Parameters:
MyVals InOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
Count In On entry, contains the length of the list of MyVals.
Root In On entry, contains the processor from which all processors will receive a copy of MyVals.

Implements Epetra_Comm.

Definition at line 56 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::Broadcast ( long *  MyVals,
int  Count,
int  Root 
) const [virtual]

Epetra_SerialComm Broadcast function.

A no-op for a serial communicator.

Parameters:
MyVals InOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
Count In On entry, contains the length of the list of MyVals.
Root In On entry, contains the processor from which all processors will receive a copy of MyVals.

Implements Epetra_Comm.

Definition at line 63 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::Broadcast ( char *  MyVals,
int  Count,
int  Root 
) const [virtual]

Epetra_SerialComm Broadcast function.

A no-op for a serial communicator.

Parameters:
MyVals InOut On entry, the root processor contains the list of values. On exit, all processors will have the same list of values. Note that values must be allocated on all processor before the broadcast.
Count In On entry, contains the length of the list of MyVals.
Root In On entry, contains the processor from which all processors will receive a copy of MyVals.

Implements Epetra_Comm.

Definition at line 70 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::GatherAll ( double *  MyVals,
double *  AllVals,
int  Count 
) const [virtual]

Epetra_SerialComm All Gather function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values, to be sent to all processors.
AllVals Out On exit, contains the list of values from all processors. Must by of size NumProc*Count.
Count In On entry, contains the length of the list of MyVals.

Implements Epetra_Comm.

Definition at line 77 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::GatherAll ( int *  MyVals,
int *  AllVals,
int  Count 
) const [virtual]

Epetra_SerialComm All Gather function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values, to be sent to all processors.
AllVals Out On exit, contains the list of values from all processors. Must by of size NumProc*Count.
Count In On entry, contains the length of the list of MyVals.

Implements Epetra_Comm.

Definition at line 82 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::GatherAll ( long *  MyVals,
long *  AllVals,
int  Count 
) const [virtual]

Epetra_SerialComm All Gather function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values, to be sent to all processors.
AllVals Out On exit, contains the list of values from all processors. Must by of size NumProc*Count.
Count In On entry, contains the length of the list of MyVals.

Implements Epetra_Comm.

Definition at line 87 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::SumAll ( double *  PartialSums,
double *  GlobalSums,
int  Count 
) const [virtual]

Epetra_SerialComm Global Sum function.

A copy for a serial communicator.

Parameters:
PartialSums In On entry, contains the list of values, usually partial sums computed locally, to be summed across all processors.
GlobalSums Out On exit, contains the list of values summed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 92 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::SumAll ( int *  PartialSums,
int *  GlobalSums,
int  Count 
) const [virtual]

Epetra_SerialComm Global Sum function.

A copy for a serial communicator.

Parameters:
PartialSums In On entry, contains the list of values, usually partial sums computed locally, to be summed across all processors.
GlobalSums Out On exit, contains the list of values summed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 97 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::SumAll ( long *  PartialSums,
long *  GlobalSums,
int  Count 
) const [virtual]

Epetra_SerialComm Global Sum function.

A copy for a serial communicator.

Parameters:
PartialSums In On entry, contains the list of values, usually partial sums computed locally, to be summed across all processors.
GlobalSums Out On exit, contains the list of values summed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 102 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MaxAll ( double *  PartialMaxs,
double *  GlobalMaxs,
int  Count 
) const [virtual]

Epetra_SerialComm Global Max function.

A copy for a serial communicator.

Parameters:
PartialMaxs In On entry, contains the list of values, usually partial maxs computed locally, using these Partial Maxs, the max across all processors will be computed.
GlobalMaxs Out On exit, contains the list of maxs computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 107 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MaxAll ( int *  PartialMaxs,
int *  GlobalMaxs,
int  Count 
) const [virtual]

Epetra_SerialComm Global Max function.

A copy for a serial communicator.

Parameters:
PartialMaxs In On entry, contains the list of values, usually partial maxs computed locally; using these Partial Maxs, the max across all processors will be computed.
GlobalMaxs Out On exit, contains the list of maxs computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 112 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MaxAll ( long *  PartialMaxs,
long *  GlobalMaxs,
int  Count 
) const [virtual]

Epetra_SerialComm Global Max function.

A copy for a serial communicator.

Parameters:
PartialMaxs In On entry, contains the list of values, usually partial maxs computed locally; using these Partial Maxs, the max across all processors will be computed.
GlobalMaxs Out On exit, contains the list of maxs computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 117 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MinAll ( double *  PartialMins,
double *  GlobalMins,
int  Count 
) const [virtual]

Epetra_SerialComm Global Min function.

A copy for a serial communicator.

Parameters:
PartialMins In On entry, contains the list of values, usually partial mins computed locally; using these Partial Mins, the min across all processors will be computed.
GlobalMins Out On exit, contains the list of mins computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 122 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MinAll ( int *  PartialMins,
int *  GlobalMins,
int  Count 
) const [virtual]

Epetra_SerialComm Global Min function.

A copy for a serial communicator.

Parameters:
PartialMins In On entry, contains the list of values, usually partial mins computed locally; using these Partial Mins, the min across all processors will be computed.
GlobalMins Out On exit, contains the list of mins computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 127 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MinAll ( long *  PartialMins,
long *  GlobalMins,
int  Count 
) const [virtual]

Epetra_SerialComm Global Min function.

A copy for a serial communicator.

Parameters:
PartialMins In On entry, contains the list of values, usually partial mins computed locally; using these Partial Mins, the min across all processors will be computed.
GlobalMins Out On exit, contains the list of mins computed across all processors.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 132 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::ScanSum ( double *  MyVals,
double *  ScanSums,
int  Count 
) const [virtual]

Epetra_SerialComm Scan Sum function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values to be summed across all processors.
ScanSums Out On exit, contains the list of values summed across processors 0 through i.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 137 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::ScanSum ( int *  MyVals,
int *  ScanSums,
int  Count 
) const [virtual]

Epetra_SerialComm Scan Sum function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values to be summed across all processors.
ScanSums Out On exit, contains the list of values summed across processors 0 through i.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 142 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::ScanSum ( long *  MyVals,
long *  ScanSums,
int  Count 
) const [virtual]

Epetra_SerialComm Scan Sum function.

A copy for a serial communicator.

Parameters:
MyVals In On entry, contains the list of values to be summed across all processors.
ScanSums Out On exit, contains the list of values summed across processors 0 through i.
Count In On entry, contains the length of the list of values.

Implements Epetra_Comm.

Definition at line 147 of file Epetra_SerialComm.cpp.

int Epetra_SerialComm::MyPID (  )  const [inline, virtual]

Return my process ID.

In MPI mode returns the rank of the calling process. In serial mode returns 0.

Implements Epetra_Comm.

Definition at line 347 of file Epetra_SerialComm.h.

int Epetra_SerialComm::NumProc (  )  const [inline, virtual]

Returns total number of processes (always returns 1 for SerialComm).

Implements Epetra_Comm.

Definition at line 350 of file Epetra_SerialComm.h.

Epetra_Distributor * Epetra_SerialComm::CreateDistributor (  )  const [virtual]

Create a distributor object.

Implements Epetra_Comm.

Definition at line 152 of file Epetra_SerialComm.cpp.

Epetra_Directory * Epetra_SerialComm::CreateDirectory ( const Epetra_BlockMap Map  )  const [virtual]

Create a directory object for the given Epetra_BlockMap.

Implements Epetra_Comm.

Definition at line 158 of file Epetra_SerialComm.cpp.

void Epetra_SerialComm::Print ( ostream &  os  )  const [inline, virtual]

Print method that implements Epetra_Object virtual Print method.

Reimplemented from Epetra_Object.

Definition at line 365 of file Epetra_SerialComm.h.

void Epetra_SerialComm::PrintInfo ( ostream &  os  )  const [inline, virtual]

Print method that implements Epetra_Comm virtual PrintInfo method.

Implements Epetra_Comm.

Definition at line 381 of file Epetra_SerialComm.h.

int Epetra_SerialComm::ReferenceCount (  )  const

Returns the reference count of SerialCommData.

(Intended for testing purposes.)

Definition at line 187 of file Epetra_SerialComm.cpp.

const Epetra_SerialCommData* Epetra_SerialComm::DataPtr (  )  const [inline]

Returns a pointer to the SerialCommData instance this SerialComm uses.

(Intended for developer use only for testing purposes.)

Definition at line 396 of file Epetra_SerialComm.h.

Epetra_SerialComm & Epetra_SerialComm::operator= ( const Epetra_SerialComm Comm  ) 

Assignment Operator.

Definition at line 168 of file Epetra_SerialComm.cpp.

void Epetra_SerialComm::CleanupData (  )  [private]

Definition at line 177 of file Epetra_SerialComm.cpp.


Member Data Documentation

Epetra_SerialCommData* Epetra_SerialComm::SerialCommData_ [private]

Definition at line 406 of file Epetra_SerialComm.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 13 09:23:41 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7