xref: /petsc/src/mat/impls/baij/seq/baij.h (revision e24b481b4a15e258c09dabebcc19da3246e723e1)
1 /* $Id: baij.h,v 1.11 1998/10/09 19:22:47 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 0.
12 */
13 
14 typedef struct {
15   int              sorted;       /* if true, rows are sorted by increasing columns */
16   int              roworiented;  /* if true, row-oriented input, default */
17   int              nonew;        /* 1 don't add new nonzeros, -1 generate error on new */
18   int              singlemalloc; /* if true a, i, and j have been obtained with
19                                         one big malloc */
20   int              m,n;          /* rows, columns */
21   int              bs,bs2;       /* block size, square of block size */
22   int              mbs,nbs;      /* rows/bs, columns/bs */
23   int              nz,maxnz;     /* nonzeros, allocated nonzeros */
24   int              *diag;        /* pointers to diagonal elements */
25   int              *i;           /* pointer to beginning of each row */
26   int              *imax;        /* maximum space allocated for each row */
27   int              *ilen;        /* actual length of each row */
28   int              *j;           /* column values: j + i[k] - 1 is start of row k */
29   Scalar           *a;           /* nonzero elements */
30   IS               row,col,icol; /* index sets, used for reorderings */
31   Scalar           *solve_work;  /* work space used in MatSolve */
32   void             *spptr;       /* pointer for special library like SuperLU */
33   int              reallocs;     /* number of mallocs done during MatSetValues()
34                                     as more values are set then were preallocated */
35   Scalar           *mult_work;   /* work array for matrix vector product*/
36 } Mat_SeqBAIJ;
37 
38 extern int MatILUFactorSymbolic_SeqBAIJ(Mat,IS,IS,double,int,Mat *);
39 extern int MatConvert_SeqBAIJ(Mat,MatType,Mat *);
40 extern int MatDuplicate_SeqBAIJ(Mat,MatDuplicateOption, Mat*);
41 extern int MatMarkDiag_SeqBAIJ(Mat);
42 extern int MatLUFactorNumeric_SeqBAIJ_4_NaturalOrdering(Mat,Mat*);
43 extern int MatSolve_SeqBAIJ_4_NaturalOrdering(Mat,Vec,Vec);
44 extern int MatLUFactorNumeric_SeqBAIJ_5_NaturalOrdering(Mat,Mat*);
45 extern int MatSolve_SeqBAIJ_5_NaturalOrdering(Mat,Vec,Vec);
46 
47 
48 #endif
49