42 #ifndef EPETRAEXT_BLOCKCRSMATRIX_H
43 #define EPETRAEXT_BLOCKCRSMATRIX_H
74 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
77 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
91 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
94 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
101 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
104 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
115 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
116 const std::vector<int> &
Stencil(
int i = 0 ) {
121 throw "EpetraExt::BlockCrsMatrix::Stencil: Global Indices not int";
129 throw "EpetraExt::BlockCrsMatrix::RowIndex: Global Indices not int";
133 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
134 const std::vector<long long> &
Stencil64(
int i = 0 ) {
139 throw "EpetraExt::BlockCrsMatrix::Stencil: Global Indices not long long";
147 throw "EpetraExt::BlockCrsMatrix::RowIndex: Global Indices not long long";
153 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
156 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
162 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
165 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
171 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
174 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
180 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
182 double*
Values,
const int* Indices,
const int Row,
const int Col);
184 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
186 double*
Values,
const long long* Indices,
const long long Row,
const long long Col);
189 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
191 double*
Values,
const int* Indices,
const int Row,
const int Col);
193 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
195 double*
Values,
const long long* Indices,
const long long Row,
const long long Col);
198 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
200 double*&
Values,
const int Row,
const int Col);
202 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
204 double*&
Values,
const long long Row,
const long long Col);
207 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
210 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
218 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
223 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
233 template<
typename int_type>
236 template<
typename int_type>
239 template<
typename int_type>
242 template<
typename int_type>
244 double*
Values,
const int_type* Indices,
const int_type Row,
const int_type Col);
246 template<
typename int_type>
248 double*
Values,
const int_type* Indices,
const int_type Row,
const int_type Col);
250 template<
typename int_type>
252 double*&
Values,
const int_type Row,
const int_type Col);
254 template<
typename int_type>
257 template<
typename int_type>
258 std::vector< std::vector<int_type> >&
TRowStencil();
260 template<
typename int_type>
264 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
268 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
void LoadBlock(const Epetra_RowMatrix &BaseMatrix, const int Row, const int Col)
Routine for loading a base matrices values into the large Block Matrix The Row and Col arguments are ...
void TBlockReplaceGlobalValues(const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)
bool GlobalIndicesLongLong() const
std::vector< std::vector< int_type > > & TRowStencil()
std::vector< std::vector< int > > RowStencil_int_
void BlockReplaceGlobalValues(const int BaseRow, int NumIndices, double *Values, const int *Indices, const int Row, const int Col)
std::vector< long long > RowIndices_LL_
void ExtractBlock(Epetra_CrsMatrix &BaseMatrix, const int Row, const int Col)
bool GlobalIndicesInt() const
int RowIndex(int i=0)
RowIndex.
void BlockExtractGlobalRowView(const int BaseRow, int &NumEntries, double *&Values, const int Row, const int Col)
std::vector< std::vector< long long > > RowStencil_LL_
const std::vector< int > & Stencil(int i=0)
Local Stencil Info.
std::vector< int_type > & TRowIndices()
std::vector< int > RowIndices_int_
void SumIntoGlobalBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int Row, const int Col)
Routine for summing base matrices values into the large Block Matrix The Row and Col arguments are gl...
void TBlockExtractGlobalRowView(const int_type BaseRow, int &NumEntries, double *&Values, const int_type Row, const int_type Col)
void TSumIntoGlobalBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
const Epetra_BlockMap & RowMap() const
virtual ~BlockCrsMatrix()
Destructor.
BlockCrsMatrix(const Epetra_CrsGraph &BaseGraph, const std::vector< int > &RowStencil, int RowIndex, const Epetra_Comm &GlobalComm)
BlockCrsMatrix constuctor with one block row per processor.
const std::vector< long long > & Stencil64(int i=0)
Local Stencil Info.
void SumIntoBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int Row, const int Col)
Routine for summing base matrices values into the large Block Matrix The Row and Col arguments are in...
Epetra_CrsGraph BaseGraph_
void BlockSumIntoGlobalValues(const int BaseRow, int NumIndices, double *Values, const int *Indices, const int Row, const int Col)
Sum Entries into Block matrix using base-matrix numbering plus block Row and Col The Row and Col argu...
void TExtractBlock(Epetra_CrsMatrix &BaseMatrix, const int_type Row, const int_type Col)
long long RowIndex64(int i=0)
RowIndex.
void TLoadBlock(const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
void TSumIntoBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
void TBlockSumIntoGlobalValues(const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)