Actual source code: bdiag.h

  1: /* $Id: bdiag.h,v 1.31 2001/08/07 03:02:53 balay Exp $ */

 3:  #include src/mat/matimpl.h


  8: /*
  9:    Mat_SeqBDiag (MATSEQBDIAG) - block-diagonal format, where each diagonal
 10:    element consists of a square block of size bs  x bs.  Dense storage
 11:    within each block is in column-major order.  The diagonals are the
 12:    full length of the matrix.  As a special case, blocks of size bs=1
 13:    (scalars) are supported as well.
 14: */

 16: typedef struct {
 17:   int          mblock,nblock;    /* block rows and columns */
 18:   int          nonew;            /* if true, no new nonzeros allowed in matrix */
 19:   int          nonew_diag;       /* if true, no new diagonals allowed in matrix */
 20:   int          nz,maxnz;         /* nonzeros, allocated nonzeros */
 21:   int          nd;               /* number of block diagonals */
 22:   int          mainbd;           /* the number of the main block diagonal */
 23:   int          bs;               /* Each diagonal element is an bs x bs matrix */
 24:   int          *diag;            /* value of (row-col)/bs for each diagonal */
 25:   int          *bdlen;           /* block-length of each diagonal */
 26:   int          ndim;             /* diagonals come from an ndim pde (if 0, ignore) */
 27:   int          ndims[3];         /* sizes of the mesh if ndim > 0 */
 28:   PetscTruth   user_alloc;       /* true if the user provided the diagonals */
 29:   int          *colloc;          /* holds column locations if using MatGetRow */
 30:   PetscScalar  **diagv;          /* The actual diagonals */
 31:   PetscScalar  *dvalue;          /* Used to hold a row if MatGetRow is used */
 32:   int          *pivot;           /* pivots for LU factorization (temporary loc) */
 33:   PetscTruth   roworiented;      /* inputs to MatSetValue() are row oriented (default = 1) */
 34:   int          reallocs;         /* number of allocations during MatSetValues */
 35: } Mat_SeqBDiag;

 37: EXTERN int MatNorm_SeqBDiag_Columns(Mat,PetscReal*,int);
 38: EXTERN int MatMult_SeqBDiag_N(Mat A,Vec,Vec);
 39: EXTERN int MatMultAdd_SeqBDiag_N(Mat A,Vec,Vec,Vec);
 40: EXTERN int MatMultTranspose_SeqBDiag_N(Mat A,Vec,Vec);
 41: EXTERN int MatMultTransposeAdd_SeqBDiag_N(Mat A,Vec,Vec,Vec);

 43: #endif