25 #include <queso/asserts.h>
26 #include <queso/DistArray.h>
27 #include <queso/GslVector.h>
28 #include <queso/GslMatrix.h>
29 #include <queso/ScalarSequence.h>
30 #include <queso/SampledScalarCdf.h>
31 #include <queso/OneDGrid.h>
41 "DistArray<T>::constructor()",
42 "should not be called");
49 #ifdef QUESO_HAS_TRILINOS
50 m_epetraDistArray(new EpetraExt::
DistArray<T>(inputMap.epetraMap(),inputRowSize))
52 m_rowSize(inputRowSize)
55 #ifdef QUESO_HAS_TRILINOS
68 #ifdef QUESO_HAS_TRILINOS
70 m_epetraDistArray(NULL)
73 #ifdef QUESO_HAS_TRILINOS
84 #ifdef QUESO_HAS_TRILINOS
85 delete m_epetraDistArray;
86 m_epetraDistArray = NULL;
88 for (
int i = 0; i < m_Map.NumGlobalElements(); ++i) {
89 m_elements[i].clear();
100 #ifdef QUESO_HAS_TRILINOS
102 for (
int i = 0; i < m_Map.NumGlobalElements(); ++i) {
103 m_elements[i].clear();
116 #ifdef QUESO_HAS_TRILINOS
117 return (*m_epetraDistArray)(localElementId,colId);
119 return m_elements[localElementId][colId];
127 #ifdef QUESO_HAS_TRILINOS
128 return (*m_epetraDistArray)(localElementId,colId);
130 return m_elements[localElementId][colId];
138 #ifdef QUESO_HAS_TRILINOS
139 return m_epetraDistArray->GlobalLength();
141 return m_Map.NumGlobalElements();
149 #ifdef QUESO_HAS_TRILINOS
150 return m_epetraDistArray->MyLength();
152 return m_Map.NumMyElements();
160 #ifdef QUESO_HAS_TRILINOS
161 return m_epetraDistArray->RowSize();
180 #ifdef QUESO_HAS_TRILINOS
181 os << *m_epetraDistArray;
183 os <<
"m_rowSize = " << m_rowSize
184 <<
", m_elements.size() = " << m_elements.size()
int NumGlobalElements() const
Returns the total number of elements across all processors.
const int UQ_UNAVAILABLE_RANK
std::vector< std::vector< T > > m_elements
void copy(const DistArray< T > &src)
Copies the array.
A class for partitioning vectors and matrices.
int MyLength() const
Returns the length of the locally owned array.
A class for partitioning vectors and matrices.
int RowSize() const
Returns the row size, that is, the amount of data associated with each element.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
DistArray< T > & operator=(const DistArray< T > &rhs)
Assignment operator.
int GlobalLength() const
Returns the global length of the array.
DistArray()
Default constructor. Do not call this directly.
#define queso_not_implemented()
void print(std::ostream &os) const
T & operator()(int localElementId, int colId)
Returns a reference to the colId column component of the localElementId local element.