42#ifndef EPETRAEXT_BLOCKCRSMATRIX_H 
   43#define EPETRAEXT_BLOCKCRSMATRIX_H 
   45#if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS) 
   47#warning "The EpetraExt package is deprecated" 
   53#include "Epetra_ConfigDefs.h"  
   54#include "Epetra_CrsMatrix.h"  
   80#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
   83#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
   97#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  100#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  107#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  110#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  121#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  123  const std::vector<int> & 
Stencil( 
int i = 0 ) {
 
  127      throw "EpetraExt::BlockCrsMatrix::Stencil: Global Indices not int";
 
 
  135      throw "EpetraExt::BlockCrsMatrix::RowIndex: Global Indices not int";
 
 
  139#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  145      throw "EpetraExt::BlockCrsMatrix::Stencil: Global Indices not long long";
 
 
  153      throw "EpetraExt::BlockCrsMatrix::RowIndex: Global Indices not long long";
 
 
  159#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  162#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  168#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  171#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  177#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  180#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  186#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  188     double* Values, 
const int* Indices, 
const int Row, 
const int Col);
 
  190#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  192     double* Values, 
const long long* Indices, 
const long long Row, 
const long long Col);
 
  195#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  197     double* Values, 
const int* Indices, 
const int Row, 
const int Col);
 
  199#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  201     double* Values, 
const long long* Indices, 
const long long Row, 
const long long Col);
 
  204#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  206     double*& Values, 
const int Row, 
const int Col);
 
  208#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  210     double*& Values, 
const long long Row, 
const long long Col);
 
  213#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  216#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  224#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  229#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  239  template<
typename int_type>
 
  240  void TLoadBlock(
const Epetra_RowMatrix & BaseMatrix, 
const int_type Row, 
const int_type Col);
 
  242  template<
typename int_type>
 
  243  void TSumIntoBlock(
double alpha, 
const Epetra_RowMatrix & BaseMatrix, 
const int_type Row, 
const int_type Col);
 
  245  template<
typename int_type>
 
  246  void TSumIntoGlobalBlock(
double alpha, 
const Epetra_RowMatrix & BaseMatrix, 
const int_type Row, 
const int_type Col);
 
  248  template<
typename int_type>
 
  249  void TBlockSumIntoGlobalValues(
const int_type BaseRow, 
int NumIndices,
 
  250     double* Values, 
const int_type* Indices, 
const int_type Row, 
const int_type Col);
 
  252  template<
typename int_type>
 
  253  void TBlockReplaceGlobalValues(
const int_type BaseRow, 
int NumIndices,
 
  254     double* Values, 
const int_type* Indices, 
const int_type Row, 
const int_type Col);
 
  256  template<
typename int_type>
 
  257  void TBlockExtractGlobalRowView(
const int_type BaseRow, 
int& NumEntries, 
 
  258     double*& Values, 
const int_type Row, 
const int_type Col);
 
  260  template<
typename int_type>
 
  261  void TExtractBlock(
Epetra_CrsMatrix & BaseMatrix, 
const int_type Row, 
const int_type Col);
 
  263  template<
typename int_type>
 
  264  std::vector< std::vector<int_type> >& TRowStencil();
 
  266  template<
typename int_type>
 
  267  std::vector<int_type>& TRowIndices();
 
 
  270#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 
  271template<> 
inline std::vector<int>& BlockCrsMatrix::TRowIndices() { 
return RowIndices_int_; }
 
  272template<> 
inline std::vector< std::vector<int> >& BlockCrsMatrix::TRowStencil() { 
return RowStencil_int_; }
 
  274#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 
  275template<> 
inline std::vector<long long>& BlockCrsMatrix::TRowIndices() { 
return RowIndices_LL_; }
 
  276template<> 
inline std::vector< std::vector<long long> >& BlockCrsMatrix::TRowStencil() { 
return RowStencil_LL_; }
 
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 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...
 
void BlockExtractGlobalRowView(const int BaseRow, int &NumEntries, double *&Values, const int Row, const int 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 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.
 
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.
 
BlockCrsMatrix(const Epetra_CrsGraph &BaseGraph, const std::vector< int > &RowStencil, int RowIndex, const Epetra_Comm &GlobalComm)
BlockCrsMatrix constuctor with one block row per processor.
 
bool GlobalIndicesInt() const
 
bool GlobalIndicesLongLong() const
 
const Epetra_BlockMap & RowMap() const
 
EpetraExt::BlockCrsMatrix: A class for constructing a distributed block matrix.