1 /* $Id: baij.h,v 1.13 1998/12/03 04:01:06 bsmith Exp bsmith $ */ 2 3 #include "src/mat/matimpl.h" 4 5 #if !defined(__BAIJ_H) 6 #define __BAIJ_H 7 8 /* 9 MATSEQBAIJ format - Block compressed row storage. The i[] and j[] 10 arrays start at 0. 11 */ 12 13 typedef struct { 14 int sorted; /* if true, rows are sorted by increasing columns */ 15 int roworiented; /* if true, row-oriented input, default */ 16 int nonew; /* 1 don't add new nonzeros, -1 generate error on new */ 17 int singlemalloc; /* if true a, i, and j have been obtained with 18 one big malloc */ 19 int m,n; /* rows, columns */ 20 int bs,bs2; /* block size, square of block size */ 21 int mbs,nbs; /* rows/bs, columns/bs */ 22 int nz,maxnz; /* nonzeros, allocated nonzeros */ 23 int *diag; /* pointers to diagonal elements */ 24 int *i; /* pointer to beginning of each row */ 25 int *imax; /* maximum space allocated for each row */ 26 int *ilen; /* actual length of each row */ 27 int *j; /* column values: j + i[k] - 1 is start of row k */ 28 MatScalar *a; /* nonzero elements */ 29 IS row,col,icol; /* index sets, used for reorderings */ 30 Scalar *solve_work; /* work space used in MatSolve */ 31 void *spptr; /* pointer for special library like SuperLU */ 32 int reallocs; /* number of mallocs done during MatSetValues() 33 as more values are set then were preallocated */ 34 Scalar *mult_work; /* work array for matrix vector product*/ 35 } Mat_SeqBAIJ; 36 37 extern int MatILUFactorSymbolic_SeqBAIJ(Mat,IS,IS,double,int,Mat *); 38 extern int MatConvert_SeqBAIJ(Mat,MatType,Mat *); 39 extern int MatDuplicate_SeqBAIJ(Mat,MatDuplicateOption, Mat*); 40 extern int MatMarkDiag_SeqBAIJ(Mat); 41 extern int MatLUFactorNumeric_SeqBAIJ_4_NaturalOrdering(Mat,Mat*); 42 extern int MatSolve_SeqBAIJ_4_NaturalOrdering(Mat,Vec,Vec); 43 extern int MatLUFactorNumeric_SeqBAIJ_5_NaturalOrdering(Mat,Mat*); 44 extern int MatSolve_SeqBAIJ_5_NaturalOrdering(Mat,Vec,Vec); 45 46 47 #endif 48