xref: /petsc/src/mat/impls/baij/seq/baij.h (revision 2b36279985d181bf1ae28d424577ae2c2fbebdf4)
1 /* $Id: baij.h,v 1.8 1996/08/08 14:43:31 bsmith Exp bsmith $ */
2 
3 #include "src/mat/matimpl.h"
4 #include <math.h>
5 
6 #if !defined(__BAIJ_H)
7 #define __BAIJ_H
8 
9 /*
10   MATSEQBAIJ format - Block compressed row storage. The i[] and j[]
11   arrays start at 1, or 0, depending on the value of shift.
12   For example, in Fortran  j[i[k]+p+shift] is the pth column in row k.
13 */
14 
15 typedef struct {
16   int              sorted;       /* if true, rows are sorted by increasing columns */
17   int              roworiented;  /* if true, row-oriented input, default */
18   int              nonew;        /* 1 don't add new nonzeros, -1 generate error on new */
19   int              singlemalloc; /* if true a, i, and j have been obtained with
20                                         one big malloc */
21   int              m,n;          /* rows, columns */
22   int              bs,bs2;       /* block size, square of block size */
23   int              mbs,nbs;      /* rows/bs, columns/bs */
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              reallocs;     /* number of mallocs done during MatSetValues()
35                                     as more values are set then were preallocated */
36   Scalar           *mult_work;   /* work array for matrix vector product*/
37 } Mat_SeqBAIJ;
38 
39 extern int MatILUFactorSymbolic_SeqBAIJ(Mat,IS,IS,double,int,Mat *);
40 extern int MatConvert_SeqBAIJ(Mat,MatType,Mat *);
41 extern int MatConvertSameType_SeqBAIJ(Mat, Mat*,int);
42 extern int MatMarkDiag_SeqBAIJ(Mat);
43 
44 
45 #endif
46