xref: /petsc/src/mat/impls/baij/seq/baij.h (revision ab94cc7af4fcd5c63a93b94bdec4707d4e0807cd)
1 /* $Id: baij.h,v 1.5 1996/03/25 23:12:36 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,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 prealloced for */
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