Epetra Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
Epetra_DistObject Class Referenceabstract

Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in parallel. More...

#include <Epetra_DistObject.h>

Inheritance diagram for Epetra_DistObject:

Virtual methods to be implemented by derived class

Epetra_BlockMap Map_
 
const Epetra_CommComm_
 
char * Exports_
 
char * Imports_
 
int LenExports_
 
int LenImports_
 
int * Sizes_
 
virtual int CheckSizes (const Epetra_SrcDistObject &Source)=0
 Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
 
virtual int CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)=0
 Perform ID copies and permutations that are on processor.
 
virtual int PackAndPrepare (const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)=0
 Perform any packing or preparation required for call to DoTransfer().
 
virtual int UnpackAndCombine (const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)=0
 Perform any unpacking and combining after call to DoTransfer().
 
Epetra_DistObjectoperator= (const Epetra_DistObject &src)
 

Constructors/Destructor

 Epetra_DistObject (const Epetra_BlockMap &Map)
 Basic Epetra_DistObject constuctor.
 
 Epetra_DistObject (const Epetra_BlockMap &Map, const char *const Label)
 
 Epetra_DistObject (const Epetra_DistObject &Source)
 Epetra_DistObject copy constructor.
 
virtual ~Epetra_DistObject ()
 Epetra_DistObject destructor.
 

Import/Export Methods

int Import (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Imports an Epetra_DistObject using the Epetra_Import object.
 
int Import (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Imports an Epetra_DistObject using the Epetra_Export object.
 
int Export (const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Exports an Epetra_DistObject using the Epetra_Import object.
 
int Export (const Epetra_SrcDistObject &A, const Epetra_Export &Exporter, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
 Exports an Epetra_DistObject using the Epetra_Export object.
 

Attribute accessor methods

const Epetra_BlockMapMap () const
 Returns the address of the Epetra_BlockMap for this multi-vector.
 
const Epetra_CommComm () const
 Returns the address of the Epetra_Comm for this multi-vector.
 
bool DistributedGlobal () const
 Returns true if this multi-vector is distributed global, i.e., not local replicated.
 

Miscellaneous

virtual void Print (std::ostream &os) const
 Print method.
 

Internal utilities

virtual int DoTransfer (const Epetra_SrcDistObject &A, Epetra_CombineMode CombineMode, int NumSameIDs, int NumPermuteIDs, int NumRemoteIDs, int NumExportIDs, int *PermuteToLIDs, int *PermuteFromLIDs, int *RemoteLIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &LenImports, char *&Imports, Epetra_Distributor &Distor, bool DoReverse, const Epetra_OffsetIndex *Indexor)
 Perform actual transfer (redistribution) of data across memory images, using Epetra_Distributor object.
 

Additional Inherited Members

virtual int ReportError (const std::string Message, int ErrorCode) const
 Error reporting method.
 
 Epetra_Object (int TracebackModeIn=-1, bool set_label=true)
 Epetra_Object Constructor.
 
 Epetra_Object (const char *const Label, int TracebackModeIn=-1)
 Epetra_Object Constructor.
 
 Epetra_Object (const Epetra_Object &Object)
 Epetra_Object Copy Constructor.
 
virtual ~Epetra_Object ()
 Epetra_Object Destructor.
 
virtual void SetLabel (const char *const Label)
 Epetra_Object Label definition using char *.
 
virtual const char * Label () const
 Epetra_Object Label access funtion.
 
virtual ~Epetra_SrcDistObject ()
 Epetra_SrcDistObject destructor.
 
static void SetTracebackMode (int TracebackModeValue)
 Set the value of the Epetra_Object error traceback report mode.
 
static int GetTracebackMode ()
 Get the value of the Epetra_Object error report mode.
 
static std::ostream & GetTracebackStream ()
 Get the output stream for error reporting.
 
static int TracebackMode
 
std::string toString (const int &x) const
 
std::string toString (const long long &x) const
 
std::string toString (const double &x) const
 

Detailed Description

Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in parallel.

The Epetra_DistObject is a base class for all Epetra distributed global objects. It provides the basic mechanisms and interface specifications for importing and exporting operations using Epetra_Import and Epetra_Export objects.

Distributed Global vs. Replicated Local.

  • Distributed Global objects - In most instances, a distributed object will be partitioned across multiple memory images associated with multiple processors. In this case, there is a unique copy of each element and elements are spread across all processors specified by the Epetra_Comm communicator.
  • Replicated Local Objects - Some algorithms use objects that are too small to be distributed across all processors, the Hessenberg matrix in a GMRES computation. In other cases, such as with block iterative methods, block dot product functions produce small dense matrices that are required by all processors. Replicated local objectss handle these types of situation.

Definition at line 80 of file Epetra_DistObject.h.

Constructor & Destructor Documentation

◆ Epetra_DistObject() [1/3]

Epetra_DistObject::Epetra_DistObject ( const Epetra_BlockMap & Map)

Basic Epetra_DistObject constuctor.

Creates a Epetra_DistObject object.

Parameters
InMap - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap.
Warning
Note that, because Epetra_LocalMap derives from Epetra_Map and Epetra_Map derives from Epetra_BlockMap, this constructor works for all three types of Epetra map classes.
Returns
Pointer to a Epetra_DistObject.

Definition at line 54 of file Epetra_DistObject.cpp.

◆ Epetra_DistObject() [2/3]

Epetra_DistObject::Epetra_DistObject ( const Epetra_BlockMap & Map,
const char *const Label )

Creates a Epetra_DistObject object.

Parameters
InMap - A Epetra_LocalMap, Epetra_Map or Epetra_BlockMap.
Warning
Note that, because Epetra_LocalMap derives from Epetra_Map and Epetra_Map derives from Epetra_BlockMap, this constructor works for all three types of Epetra map classes.
Parameters
InLabel - An identifier for this object. By default, set to the name of the object class.
Returns
Pointer to a Epetra_DistObject.

Definition at line 68 of file Epetra_DistObject.cpp.

◆ Epetra_DistObject() [3/3]

Epetra_DistObject::Epetra_DistObject ( const Epetra_DistObject & Source)

Epetra_DistObject copy constructor.

Definition at line 82 of file Epetra_DistObject.cpp.

◆ ~Epetra_DistObject()

Epetra_DistObject::~Epetra_DistObject ( )
virtual

Epetra_DistObject destructor.

Definition at line 94 of file Epetra_DistObject.cpp.

Member Function Documentation

◆ Import() [1/2]

int Epetra_DistObject::Import ( const Epetra_SrcDistObject & A,
const Epetra_Import & Importer,
Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0 )

Imports an Epetra_DistObject using the Epetra_Import object.

Parameters
InSource - Distributed object that will be imported into the "\e this" object.
InImporter - A Epetra_Import object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns
Integer error code, set to 0 if successful.

Definition at line 113 of file Epetra_DistObject.cpp.

◆ Import() [2/2]

int Epetra_DistObject::Import ( const Epetra_SrcDistObject & A,
const Epetra_Export & Exporter,
Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0 )

Imports an Epetra_DistObject using the Epetra_Export object.

Parameters
InSource - Distributed object that will be imported into the "\e this" object.
InExporter - A Epetra_Export object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns
Integer error code, set to 0 if successful.

Definition at line 170 of file Epetra_DistObject.cpp.

◆ Export() [1/2]

int Epetra_DistObject::Export ( const Epetra_SrcDistObject & A,
const Epetra_Import & Importer,
Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0 )

Exports an Epetra_DistObject using the Epetra_Import object.

Parameters
InSource - Distributed object that will be exported to the "\e this" object.
InImporter - A Epetra_Import object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns
Integer error code, set to 0 if successful.

Definition at line 198 of file Epetra_DistObject.cpp.

◆ Export() [2/2]

int Epetra_DistObject::Export ( const Epetra_SrcDistObject & A,
const Epetra_Export & Exporter,
Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor = 0 )

Exports an Epetra_DistObject using the Epetra_Export object.

Parameters
InSource - Distributed object that will be exported to the "\e this" multivector.
InExporter - A Epetra_Export object specifying the communication required.
InCombineMode - A Epetra_CombineMode enumerated type specifying how results should be combined on the receiving processor.
Returns
Integer error code, set to 0 if successful.

Definition at line 142 of file Epetra_DistObject.cpp.

◆ Map()

const Epetra_BlockMap & Epetra_DistObject::Map ( ) const
inlinevirtual

Returns the address of the Epetra_BlockMap for this multi-vector.

Implements Epetra_SrcDistObject.

Reimplemented in Epetra_VbrMatrix.

Definition at line 192 of file Epetra_DistObject.h.

◆ Comm()

const Epetra_Comm & Epetra_DistObject::Comm ( ) const
inline

Returns the address of the Epetra_Comm for this multi-vector.

Definition at line 195 of file Epetra_DistObject.h.

◆ DistributedGlobal()

bool Epetra_DistObject::DistributedGlobal ( ) const
inline

Returns true if this multi-vector is distributed global, i.e., not local replicated.

Definition at line 198 of file Epetra_DistObject.h.

◆ Print()

void Epetra_DistObject::Print ( std::ostream & os) const
virtual

◆ DoTransfer()

int Epetra_DistObject::DoTransfer ( const Epetra_SrcDistObject & A,
Epetra_CombineMode CombineMode,
int NumSameIDs,
int NumPermuteIDs,
int NumRemoteIDs,
int NumExportIDs,
int * PermuteToLIDs,
int * PermuteFromLIDs,
int * RemoteLIDs,
int * ExportLIDs,
int & LenExports,
char *& Exports,
int & LenImports,
char *& Imports,
Epetra_Distributor & Distor,
bool DoReverse,
const Epetra_OffsetIndex * Indexor )
protectedvirtual

Perform actual transfer (redistribution) of data across memory images, using Epetra_Distributor object.

Definition at line 226 of file Epetra_DistObject.cpp.

◆ CheckSizes()

virtual int Epetra_DistObject::CheckSizes ( const Epetra_SrcDistObject & Source)
protectedpure virtual

Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.

Implemented in Epetra_CrsGraph, Epetra_CrsMatrix, Epetra_IntMultiVector, Epetra_IntVector, Epetra_LongLongVector, Epetra_MapColoring, Epetra_MultiVector, and Epetra_VbrMatrix.

◆ CopyAndPermute()

virtual int Epetra_DistObject::CopyAndPermute ( const Epetra_SrcDistObject & Source,
int NumSameIDs,
int NumPermuteIDs,
int * PermuteToLIDs,
int * PermuteFromLIDs,
const Epetra_OffsetIndex * Indexor,
Epetra_CombineMode CombineMode = Zero )
protectedpure virtual

Perform ID copies and permutations that are on processor.

Implemented in Epetra_CrsGraph, Epetra_CrsMatrix, Epetra_IntMultiVector, Epetra_IntVector, Epetra_LongLongVector, Epetra_MapColoring, Epetra_MultiVector, and Epetra_VbrMatrix.

◆ PackAndPrepare()

virtual int Epetra_DistObject::PackAndPrepare ( const Epetra_SrcDistObject & Source,
int NumExportIDs,
int * ExportLIDs,
int & LenExports,
char *& Exports,
int & SizeOfPacket,
int * Sizes,
bool & VarSizes,
Epetra_Distributor & Distor )
protectedpure virtual

◆ UnpackAndCombine()

virtual int Epetra_DistObject::UnpackAndCombine ( const Epetra_SrcDistObject & Source,
int NumImportIDs,
int * ImportLIDs,
int LenImports,
char * Imports,
int & SizeOfPacket,
Epetra_Distributor & Distor,
Epetra_CombineMode CombineMode,
const Epetra_OffsetIndex * Indexor )
protectedpure virtual

◆ operator=()

Epetra_DistObject & Epetra_DistObject::operator= ( const Epetra_DistObject & src)
private

Definition at line 310 of file Epetra_DistObject.cpp.

Member Data Documentation

◆ Map_

Epetra_BlockMap Epetra_DistObject::Map_
protected

Definition at line 270 of file Epetra_DistObject.h.

◆ Comm_

const Epetra_Comm* Epetra_DistObject::Comm_
protected

Definition at line 271 of file Epetra_DistObject.h.

◆ Exports_

char* Epetra_DistObject::Exports_
protected

Definition at line 272 of file Epetra_DistObject.h.

◆ Imports_

char* Epetra_DistObject::Imports_
protected

Definition at line 273 of file Epetra_DistObject.h.

◆ LenExports_

int Epetra_DistObject::LenExports_
protected

Definition at line 274 of file Epetra_DistObject.h.

◆ LenImports_

int Epetra_DistObject::LenImports_
protected

Definition at line 275 of file Epetra_DistObject.h.

◆ Sizes_

int* Epetra_DistObject::Sizes_
protected

Definition at line 276 of file Epetra_DistObject.h.


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