Actual source code: mpisbaij.h

  1: /* $Id: mpisbaij.h,v 1.3 2001/08/07 03:03:05 balay Exp $ */

 3:  #include src/mat/impls/baij/seq/baij.h
 4:  #include src/sys/ctable.h
 5:  #include src/mat/impls/sbaij/seq/sbaij.h


 10: typedef struct {
 11:   int           *rowners,*cowners;     /* ranges owned by each processor */
 12:   int           *rowners_bs;           /* rowners*bs */
 13:   int           rstart,rend;           /* starting and ending owned rows */
 14:   int           cstart,cend;           /* starting and ending owned columns */
 15:   Mat           A,B;                   /* local submatrices: 
 16:                                         A (diag part) in SeqSBAIJ format,
 17:                                         B (supper off-diag part) in SeqBAIJ format */
 18:   int           size;                  /* size of communicator */
 19:   int           rank;                  /* rank of proc in communicator */
 20:   int           bs,bs2;                /* block size, bs2 = bs*bs */
 21:   int           Mbs,Nbs;               /* number block rows/cols in matrix; M/bs */
 22:   int           mbs,nbs;               /* number block rows/cols on processor; m/bs=n/bs */

 24:   /* The following variables are used for matrix assembly */

 26:   PetscTruth    donotstash;             /* if 1, off processor entries dropped */
 27:   MPI_Request   *send_waits;            /* array of send requests */
 28:   MPI_Request   *recv_waits;            /* array of receive requests */
 29:   int           nsends,nrecvs;         /* numbers of sends and receives */
 30:   MatScalar     *svalues,*rvalues;     /* sending and receiving data */
 31:   int           rmax;                   /* maximum message length */
 32: #if defined (PETSC_USE_CTABLE)
 33:   PetscTable    colmap;
 34: #else
 35:   int           *colmap;                /* local col number of off-diag col */
 36: #endif
 37:   int           *garray;                /* work array */

 39:   /* The following variable is used by blocked matrix assembly */
 40:   MatScalar     *barray;                /* Block array of size bs2 */

 42:   /* The following variables are used for matrix-vector products */

 44:   Vec           lvec;                     /* local seq vector */
 45:   VecScatter    Mvctx;                    /* scatter context for vector */
 46:   Vec           slvec0,slvec1;            /* parallel vectors */
 47:   Vec           slvec0b,slvec1a,slvec1b;  /* seq vectors: local partition of slvec0 and slvec1 */
 48:   VecScatter    sMvctx;                   /* scatter context for vector used for reducing communication */
 49:   PetscTruth    roworiented;              /* if true, row-oriented input, default true */

 51:   /* The following variables are for MatGetRow() */

 53:   int           *rowindices;       /* column indices for row */
 54:   PetscScalar   *rowvalues;        /* nonzero values in row */
 55:   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */

 57:   /* Some variables to make MatSetValues and others more efficient */
 58:   int           rstart_bs,rend_bs;
 59:   int           cstart_bs,cend_bs;
 60:   int           *ht;                      /* Hash table to speed up matrix assembly */
 61:   MatScalar     **hd;                     /* Hash table data */
 62:   int           ht_size;
 63:   int           ht_total_ct,ht_insert_ct; /* Hash table statistics */
 64:   PetscTruth    ht_flag;                  /* Flag to indicate if hash tables are used */
 65:   double        ht_fact;                  /* Factor to determine the HT size */

 67: #if defined(PETSC_USE_MAT_SINGLE)
 68:   int           setvalueslen;
 69:   MatScalar     *setvaluescopy; /* area double precision values in MatSetValuesXXX() are copied
 70:                                       before calling MatSetValuesXXX_MPISBAIJ_MatScalar() */
 71: #endif
 72: } Mat_MPISBAIJ;

 74: #endif