EpetraExt Package Browser (Single Doxygen Collection)  Development
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
EpetraExt::BlockCrsMatrix Class Reference

#include <EpetraExt_BlockCrsMatrix.h>

Inherits Epetra_CrsMatrix.

Public Member Functions

const std::vector< int > & Stencil (int i=0)
 Local Stencil Info. More...
 
int RowIndex (int i=0)
 RowIndex. More...
 
const std::vector< long long > & Stencil64 (int i=0)
 Local Stencil Info. More...
 
long long RowIndex64 (int i=0)
 RowIndex. More...
 
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 indices into RowStencil. More...
 
void LoadBlock (const Epetra_RowMatrix &BaseMatrix, const long long Row, const long long Col)
 
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 indices into RowStencil. More...
 
void SumIntoBlock (double alpha, const Epetra_RowMatrix &BaseMatrix, const long long Row, const long long 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 global indices. More...
 
void SumIntoGlobalBlock (double alpha, const Epetra_RowMatrix &BaseMatrix, const long long Row, const long long 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 arguments are indices into RowStencil. More...
 
void BlockSumIntoGlobalValues (const long long BaseRow, int NumIndices, double *Values, const long long *Indices, const long long Row, const long long Col)
 
void BlockReplaceGlobalValues (const int BaseRow, int NumIndices, double *Values, const int *Indices, const int Row, const int Col)
 
void BlockReplaceGlobalValues (const long long BaseRow, int NumIndices, double *Values, const long long *Indices, const long long Row, const long long Col)
 
void BlockExtractGlobalRowView (const int BaseRow, int &NumEntries, double *&Values, const int Row, const int Col)
 
void BlockExtractGlobalRowView (const long long BaseRow, int &NumEntries, double *&Values, const long long Row, const long long Col)
 
void ExtractBlock (Epetra_CrsMatrix &BaseMatrix, const int Row, const int Col)
 
void ExtractBlock (Epetra_CrsMatrix &BaseMatrix, const long long Row, const long long Col)
 
template<>
std::vector< int > & TRowIndices ()
 
template<>
std::vector< std::vector< int > > & TRowStencil ()
 
template<>
std::vector< long long > & TRowIndices ()
 
template<>
std::vector< std::vector< long long > > & TRowStencil ()
 

Protected Attributes

Epetra_CrsGraph BaseGraph_
 
std::vector< std::vector< int > > RowStencil_int_
 
std::vector< int > RowIndices_int_
 
std::vector< std::vector< long long > > RowStencil_LL_
 
std::vector< long long > RowIndices_LL_
 
long long ROffset_
 
long long COffset_
 

Private Member Functions

template<typename int_type >
void TLoadBlock (const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
 
template<typename int_type >
void TSumIntoBlock (double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
 
template<typename int_type >
void TSumIntoGlobalBlock (double alpha, const Epetra_RowMatrix &BaseMatrix, const int_type Row, const int_type Col)
 
template<typename int_type >
void TBlockSumIntoGlobalValues (const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)
 
template<typename int_type >
void TBlockReplaceGlobalValues (const int_type BaseRow, int NumIndices, double *Values, const int_type *Indices, const int_type Row, const int_type Col)
 
template<typename int_type >
void TBlockExtractGlobalRowView (const int_type BaseRow, int &NumEntries, double *&Values, const int_type Row, const int_type Col)
 
template<typename int_type >
void TExtractBlock (Epetra_CrsMatrix &BaseMatrix, const int_type Row, const int_type Col)
 
template<typename int_type >
std::vector< std::vector< int_type > > & TRowStencil ()
 
template<typename int_type >
std::vector< int_type > & TRowIndices ()
 
 BlockCrsMatrix (const Epetra_CrsGraph &BaseGraph, const std::vector< int > &RowStencil, int RowIndex, const Epetra_Comm &GlobalComm)
 BlockCrsMatrix constuctor with one block row per processor. More...
 
 BlockCrsMatrix (const Epetra_CrsGraph &BaseGraph, const std::vector< long long > &RowStencil, long long RowIndex, const Epetra_Comm &GlobalComm)
 
 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. More...
 
 BlockCrsMatrix (const Epetra_CrsGraph &BaseGraph, const std::vector< std::vector< long long > > &RowStencil, const std::vector< long long > &RowIndices, const Epetra_Comm &GlobalComm)
 
 BlockCrsMatrix (const Epetra_CrsGraph &BaseGraph, const Epetra_CrsGraph &LocalBlockGraph, const Epetra_Comm &GlobalComm)
 Version taking a local block graph. More...
 
 BlockCrsMatrix (const Epetra_RowMatrix &BaseMatrix, const std::vector< std::vector< int > > &RowStencil, const std::vector< int > &RowIndices, const Epetra_Comm &GlobalComm)
 
 BlockCrsMatrix (const Epetra_RowMatrix &BaseMatrix, const std::vector< std::vector< long long > > &RowStencil, const std::vector< long long > &RowIndices, const Epetra_Comm &GlobalComm)
 
 BlockCrsMatrix (const BlockCrsMatrix &Matrix)
 Copy constructor. More...
 
virtual ~BlockCrsMatrix ()
 Destructor. More...
 

Detailed Description

Definition at line 60 of file EpetraExt_BlockCrsMatrix.h.

Constructor & Destructor Documentation

◆ BlockCrsMatrix() [1/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_CrsGraph &  BaseGraph,
const std::vector< int > &  RowStencil,
int  RowIndex,
const Epetra_Comm &  GlobalComm 
)

BlockCrsMatrix constuctor with one block row per processor.

Creates a BlockCrsMatrix object and allocates storage.

Parameters
InBaseGraph - Graph determining individual block structure, can be distrib. over subset of proc.'s
InRowStencil - Describes the stencil for block row on this processor (i.e. (-1 0 1) centered difference)
InRowIndex - Defines the index used for this block row.

◆ BlockCrsMatrix() [2/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_CrsGraph &  BaseGraph,
const std::vector< long long > &  RowStencil,
long long  RowIndex,
const Epetra_Comm &  GlobalComm 
)

◆ BlockCrsMatrix() [3/8]

EpetraExt::BlockCrsMatrix::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.

Creates a BlockCrsMatrix object and allocates storage.

Parameters
InBaseGraph - Graph determining individual block structure, can be distrib. over subset of proc.'s
InRowStencil - Describes the stencil for block row on this processor (i.e. (-1 0 1) centered difference)
InRowIndices - Defines the indices used for this block row.

◆ BlockCrsMatrix() [4/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_CrsGraph &  BaseGraph,
const std::vector< std::vector< long long > > &  RowStencil,
const std::vector< long long > &  RowIndices,
const Epetra_Comm &  GlobalComm 
)

◆ BlockCrsMatrix() [5/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_CrsGraph &  BaseGraph,
const Epetra_CrsGraph &  LocalBlockGraph,
const Epetra_Comm &  GlobalComm 
)

Version taking a local block graph.

Definition at line 116 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockCrsMatrix() [6/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_RowMatrix &  BaseMatrix,
const std::vector< std::vector< int > > &  RowStencil,
const std::vector< int > &  RowIndices,
const Epetra_Comm &  GlobalComm 
)

◆ BlockCrsMatrix() [7/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const Epetra_RowMatrix &  BaseMatrix,
const std::vector< std::vector< long long > > &  RowStencil,
const std::vector< long long > &  RowIndices,
const Epetra_Comm &  GlobalComm 
)

◆ BlockCrsMatrix() [8/8]

EpetraExt::BlockCrsMatrix::BlockCrsMatrix ( const BlockCrsMatrix Matrix)

Copy constructor.

Definition at line 180 of file EpetraExt_BlockCrsMatrix.cpp.

◆ ~BlockCrsMatrix()

EpetraExt::BlockCrsMatrix::~BlockCrsMatrix ( )
virtual

Destructor.

Definition at line 197 of file EpetraExt_BlockCrsMatrix.cpp.

Member Function Documentation

◆ Stencil()

const std::vector<int>& EpetraExt::BlockCrsMatrix::Stencil ( int  i = 0)
inline

Local Stencil Info.

Definition at line 117 of file EpetraExt_BlockCrsMatrix.h.

◆ RowIndex()

int EpetraExt::BlockCrsMatrix::RowIndex ( int  i = 0)
inline

RowIndex.

Definition at line 125 of file EpetraExt_BlockCrsMatrix.h.

◆ Stencil64()

const std::vector<long long>& EpetraExt::BlockCrsMatrix::Stencil64 ( int  i = 0)
inline

Local Stencil Info.

Definition at line 135 of file EpetraExt_BlockCrsMatrix.h.

◆ RowIndex64()

long long EpetraExt::BlockCrsMatrix::RowIndex64 ( int  i = 0)
inline

RowIndex.

Definition at line 143 of file EpetraExt_BlockCrsMatrix.h.

◆ LoadBlock() [1/2]

void EpetraExt::BlockCrsMatrix::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 indices into RowStencil.

Definition at line 241 of file EpetraExt_BlockCrsMatrix.cpp.

◆ LoadBlock() [2/2]

void EpetraExt::BlockCrsMatrix::LoadBlock ( const Epetra_RowMatrix &  BaseMatrix,
const long long  Row,
const long long  Col 
)

Definition at line 251 of file EpetraExt_BlockCrsMatrix.cpp.

◆ SumIntoBlock() [1/2]

void EpetraExt::BlockCrsMatrix::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 indices into RowStencil.

Definition at line 304 of file EpetraExt_BlockCrsMatrix.cpp.

◆ SumIntoBlock() [2/2]

void EpetraExt::BlockCrsMatrix::SumIntoBlock ( double  alpha,
const Epetra_RowMatrix &  BaseMatrix,
const long long  Row,
const long long  Col 
)

Definition at line 314 of file EpetraExt_BlockCrsMatrix.cpp.

◆ SumIntoGlobalBlock() [1/2]

void EpetraExt::BlockCrsMatrix::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 global indices.

Definition at line 366 of file EpetraExt_BlockCrsMatrix.cpp.

◆ SumIntoGlobalBlock() [2/2]

void EpetraExt::BlockCrsMatrix::SumIntoGlobalBlock ( double  alpha,
const Epetra_RowMatrix &  BaseMatrix,
const long long  Row,
const long long  Col 
)

Definition at line 376 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockSumIntoGlobalValues() [1/2]

void EpetraExt::BlockCrsMatrix::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 arguments are indices into RowStencil.

Definition at line 412 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockSumIntoGlobalValues() [2/2]

void EpetraExt::BlockCrsMatrix::BlockSumIntoGlobalValues ( const long long  BaseRow,
int  NumIndices,
double *  Values,
const long long *  Indices,
const long long  Row,
const long long  Col 
)

Definition at line 423 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockReplaceGlobalValues() [1/2]

void EpetraExt::BlockCrsMatrix::BlockReplaceGlobalValues ( const int  BaseRow,
int  NumIndices,
double *  Values,
const int *  Indices,
const int  Row,
const int  Col 
)

Definition at line 459 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockReplaceGlobalValues() [2/2]

void EpetraExt::BlockCrsMatrix::BlockReplaceGlobalValues ( const long long  BaseRow,
int  NumIndices,
double *  Values,
const long long *  Indices,
const long long  Row,
const long long  Col 
)

Definition at line 470 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockExtractGlobalRowView() [1/2]

void EpetraExt::BlockCrsMatrix::BlockExtractGlobalRowView ( const int  BaseRow,
int &  NumEntries,
double *&  Values,
const int  Row,
const int  Col 
)

Definition at line 510 of file EpetraExt_BlockCrsMatrix.cpp.

◆ BlockExtractGlobalRowView() [2/2]

void EpetraExt::BlockCrsMatrix::BlockExtractGlobalRowView ( const long long  BaseRow,
int &  NumEntries,
double *&  Values,
const long long  Row,
const long long  Col 
)

Definition at line 521 of file EpetraExt_BlockCrsMatrix.cpp.

◆ ExtractBlock() [1/2]

void EpetraExt::BlockCrsMatrix::ExtractBlock ( Epetra_CrsMatrix &  BaseMatrix,
const int  Row,
const int  Col 
)

Definition at line 585 of file EpetraExt_BlockCrsMatrix.cpp.

◆ ExtractBlock() [2/2]

void EpetraExt::BlockCrsMatrix::ExtractBlock ( Epetra_CrsMatrix &  BaseMatrix,
const long long  Row,
const long long  Col 
)

Definition at line 595 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TLoadBlock()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TLoadBlock ( const Epetra_RowMatrix &  BaseMatrix,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 203 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TSumIntoBlock()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TSumIntoBlock ( double  alpha,
const Epetra_RowMatrix &  BaseMatrix,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 262 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TSumIntoGlobalBlock()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TSumIntoGlobalBlock ( double  alpha,
const Epetra_RowMatrix &  BaseMatrix,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 325 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TBlockSumIntoGlobalValues()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TBlockSumIntoGlobalValues ( const int_type  BaseRow,
int  NumIndices,
double *  Values,
const int_type *  Indices,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 388 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TBlockReplaceGlobalValues()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TBlockReplaceGlobalValues ( const int_type  BaseRow,
int  NumIndices,
double *  Values,
const int_type *  Indices,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 435 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TBlockExtractGlobalRowView()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TBlockExtractGlobalRowView ( const int_type  BaseRow,
int &  NumEntries,
double *&  Values,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 482 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TExtractBlock()

template<typename int_type >
void EpetraExt::BlockCrsMatrix::TExtractBlock ( Epetra_CrsMatrix &  BaseMatrix,
const int_type  Row,
const int_type  Col 
)
private

Definition at line 534 of file EpetraExt_BlockCrsMatrix.cpp.

◆ TRowStencil() [1/3]

template<typename int_type >
std::vector< std::vector<int_type> >& EpetraExt::BlockCrsMatrix::TRowStencil ( )
private

◆ TRowIndices() [1/3]

template<typename int_type >
std::vector<int_type>& EpetraExt::BlockCrsMatrix::TRowIndices ( )
private

◆ TRowIndices() [2/3]

template<>
std::vector<int>& EpetraExt::BlockCrsMatrix::TRowIndices ( )
inline

Definition at line 265 of file EpetraExt_BlockCrsMatrix.h.

◆ TRowStencil() [2/3]

template<>
std::vector< std::vector<int> >& EpetraExt::BlockCrsMatrix::TRowStencil ( )
inline

Definition at line 266 of file EpetraExt_BlockCrsMatrix.h.

◆ TRowIndices() [3/3]

template<>
std::vector<long long>& EpetraExt::BlockCrsMatrix::TRowIndices ( )
inline

Definition at line 269 of file EpetraExt_BlockCrsMatrix.h.

◆ TRowStencil() [3/3]

template<>
std::vector< std::vector<long long> >& EpetraExt::BlockCrsMatrix::TRowStencil ( )
inline

Definition at line 270 of file EpetraExt_BlockCrsMatrix.h.

Member Data Documentation

◆ BaseGraph_

Epetra_CrsGraph EpetraExt::BlockCrsMatrix::BaseGraph_
protected

Definition at line 216 of file EpetraExt_BlockCrsMatrix.h.

◆ RowStencil_int_

std::vector< std::vector<int> > EpetraExt::BlockCrsMatrix::RowStencil_int_
protected

Definition at line 219 of file EpetraExt_BlockCrsMatrix.h.

◆ RowIndices_int_

std::vector<int> EpetraExt::BlockCrsMatrix::RowIndices_int_
protected

Definition at line 221 of file EpetraExt_BlockCrsMatrix.h.

◆ RowStencil_LL_

std::vector< std::vector<long long> > EpetraExt::BlockCrsMatrix::RowStencil_LL_
protected

Definition at line 224 of file EpetraExt_BlockCrsMatrix.h.

◆ RowIndices_LL_

std::vector<long long> EpetraExt::BlockCrsMatrix::RowIndices_LL_
protected

Definition at line 226 of file EpetraExt_BlockCrsMatrix.h.

◆ ROffset_

long long EpetraExt::BlockCrsMatrix::ROffset_
protected

Definition at line 229 of file EpetraExt_BlockCrsMatrix.h.

◆ COffset_

long long EpetraExt::BlockCrsMatrix::COffset_
protected

Definition at line 230 of file EpetraExt_BlockCrsMatrix.h.


The documentation for this class was generated from the following files: