EpetraExt  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
EpetraExt::DistArray< T > Class Template Reference

DistArray<T>: A class to store row-oriented multivectors of type T. More...

#include <EpetraExt_DistArray.h>

Inheritance diagram for EpetraExt::DistArray< T >:
Inheritance graph
[legend]
 DistArray (const Epetra_Map &Map, const int RowSize)
 Constructor for a given Map and RowSize. More...
 
int MyLength () const
 Returns the length of the locally owned array. More...
 
int GlobalLength () const
 Returns the global length of the array. More...
 
int RowSize () const
 Returns the row size, that is, the amount of data associated with each element. More...
 
T & operator() (const int LEID, const int ID)
 Returns a reference to the ID component of the LEID local element. More...
 
T & operator() (const int GEID, const int ID, const bool isLocal)
 
void Print (std::ostream &os) const
 Prints the array on the specified stream. More...
 
int NextGID ()
 
int FirstGID ()
 
const std::vector< T > & ExtractView () const
 Extracts a view of the array. More...
 
T * Values ()
 Returns a pointer to the internally stored data (non-const version). More...
 
const T * Values () const
 Returns a pointer to the internally stored data (const version). More...
 

Additional Inherited Members

Detailed Description

template<class T>
class EpetraExt::DistArray< T >

DistArray<T>: A class to store row-oriented multivectors of type T.

Class DistArray allows the construction and usage of multivectors. These vectors contain element of type T, and the storage is row-oriented, and not column-oriented as in class Epetra_MultiVector. As such, this class should be used as a container for data, on which no BLAS-like operations are performed.

DistArray objects are indentified by an Epetra_Map and a RowSize. The map specifies the distribution of the elements across the processors and therefore the number of local elements, while the RowSize gives the total number of data assigned to each node. RowSize is constant for all elements.

DistArray is derived from Epetra_DistObject, and it can therefore be redistributed using Import/Export instructions.

The typical usage of this class is as follows:

EpetraExt::DistArray<double> COO(VertexMap, NumDimensions);
// set the value of the j-th dimension of the i-th local node i:
COO(i, j) = 1.24
Author
Marzio Sala, ETHZ/D-INFK.
Date
Last updated on Mar-06.

Definition at line 85 of file EpetraExt_DistArray.h.

Constructor & Destructor Documentation

template<class T>
EpetraExt::DistArray< T >::DistArray ( const Epetra_Map Map,
const int  RowSize 
)
inline

Constructor for a given Map and RowSize.

Definition at line 91 of file EpetraExt_DistArray.h.

Member Function Documentation

template<class T>
int EpetraExt::DistArray< T >::MyLength ( ) const
inline

Returns the length of the locally owned array.

Definition at line 113 of file EpetraExt_DistArray.h.

template<class T>
int EpetraExt::DistArray< T >::GlobalLength ( ) const
inline

Returns the global length of the array.

Definition at line 119 of file EpetraExt_DistArray.h.

template<class T>
int EpetraExt::DistArray< T >::RowSize ( ) const
inline

Returns the row size, that is, the amount of data associated with each element.

Definition at line 125 of file EpetraExt_DistArray.h.

template<class T>
T& EpetraExt::DistArray< T >::operator() ( const int  LEID,
const int  ID 
)
inline

Returns a reference to the ID component of the LEID local element.

Definition at line 131 of file EpetraExt_DistArray.h.

template<class T>
T& EpetraExt::DistArray< T >::operator() ( const int  GEID,
const int  ID,
const bool  isLocal 
)
inline

Definition at line 137 of file EpetraExt_DistArray.h.

template<class T>
void EpetraExt::DistArray< T >::Print ( std::ostream &  os) const
inlinevirtual

Prints the array on the specified stream.

Reimplemented from Epetra_DistObject.

Definition at line 146 of file EpetraExt_DistArray.h.

template<class T>
int EpetraExt::DistArray< T >::NextGID ( )
inline

Definition at line 176 of file EpetraExt_DistArray.h.

template<class T>
int EpetraExt::DistArray< T >::FirstGID ( )
inline

Definition at line 185 of file EpetraExt_DistArray.h.

template<class T>
const std::vector<T>& EpetraExt::DistArray< T >::ExtractView ( ) const
inline

Extracts a view of the array.

Definition at line 192 of file EpetraExt_DistArray.h.

template<class T>
T* EpetraExt::DistArray< T >::Values ( )
inline

Returns a pointer to the internally stored data (non-const version).

Definition at line 198 of file EpetraExt_DistArray.h.

template<class T>
const T* EpetraExt::DistArray< T >::Values ( ) const
inline

Returns a pointer to the internally stored data (const version).

Definition at line 204 of file EpetraExt_DistArray.h.


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