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