queso-0.57.1
|
A class for partitioning vectors and matrices. More...
#include <DistArray.h>
Public Member Functions | |
Constructor/Destructor methods | |
DistArray (const Map &inputMap, const int inputRowSize) | |
Constructor for a given inputMap and inputRowSize. More... | |
~DistArray () | |
Destructor. More... | |
Query methods | |
T & | operator() (int localElementId, int colId) |
Returns a reference to the colId column component of the localElementId local element. More... | |
const T & | operator() (int localElementId, int colId) const |
Returns a reference to the colId column component of the localElementId local element.(const) More... | |
int | GlobalLength () const |
Returns the global length of the array. More... | |
int | MyLength () const |
Returns the length of the locally owned array. More... | |
int | RowSize () const |
Returns the row size, that is, the amount of data associated with each element. More... | |
Private Member Functions | |
DistArray () | |
Default constructor. Do not call this directly. More... | |
DistArray (const DistArray< T > &src) | |
Copy constructor. Private. More... | |
DistArray< T > & | operator= (const DistArray< T > &rhs) |
Assignment operator. More... | |
Private Attributes | |
Map | m_Map |
EpetraExt::DistArray< T > * | m_epetraDistArray |
unsigned int | m_rowSize |
std::vector< std::vector< T > > | m_elements |
I/O methods | |
void | print (std::ostream &os) const |
std::ostream & | operator<< (std::ostream &os, const DistArray< T > &obj) |
A class for partitioning vectors and matrices.
Class DistArray allows the construction and usage of multi-vectors. These vectors contain element of type T, and the storage is row-oriented (instead of and not column-oriented; thus his class should be used as a container for data, on which no BLAS-like operations are performed).
DistArray objects are identified by an 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.
Definition at line 56 of file DistArray.h.
QUESO::DistArray< T >::DistArray | ( | const Map & | inputMap, |
const int | inputRowSize | ||
) |
Constructor for a given inputMap and inputRowSize.
QUESO::DistArray< T >::~DistArray | ( | ) |
Destructor.
Definition at line 61 of file DistArray.C.
|
private |
Default constructor. Do not call this directly.
|
inlineprivate |
int QUESO::DistArray< T >::GlobalLength | ( | ) | const |
Returns the global length of the array.
Definition at line 107 of file DistArray.C.
References QUESO::DistArray< T >::GlobalLength().
Referenced by QUESO::DistArray< T >::GlobalLength(), and QUESO::VectorSpace< V, M >::VectorSpace().
int QUESO::DistArray< T >::MyLength | ( | ) | const |
Returns the length of the locally owned array.
Definition at line 118 of file DistArray.C.
References QUESO::DistArray< T >::MyLength().
Referenced by QUESO::ArrayOfOneDTables< V, M >::ArrayOfOneDTables(), QUESO::DistArray< T >::MyLength(), and QUESO::VectorSpace< V, M >::VectorSpace().
T & QUESO::DistArray< T >::operator() | ( | int | localElementId, |
int | colId | ||
) |
Returns a reference to the colId column component of the localElementId local element.
Definition at line 85 of file DistArray.C.
const T & QUESO::DistArray< T >::operator() | ( | int | localElementId, |
int | colId | ||
) | const |
Returns a reference to the colId column component of the localElementId local element.(const)
Definition at line 96 of file DistArray.C.
|
private |
void QUESO::DistArray< T >::print | ( | std::ostream & | os | ) | const |
Definition at line 141 of file DistArray.C.
int QUESO::DistArray< T >::RowSize | ( | ) | const |
Returns the row size, that is, the amount of data associated with each element.
Definition at line 129 of file DistArray.C.
References QUESO::DistArray< T >::RowSize().
Referenced by QUESO::DistArray< T >::RowSize().
|
friend |
Definition at line 93 of file DistArray.h.
|
private |
Definition at line 116 of file DistArray.h.
|
private |
Definition at line 113 of file DistArray.h.
|
private |
Definition at line 111 of file DistArray.h.
|
private |
Definition at line 115 of file DistArray.h.