xref: /petsc/src/mat/impls/baij/seq/baij.h (revision f63b844a08011cbceb00a6ecbb68fd67c9b34e11)
1 /* $Id: baij.h,v 1.4 1996/03/25 23:11:18 balay Exp balay $ */
2 
3 #include "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;        /* if true, don't allow new elements to be added */
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;           /* 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              indexshift;   /* zero or -one for C or Fortran indexing */
35   int              reallocs;     /* number of mallocs done during MatSetValues()
36                                   as more values are set then were prealloced for */
37   Scalar           *mult_work;   /* work array for matrix vector product*/
38 } Mat_SeqBAIJ;
39 
40 extern int MatILUFactorSymbolic_SeqBAIJ(Mat,IS,IS,double,int,Mat *);
41 extern int MatConvert_SeqBAIJ(Mat,MatType,Mat *);
42 extern int MatConvertSameType_SeqBAIJ(Mat, Mat*,int);
43 extern int MatMarkDiag_SeqBAIJ(Mat);
44 
45 
46 #endif
47