1 /* $Id: aij.h,v 1.15 1995/10/17 21:41:57 bsmith Exp bsmith $ */ 2 3 #include "matimpl.h" 4 #include <math.h> 5 6 #if !defined(__AIJ_H) 7 #define __AIJ_H 8 9 /* 10 MATSEQAIJ format - Compressed row storage (also called Yale sparse matrix 11 format), compatible with Fortran. The i[] and j[] arrays start at 1, 12 not or 0, depending on the value of shift. For example, in Fortran 13 j[i[k]+p+shift] is the pth column in row k. 14 */ 15 16 typedef struct { 17 int sorted; /* if true, rows are sorted by increasing columns */ 18 int roworiented; /* if true, row-oriented storage */ 19 int nonew; /* if true, don't allow new elements to be added */ 20 int singlemalloc; /* if true a, i, and j have been obtained with 21 one big malloc */ 22 int assembled; /* if true, matrix is fully assembled */ 23 int m, n; /* rows, columns */ 24 int nz, maxnz; /* nonzeros, allocated nonzeros */ 25 int *diag; /* pointers to diagonal elements */ 26 int *i; /* pointer to beginning of each row */ 27 int *imax; /* maximum space allocated for each row */ 28 int *ilen; /* actual length of each row */ 29 int *j; /* column values: j + i[k] - 1 is start of row k */ 30 Scalar *a; /* nonzero elements */ 31 IS row, col; /* index sets, used for reorderings */ 32 Scalar *solve_work; /* work space used in MatSolve */ 33 void *spptr; /* pointer for special library like SuperLU */ 34 int indexshift; /* zero or -one for C or Fortran indexing */ 35 } Mat_SeqAIJ; 36 37 extern int MatILUFactorSymbolic_SeqAIJ(Mat,IS,IS,double,int,Mat *); 38 extern int MatConvert_SeqAIJ(Mat,MatType,Mat *); 39 extern int MatCopyPrivate_SeqAIJ(Mat, Mat*,int); 40 extern int MatMarkDiag_SeqAIJ(Mat); 41 42 43 #endif 44