1 /* $Id: mpisbaij.h,v 1.26 2000/04/15 04:16:32 bsmith Exp bsmith $ */ 2 3 #include "src/mat/impls/baij/seq/baij.h" 4 #include "src/sys/ctable.h" 5 #include "src/mat/impls/sbaij/seq/sbaij.h" 6 7 #if !defined(__MPISBAIJ_H) 8 #define __MPISBAIJ_H 9 10 typedef struct { 11 int *rowners,*cowners; /* ranges owned by each processor */ 12 int *rowners_bs; /* rowners*bs */ 13 int m,n; /* local rows/columns, m=n */ 14 int M,N; /* global rows and columns, M=N */ 15 int rstart,rend; /* starting and ending owned rows */ 16 int cstart,cend; /* starting and ending owned columns */ 17 Mat A,B; /* local submatrices: 18 A (diag part) in SeqSBAIJ format, 19 B (supper off-diag part) in SeqBAIJ format */ 20 int size; /* size of communicator */ 21 int rank; /* rank of proc in communicator */ 22 int bs,bs2; /* block size, bs2 = bs*bs */ 23 int Mbs,Nbs; /* number block rows/cols in matrix; M/bs */ 24 int mbs,nbs; /* number block rows/cols on processor; m/bs=n/bs */ 25 26 /* The following variables are used for matrix assembly */ 27 28 PetscTruth donotstash; /* if 1, off processor entries dropped */ 29 MPI_Request *send_waits; /* array of send requests */ 30 MPI_Request *recv_waits; /* array of receive requests */ 31 int nsends,nrecvs; /* numbers of sends and receives */ 32 MatScalar *svalues,*rvalues; /* sending and receiving data */ 33 int rmax; /* maximum message length */ 34 #if defined (PETSC_USE_CTABLE) 35 PetscTable colmap; 36 #else 37 int *colmap; /* local col number of off-diag col */ 38 #endif 39 int *garray; /* work array */ 40 41 /* The following variable is used by blocked matrix assembly */ 42 MatScalar *barray; /* Block array of size bs2 */ 43 44 /* The following variables are used for matrix-vector products */ 45 46 Vec lvec; /* local vector */ 47 VecScatter Mvctx; /* scatter context for vector */ 48 PetscTruth roworiented; /* if true, row-oriented input, default true */ 49 50 /* The following variables are for MatGetRow() */ 51 52 int *rowindices; /* column indices for row */ 53 Scalar *rowvalues; /* nonzero values in row */ 54 PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 55 56 /* Some variables to make MatSetValues and others more efficient */ 57 int rstart_bs,rend_bs; 58 int cstart_bs,cend_bs; 59 int *ht; /* Hash table to speed up matrix assembly */ 60 MatScalar **hd; /* Hash table data */ 61 int ht_size; 62 int ht_total_ct,ht_insert_ct; /* Hash table statistics */ 63 PetscTruth ht_flag; /* Flag to indicate if hash tables are used */ 64 double ht_fact; /* Factor to determine the HT size */ 65 66 #if defined(PETSC_USE_MAT_SINGLE) 67 int setvalueslen; 68 MatScalar *setvaluescopy; /* area double precision values in MatSetValuesXXX() are copied 69 before calling MatSetValuesXXX_MPISBAIJ_MatScalar() */ 70 #endif 71 } Mat_MPISBAIJ; 72 73 #endif 74