Tpetra::DistObject< Ordinal, Scalar > Class Template Reference

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

#include <Tpetra_DistObject.hpp>

Inheritance diagram for Tpetra::DistObject< Ordinal, Scalar >:

Teuchos::Object Tpetra::MultiVector< Ordinal, Scalar > Tpetra::Vector< Ordinal, Scalar > List of all members.

Public Member Functions

Constructor/Destructor Methods
 DistObject (const Map< Ordinal > &map, Teuchos::RCP< const Teuchos::Comm< Ordinal > > comm)
 constructor
 DistObject (const Map< Ordinal > &map, Teuchos::RCP< const Teuchos::Comm< Ordinal > > comm, const std::string &Label)
 constructor, taking label
 DistObject (const DistObject< Ordinal, Scalar > &source)
 copy constructor
virtual ~DistObject ()
 destructor
Import/Export Methods
void doImport (const DistObject< Ordinal, Scalar > &source, const Import< Ordinal > &importer, CombineMode CM)
 Import.
void doExport (const DistObject< Ordinal, Scalar > &dest, const Export< Ordinal > &exporter, CombineMode CM)
 Export.
void doImport (const DistObject< Ordinal, Scalar > &source, const Export< Ordinal > &exporter, CombineMode CM)
 Import (using an Exporter).
void doExport (const DistObject< Ordinal, Scalar > &dest, const Import< Ordinal > &importer, CombineMode CM)
 Export (using an Importer).
Attribute Accessor Methods
bool isDistributed () const
 Accessor for whether or not this is a global object.
const Map< Ordinal > & getMap () const
 Access function for the Tpetra::Map this DistObject was constructed with.
I/O methods
void print (std::ostream &os) const
 Print method.

Protected Member Functions

virtual void doTransfer (const DistObject< Ordinal, Scalar > &source, CombineMode CM, Ordinal numSameIDs, const Teuchos::ArrayView< const Ordinal > &permuteToLIDs, const Teuchos::ArrayView< const Ordinal > &permuteFromLIDs, const Teuchos::ArrayView< const Ordinal > &remoteLIDs, const Teuchos::ArrayView< const Ordinal > &exportLIDs, Distributor< Ordinal > &distor, bool doReverse)
 Perform transfer (redistribution) of data across memory images.
virtual bool checkSizes (const DistObject< Ordinal, Scalar > &source, Ordinal &packetSize)=0
 Allows the source and target (this) objects to be compared for compatibility.
virtual void copyAndPermute (const DistObject< Ordinal, Scalar > &source, Ordinal numSameIDs, const Teuchos::ArrayView< const Ordinal > &permuteToLIDs, const Teuchos::ArrayView< const Ordinal > &permuteFromLIDs)=0
 Perform copies and permutations that are local to this image.
virtual void packAndPrepare (const DistObject< Ordinal, Scalar > &source, const Teuchos::ArrayView< const Ordinal > &exportLIDs, const Teuchos::ArrayView< Scalar > &exports, Distributor< Ordinal > &distor)=0
 Perform any packing or preparation required for communication.
virtual void unpackAndCombine (const Teuchos::ArrayView< const Ordinal > &importLIDs, const Teuchos::ArrayView< const Scalar > &imports, Distributor< Ordinal > &distor, CombineMode CM)=0
 Perform any unpacking and combining after communication.

Detailed Description

template<typename Ordinal, typename Scalar>
class Tpetra::DistObject< Ordinal, Scalar >

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

The DistObject is a base class for all Tpetra distributed global objects. It provides the basic mechanisms and interface specifications for importing and exporting operations using Tpetra::Import and Tpetra::Export objects.

Distributed Global vs. Replicated Local.


Constructor & Destructor Documentation

template<typename Ordinal, typename Scalar>
Tpetra::DistObject< Ordinal, Scalar >::DistObject ( const Map< Ordinal > &  map,
Teuchos::RCP< const Teuchos::Comm< Ordinal > >  comm 
)

constructor

template<typename Ordinal, typename Scalar>
Tpetra::DistObject< Ordinal, Scalar >::DistObject ( const Map< Ordinal > &  map,
Teuchos::RCP< const Teuchos::Comm< Ordinal > >  comm,
const std::string &  Label 
)

constructor, taking label

template<typename Ordinal, typename Scalar>
Tpetra::DistObject< Ordinal, Scalar >::DistObject ( const DistObject< Ordinal, Scalar > &  source  ) 

copy constructor

template<typename Ordinal, typename Scalar>
Tpetra::DistObject< Ordinal, Scalar >::~DistObject (  )  [virtual]

destructor


Member Function Documentation

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::doImport ( const DistObject< Ordinal, Scalar > &  source,
const Import< Ordinal > &  importer,
CombineMode  CM 
)

Import.

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::doExport ( const DistObject< Ordinal, Scalar > &  dest,
const Export< Ordinal > &  exporter,
CombineMode  CM 
)

Export.

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::doImport ( const DistObject< Ordinal, Scalar > &  source,
const Export< Ordinal > &  exporter,
CombineMode  CM 
)

Import (using an Exporter).

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::doExport ( const DistObject< Ordinal, Scalar > &  dest,
const Import< Ordinal > &  importer,
CombineMode  CM 
)

Export (using an Importer).

template<typename Ordinal, typename Scalar>
bool Tpetra::DistObject< Ordinal, Scalar >::isDistributed (  )  const [inline]

Accessor for whether or not this is a global object.

template<typename Ordinal, typename Scalar>
const Map< Ordinal > & Tpetra::DistObject< Ordinal, Scalar >::getMap (  )  const [inline]

Access function for the Tpetra::Map this DistObject was constructed with.

Reimplemented in Tpetra::Vector< Ordinal, Scalar >.

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::print ( std::ostream &  os  )  const [virtual]

Print method.

Reimplemented from Teuchos::Object.

Reimplemented in Tpetra::MultiVector< Ordinal, Scalar >, and Tpetra::Vector< Ordinal, Scalar >.

template<typename Ordinal, typename Scalar>
void Tpetra::DistObject< Ordinal, Scalar >::doTransfer ( const DistObject< Ordinal, Scalar > &  source,
CombineMode  CM,
Ordinal  numSameIDs,
const Teuchos::ArrayView< const Ordinal > &  permuteToLIDs,
const Teuchos::ArrayView< const Ordinal > &  permuteFromLIDs,
const Teuchos::ArrayView< const Ordinal > &  remoteLIDs,
const Teuchos::ArrayView< const Ordinal > &  exportLIDs,
Distributor< Ordinal > &  distor,
bool  doReverse 
) [protected, virtual]

Perform transfer (redistribution) of data across memory images.

template<typename Ordinal, typename Scalar>
virtual bool Tpetra::DistObject< Ordinal, Scalar >::checkSizes ( const DistObject< Ordinal, Scalar > &  source,
Ordinal &  packetSize 
) [protected, pure virtual]

Allows the source and target (this) objects to be compared for compatibility.

Return true if they are compatible, return false if they aren't. Also return the number of Scalar variables representing an entry.

Implemented in Tpetra::MultiVector< Ordinal, Scalar >.

template<typename Ordinal, typename Scalar>
virtual void Tpetra::DistObject< Ordinal, Scalar >::copyAndPermute ( const DistObject< Ordinal, Scalar > &  source,
Ordinal  numSameIDs,
const Teuchos::ArrayView< const Ordinal > &  permuteToLIDs,
const Teuchos::ArrayView< const Ordinal > &  permuteFromLIDs 
) [protected, pure virtual]

Perform copies and permutations that are local to this image.

Parameters:
source In On entry, the DistObject that we are importing from.
numSameIDs In On entry, the number of elements that are the same on the source and dest objects. (i.e. The element is owned by the same image in both source and dest, and no permutation occurs.)
numPermuteIDs In On entry, the number of elements that are locally permuted between source and dest objects.
permuteToLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the destination DistObject.)
permuteFromLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the source DistObject.)

Implemented in Tpetra::MultiVector< Ordinal, Scalar >.

template<typename Ordinal, typename Scalar>
virtual void Tpetra::DistObject< Ordinal, Scalar >::packAndPrepare ( const DistObject< Ordinal, Scalar > &  source,
const Teuchos::ArrayView< const Ordinal > &  exportLIDs,
const Teuchos::ArrayView< Scalar > &  exports,
Distributor< Ordinal > &  distor 
) [protected, pure virtual]

Perform any packing or preparation required for communication.

Parameters:
source In On entry, the DistObject that we are importing from.
exportLIDs In On entry, a list of the entries we will be sending to other images. (Listed by their LID in the source DistObject.)
exports Out On exit, buffer for data we will be sending out.
distor In On entry, contains the Distributor object we are using.

Implemented in Tpetra::MultiVector< Ordinal, Scalar >.

template<typename Ordinal, typename Scalar>
virtual void Tpetra::DistObject< Ordinal, Scalar >::unpackAndCombine ( const Teuchos::ArrayView< const Ordinal > &  importLIDs,
const Teuchos::ArrayView< const Scalar > &  imports,
Distributor< Ordinal > &  distor,
CombineMode  CM 
) [protected, pure virtual]

Perform any unpacking and combining after communication.

Parameters:
importLIDs In On entry, a list of the entries we received from other images. (Listed by their LID in the target DistObject.)
imports In Buffer containing data we received.
distor In The Distributor object we are using.
CM In The Tpetra::CombineMode to use when combining the imported entries with existing entries.

Implemented in Tpetra::MultiVector< Ordinal, Scalar >.


The documentation for this class was generated from the following file:
Generated on Wed May 12 21:59:41 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7