Tpetra::ElementSpace< OrdinalType > Class Template Reference

Tpetra::ElementSpace: A class for constructing and using template<ordinalType> ElementSpaces. More...

#include <Tpetra_ElementSpace.hpp>

Inheritance diagram for Tpetra::ElementSpace< OrdinalType >:

Inheritance graph
[legend]
Collaboration diagram for Tpetra::ElementSpace< OrdinalType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ElementSpace (OrdinalType numGlobalElements, OrdinalType indexBase, Platform< OrdinalType, OrdinalType > const &Platform)
 Tpetra::ElementSpace constructor with Tpetra-defined contiguous uniform distribution.
 ElementSpace (OrdinalType numGlobalElements, OrdinalType numMyElements, OrdinalType indexBase, Platform< OrdinalType, OrdinalType > const &Platform)
 Tpetra::ElementSpace constructor with user-defined contiguous distribution.
 ElementSpace (OrdinalType numGlobalElements, OrdinalType numMyElements, std::vector< OrdinalType > const &elementList, OrdinalType indexBase, Platform< OrdinalType, OrdinalType > const &Platform)
 Tpetra::ElementSpace constructor with user-defined non-contiguous (arbitrary) distribution.
 ElementSpace (ElementSpace< OrdinalType > const &ElementSpace)
 Tpetra::ElementSpace copy constructor.
 ~ElementSpace ()
 Tpetra::ElementSpace destructor.
void getRemoteIDList (std::vector< OrdinalType > const &GIDList, std::vector< OrdinalType > &imageIDList, std::vector< OrdinalType > &LIDList) const
 Returns the image IDs and corresponding local IDs for a given list of global IDs.
void getRemoteIDList (std::vector< OrdinalType > const &GIDList, std::vector< OrdinalType > &imageIDList) const
 Returns only the image IDs for a given list of global IDs.
OrdinalType getLID (OrdinalType GID) const
 Returns local ID of global ID passed in, throws exception 1 if not found on this image.
OrdinalType getGID (OrdinalType LID) const
 Returns global ID of local ID passed in, throws exception 2 if not found on this image.
bool isMyGID (OrdinalType GID) const
 Returns true if global ID passed in belongs to the calling image, returns false if it doesn't.
bool isMyLID (OrdinalType LID) const
 Returns true if the local ID passed in belongs to the calling image, returns false if it doesn't.
OrdinalType getMinAllGID () const
 Returns the minimum global ID in this ElementSpace.
OrdinalType getMaxAllGID () const
 Returns the maximum global ID in this ElementSpace.
OrdinalType getMinMyGID () const
 Returns the minimum global ID owned by this image.
OrdinalType getMaxMyGID () const
 Returns the maximum global ID owned by this image.
OrdinalType getMinLID () const
 Returns the minimum local ID on the calling image.
OrdinalType getMaxLID () const
 Returns the maximum local ID on the calling image.
OrdinalType getNumGlobalElements () const
 Returns the number of elements in this ElementSpace.
OrdinalType getNumMyElements () const
 Returns the number of elements belonging to the calling image.
OrdinalType getIndexBase () const
 Returns the Index base for this ElementSpace. Normally 0 for C/C++ or 1 for Fortran, but can be anything.
bool isContiguous () const
 Returns true if this ElementSpace is distributed contiguously, returns false otherwise.
bool isGlobal () const
 Returns true if this ElementSpace is distributed across more than one image, returns false otherwise.
bool isSameAs (ElementSpace< OrdinalType > const &ElementSpace) const
 Returns true if the ElementSpace passed in is identical to this ElementSpace.
bool operator== (ElementSpace< OrdinalType > const &ElementSpace) const
bool operator!= (ElementSpace< OrdinalType > const &ElementSpace) const
std::vector< OrdinalType
> const & 
getMyGlobalElements () const
 Returns a reference to an internal array containing a list of the Global IDs assigned to the calling image.
void getMyGlobalElements (std::vector< OrdinalType > &elementList) const
 Puts list of global elements on this image into the user-provided array.
void print (ostream &os) const
 Prints the ElementSpace object to the output stream.
Comm< OrdinalType, OrdinalType
> const & 
comm () const
 Access functions for the Tpetra::Comm and Tpetra::Platform communicators.
Platform< OrdinalType, OrdinalType
> const & 
platform () const
ElementSpace< OrdinalType > & operator= (ElementSpace< OrdinalType > const &Source)
 Assignment operator.

Detailed Description

template<typename OrdinalType>
class Tpetra::ElementSpace< OrdinalType >

Tpetra::ElementSpace: A class for constructing and using template<ordinalType> ElementSpaces.

ElementSpace objects are defined to have an element size of 1. Variable element sizes are implemented in Tpetra::BlockElementSpace. Some ElementSpace methods throw exceptions, and should be enclosed in a try/catch block. All Tpetra_ElementSpace objects require a Tpetra_Platform object. Local IDs (LIDs) are always in the range [0, numMyElements).

ElementSpace error codes (positive for non-fatal, negative for fatal):

  1. +1 Specified Global ID not found on this image.
  2. +2 Specified Local ID not found on this image.
  3. -1 numGlobalElements < -1. Should be >= -1 (Should be >= 0 for a Tpetra-defined ElementSpace).
  4. -2 numMyElements < 0. Should be >= 0.
  5. -3 Invalid numGlobalElements. Should equal sum of myGlobalElements, or set to -1 to compute automatically.
  6. -4 Minimum global element index is less than index base.
  7. -99 Internal ElementSpace error. Contact developer.


Member Function Documentation

template<typename OrdinalType>
bool Tpetra::ElementSpace< OrdinalType >::isSameAs ( ElementSpace< OrdinalType > const &  ElementSpace  )  const [inline]

Returns true if the ElementSpace passed in is identical to this ElementSpace.

Also implemented through the == and != operators.

template<typename OrdinalType>
void Tpetra::ElementSpace< OrdinalType >::print ( ostream &  os  )  const [inline, virtual]

Prints the ElementSpace object to the output stream.

An << operator is inherited from Tpetra::Object, which uses the print method.

Reimplemented from Tpetra::Object.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:56:02 2009 for Tpetra by doxygen 1.4.7