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>
33 #ifdef QUESO_HAS_TRILINOS
34 #include <Epetra_MpiComm.h>
35 #include <Epetra_SerialComm.h>
44 #ifdef QUESO_HAS_TRILINOS
45 m_epetraDistArray(new EpetraExt::DistArray<T>(inputMap.epetraMap(),inputRowSize))
47 m_rowSize(inputRowSize)
50 #ifdef QUESO_HAS_TRILINOS
52 m_elements.resize(m_Map.NumGlobalElements());
53 for (
int i = 0; i < m_Map.NumGlobalElements(); ++i) {
54 m_elements[i].resize(m_rowSize);
63 #ifdef QUESO_HAS_TRILINOS
64 delete m_epetraDistArray;
65 m_epetraDistArray = NULL;
67 for (
int i = 0; i < m_Map.NumGlobalElements(); ++i) {
68 m_elements[i].clear();
87 #ifdef QUESO_HAS_TRILINOS
88 return (*m_epetraDistArray)(localElementId,colId);
90 return m_elements[localElementId][colId];
98 #ifdef QUESO_HAS_TRILINOS
99 return (*m_epetraDistArray)(localElementId,colId);
101 return m_elements[localElementId][colId];
109 #ifdef QUESO_HAS_TRILINOS
112 return m_Map.NumGlobalElements();
120 #ifdef QUESO_HAS_TRILINOS
121 return m_epetraDistArray->
MyLength();
123 return m_Map.NumMyElements();
131 #ifdef QUESO_HAS_TRILINOS
132 return m_epetraDistArray->
RowSize();
143 #ifdef QUESO_HAS_TRILINOS
144 os << *m_epetraDistArray;
146 os <<
"m_rowSize = " << m_rowSize
147 <<
", m_elements.size() = " << m_elements.size()
int RowSize() const
Returns the row size, that is, the amount of data associated with each element.
DistArray()
Default constructor. Do not call this directly.
int GlobalLength() const
Returns the global length of the array.
int MyLength() const
Returns the length of the locally owned array.
A class for partitioning vectors and matrices.