Actual source code: sbaij.h

  1: /* $Id: sbaij.h,v 1.21 2001/08/07 03:03:01 balay Exp $ */

 3:  #include src/mat/matimpl.h


  8: /*  
  9:   MATSEQSBAIJ format - Block compressed row storage. The i[] and j[] 
 10:   arrays start at 0.
 11: */

 13: typedef struct {
 14:   PetscTruth       sorted;       /* if true, rows are sorted by increasing columns */
 15:   PetscTruth       roworiented;  /* if true, row-oriented input, default */
 16:   int              nonew;        /* 1 don't add new nonzeros, -1 generate error on new */
 17:   PetscTruth       singlemalloc; /* if true a, i, and j have been obtained with
 18:                                         one big malloc */
 19:   int              bs,bs2;       /* block size, square of block size */
 20:   int              mbs,nbs;      /* rows/bs or columns/bs */
 21:   int              s_nz,s_maxnz; /* total diagonal and superdiagonal nonzero blocks, 
 22:                                     total allocated diagonal and superdiagonal nonzero blocks*/
 23:   int              *diag;        /* pointers to diagonal elements */
 24:   int              *i;           /* pointer to beginning of each row */
 25:   int              *inew;        /* pointer to beginning of each row of reordered matrix */
 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] is start of row k of reordered matrix */
 29:   int              *jnew;        /* column values: jnew + i[k] is start of row k */
 30:   MatScalar        *a;           /* nonzero diagonal and superdiagonal elements */
 31:   MatScalar        *anew;        /* nonzero diagonal and superdiagonal elements of reordered matrix */
 32:   IS               row,icol;     /* index sets, used for reorderings */
 33:   PetscScalar      *solve_work;  /* work space used in MatSolve */
 34:   PetscScalar      *solves_work; /* work space used in MatSolves */
 35:   int              solves_work_n;/* size of solves_work */
 36:   int              reallocs;     /* number of mallocs done during MatSetValues() 
 37:                                     as more values are set then were preallocated */
 38:   PetscScalar      *mult_work;   /* work array for matrix vector product*/
 39:   PetscScalar      *saved_values;

 41:   PetscTruth       keepzeroedrows; /* if true, MatZeroRows() will not change nonzero structure */
 42:   int              *a2anew;        /* map used for symm permutation */
 43:   PetscTruth       permute;        /* if true, a non-trivial permutation is used for factorization */
 44:   PetscTruth       pivotinblocks;  /* pivot inside factorization of each diagonal block */
 45: } Mat_SeqSBAIJ;

 47: extern int MatICCFactorSymbolic_SeqSBAIJ(Mat,IS,PetscReal,int,Mat *);
 48: extern int MatDuplicate_SeqSBAIJ(Mat,MatDuplicateOption,Mat*);
 49: extern int MatMarkDiagonal_SeqSBAIJ(Mat);

 51: extern int MatCholeskyFactorNumeric_SeqSBAIJ_1_NaturalOrdering(Mat,Mat*);
 52: extern int MatCholeskyFactorNumeric_SeqSBAIJ_1_NaturalOrdering_inplace(Mat,Mat*);
 53: extern int MatSolve_SeqSBAIJ_1_NaturalOrdering(Mat,Vec,Vec);
 54: extern int MatSolve_SeqSBAIJ_1_NaturalOrdering_inplace(Mat,Vec,Vec);
 55: extern int MatSolveTranspose_SeqSBAIJ_1_NaturalOrdering(Mat,Vec,Vec);

 57: extern int MatCholeskyFactorNumeric_SeqSBAIJ_2_NaturalOrdering(Mat,Mat*);
 58: extern int MatSolve_SeqSBAIJ_2_NaturalOrdering(Mat,Vec,Vec);
 59: extern int MatSolveTranspose_SeqSBAIJ_2_NaturalOrdering(Mat,Vec,Vec);

 61: extern int MatCholeskyFactorNumeric_SeqSBAIJ_3_NaturalOrdering(Mat,Mat*);
 62: extern int MatSolve_SeqSBAIJ_3_NaturalOrdering(Mat,Vec,Vec);
 63: extern int MatSolveTranspose_SeqSBAIJ_3_NaturalOrdering(Mat,Vec,Vec);

 65: extern int MatCholeskyFactorNumeric_SeqSBAIJ_4_NaturalOrdering(Mat,Mat*);
 66: extern int MatSolve_SeqSBAIJ_4_NaturalOrdering(Mat,Vec,Vec);
 67: extern int MatSolveTranspose_SeqSBAIJ_4_NaturalOrdering(Mat,Vec,Vec);

 69: extern int MatCholeskyFactorNumeric_SeqSBAIJ_5_NaturalOrdering(Mat,Mat*);
 70: extern int MatSolve_SeqSBAIJ_5_NaturalOrdering(Mat,Vec,Vec);
 71: extern int MatSolveTranspose_SeqSBAIJ_5_NaturalOrdering(Mat,Vec,Vec);

 73: extern int MatCholeskyFactorNumeric_SeqSBAIJ_6_NaturalOrdering(Mat,Mat*);
 74: extern int MatSolve_SeqSBAIJ_6_NaturalOrdering(Mat,Vec,Vec);
 75: extern int MatSolveTranspose_SeqSBAIJ_6_NaturalOrdering(Mat,Vec,Vec);

 77: extern int MatCholeskyFactorNumeric_SeqSBAIJ_7_NaturalOrdering(Mat,Mat*);
 78: extern int MatSolve_SeqSBAIJ_7_NaturalOrdering(Mat,Vec,Vec);
 79: extern int MatSolveTranspose_SeqSBAIJ_7_NaturalOrdering(Mat,Vec,Vec);

 81: extern int MatCholeskyFactorNumeric_SeqSBAIJ_N_NaturalOrdering(Mat,Mat*);
 82: extern int MatSolve_SeqSBAIJ_N_NaturalOrdering(Mat,Vec,Vec);

 84: extern int MatRelax_SeqSBAIJ(Mat,Vec,PetscReal,MatSORType,PetscReal,int,int,Vec);

 86: #endif