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
117 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
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>
260 template<
typename int_type>
264#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
268#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
const std::vector< long long > & Stencil64(int i=0)
Local Stencil Info.
BlockCrsMatrix(const Epetra_RowMatrix &BaseMatrix, const std::vector< std::vector< int > > &RowStencil, const std::vector< int > &RowIndices, const Epetra_Comm &GlobalComm)
std::vector< int > RowIndices_int_
void TBlockSumIntoGlobalValues(const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)
void TBlockExtractGlobalRowView(const int_type BaseRow, int &NumEntries, double *&Values, const int_type Row, const int_type Col)
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...
std::vector< std::vector< int > > RowStencil_int_
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...
std::vector< std::vector< int_type > > & TRowStencil()
void BlockExtractGlobalRowView(const int BaseRow, int &NumEntries, double *&Values, const int Row, const int Col)
std::vector< int_type > & TRowIndices()
void TBlockReplaceGlobalValues(const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)
void TSumIntoGlobalBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
BlockCrsMatrix(const Epetra_RowMatrix &BaseMatrix, const std::vector< std::vector< long long > > &RowStencil, const std::vector< long long > &RowIndices, const Epetra_Comm &GlobalComm)
virtual ~BlockCrsMatrix()
Destructor.
Epetra_CrsGraph BaseGraph_
void ExtractBlock(Epetra_CrsMatrix &BaseMatrix, const int Row, const int Col)
std::vector< std::vector< long long > > RowStencil_LL_
BlockCrsMatrix(const Epetra_CrsGraph &BaseGraph, const std::vector< long long > &RowStencil, long long RowIndex, const Epetra_Comm &GlobalComm)
void TLoadBlock(const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
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...
long long RowIndex64(int i=0)
RowIndex.
void BlockReplaceGlobalValues(const int BaseRow, int NumIndices, double *Values, const int *Indices, const int Row, const int Col)
int RowIndex(int i=0)
RowIndex.
const std::vector< int > & Stencil(int i=0)
Local Stencil Info.
void TExtractBlock(Epetra_CrsMatrix &BaseMatrix, const int_type Row, const int_type Col)
std::vector< long long > RowIndices_LL_
BlockCrsMatrix(const Epetra_CrsGraph &BaseGraph, const std::vector< std::vector< long long > > &RowStencil, const std::vector< long long > &RowIndices, const Epetra_Comm &GlobalComm)
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 ...
BlockCrsMatrix(const Epetra_CrsGraph &BaseGraph, const std::vector< std::vector< int > > &RowStencil, const std::vector< int > &RowIndices, const Epetra_Comm &GlobalComm)
BlockCrsMatrix constuctor with multiple block rows per processor.
void TSumIntoBlock(double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
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 Epetra_BlockMap & RowMap() const
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.