43 #ifndef _fei_AztecDVBR_Matrix_hpp_ 
   44 #define _fei_AztecDVBR_Matrix_hpp_ 
   47 #include <fei_SharedPtr.hpp> 
   54 namespace fei_trilinos {
 
   58 class AztecDVBR_Matrix {
 
   65     AztecDVBR_Matrix(
const AztecDVBR_Matrix& src);
 
   67     virtual ~AztecDVBR_Matrix ();
 
   71     int getNumBlocksPerRow(
int blkRow, 
int& nnzBlksPerRow) 
const;
 
   72     int getNumNonzerosPerRow(
int blkRow, 
int& nnzPerRow) 
const;
 
   73     int getNumBlocksPerRow(
int* nnzBlksPerRow) 
const;
 
   74     int getNumNonzerosPerRow(
int* nnzPerRow) 
const;
 
   75     int getBlockSize(
int blkRow, 
int blkCol, 
int& ptRows, 
int& ptCols);
 
   78     void matvec(
const Aztec_LSVector& x, Aztec_LSVector& y) 
const;
 
   84     int getBlockRow(
int blk_row,
 
   87                     int num_nz_blocks) 
const;
 
   91     int putBlockRow(
int blk_row,
 
   94                     int num_nz_blocks) 
const;
 
   96     int sumIntoBlockRow(
int blk_row,
 
   99                         int num_nz_blocks) 
const;
 
  102     void allocate(
int* num_nz_blocks, 
int* blk_col_inds);
 
  106     bool isLoaded()
 const {
return(isLoaded_);};
 
  107     void setLoaded(
bool flag) {isLoaded_ = flag;};
 
  108     bool isAllocated()
 const {
return(isAllocated_);};
 
  109     void setAllocated(
bool flag) {isAllocated_ = flag;};
 
  111     AZ_MATRIX* getAZ_MATRIX_Ptr()
 const {
return(Amat_);};
 
  113     bool readFromFile(
const char *filename);
 
  114     bool writeToFile(
const char *fileName) 
const;
 
  118     int getNumRemoteBlocks() {
return(numRemoteBlocks_);};
 
  119     int* getRemoteBlockIndices() {
return(remoteInds_);};
 
  120     int* getRemoteBlockSizes() {
return(remoteBlockSizes_);};
 
  122     int* getUpdate_index() {
return(update_index_);};
 
  123     int* getData_org() {
return(data_org_);};
 
  126     int inUpdate(
int globalIndex, 
int& localIndex) 
const;
 
  128     void readAllocateInfo(FILE* infile, 
int*& num_nz_blocks, 
int*& blk_col_inds);
 
  129     void readMatrixData(FILE* infile);
 
  132     void calcBpntr(
int* nzBlksPerRow);
 
  133     void setBindx(
int nnzBlks, 
int* blkColInds);
 
  134     void calcIndx(
int nnzBlks);
 
  136     int getBindxOffset(
int blkInd, 
int bpntrStart, 
int bpntrEnd) 
const;
 
  138     void calcRemoteInds(
int*& remoteInds, 
int& len);
 
  139     void getRemoteBlkSizes(
int* remoteBlkSizes, 
int* remoteInds, 
int len);
 
  140     void insertList(
int item, 
int*& list, 
int& len);
 
  141     void getValuesFromString(
char *line, 
int len, 
double *values,
 
  143     void messageAbort(
const char* mesg) 
const;
 
  154     int* orderingUpdate_;
 
  162     int numRemoteBlocks_;
 
  164     int* remoteBlockSizes_;