1*e0d8be96SSatish Balay /* $Id: mpibaij.h,v 1.17 1999/03/11 22:30:39 balay Exp balay $ */ 2e8823a70SSatish Balay 370f55243SBarry Smith #include "src/mat/impls/baij/seq/baij.h" 432b39ab2SSatish Balay #include "src/sys/ctable.h" 5e8823a70SSatish Balay 679bdfe76SSatish Balay #if !defined(__MPIBAIJ_H) 779bdfe76SSatish Balay #define __MPIBAIJ_H 879bdfe76SSatish Balay 9e8823a70SSatish Balay typedef struct { 10e8823a70SSatish Balay int *rowners,*cowners; /* ranges owned by each processor */ 11*e0d8be96SSatish Balay int *rowners_bs; /* rowners*bs */ 12e8823a70SSatish Balay int m, n; /* local rows and columns */ 13e8823a70SSatish Balay int M, N; /* global rows and columns */ 14e8823a70SSatish Balay int rstart, rend; /* starting and ending owned rows */ 15e8823a70SSatish Balay int cstart, cend; /* starting and ending owned columns */ 16e8823a70SSatish Balay Mat A, B; /* local submatrices: A (diag part), 17e8823a70SSatish Balay B (off-diag part) */ 18e8823a70SSatish Balay int size; /* size of communicator */ 19e8823a70SSatish Balay int rank; /* rank of proc in communicator */ 2079bdfe76SSatish Balay int bs, bs2; /* block size, bs2 = bs*bs */ 214c1c0d89SBarry Smith int Mbs, Nbs; /* number block rows/cols in matrix; M/bs, N/bs */ 224c1c0d89SBarry Smith int mbs, nbs; /* number block rows/cols on processor; m/bs, n/bs */ 23e8823a70SSatish Balay 24e8823a70SSatish Balay /* The following variables are used for matrix assembly */ 25e8823a70SSatish Balay 26a2d1c673SSatish Balay Stash stash,bstash; /* stash for non-local elements */ 2790f02eecSBarry Smith int donotstash; /* if 1, off processor entries dropped */ 28e8823a70SSatish Balay MPI_Request *send_waits; /* array of send requests */ 29e8823a70SSatish Balay MPI_Request *recv_waits; /* array of receive requests */ 30e8823a70SSatish Balay int nsends, nrecvs; /* numbers of sends and receives */ 31e8823a70SSatish Balay Scalar *svalues, *rvalues; /* sending and receiving data */ 32e8823a70SSatish Balay int rmax; /* maximum message length */ 3332b39ab2SSatish Balay #if defined (USE_CTABLE) 3432b39ab2SSatish Balay Table colmap; 3532b39ab2SSatish Balay #else 36e8823a70SSatish Balay int *colmap; /* local col number of off-diag col */ 3732b39ab2SSatish Balay #endif 38e8823a70SSatish Balay int *garray; /* work array */ 39e8823a70SSatish Balay 400bf34be7SSatish Balay /* The following variable is used by blocked matrix assembly */ 410bf34be7SSatish Balay Scalar *barray; /* Block array of size bs2 */ 420bf34be7SSatish Balay 43e8823a70SSatish Balay /* The following variables are used for matrix-vector products */ 44e8823a70SSatish Balay 45e8823a70SSatish Balay Vec lvec; /* local vector */ 46e8823a70SSatish Balay VecScatter Mvctx; /* scatter context for vector */ 47e8823a70SSatish Balay int roworiented; /* if true, row-oriented input, default true */ 48e8823a70SSatish Balay 49e8823a70SSatish Balay /* The following variables are for MatGetRow() */ 50e8823a70SSatish Balay 51e8823a70SSatish Balay int *rowindices; /* column indices for row */ 52e8823a70SSatish Balay Scalar *rowvalues; /* nonzero values in row */ 53e8823a70SSatish Balay PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 544fa0d573SSatish Balay 554fa0d573SSatish Balay /* Some variables to make MatSetValues and others more efficient */ 564fa0d573SSatish Balay int rstart_bs, rend_bs; 574fa0d573SSatish Balay int cstart_bs, cend_bs; 5847cb9d27SSatish Balay int *ht; /* Hash table to speed up matrix assembly */ 5947cb9d27SSatish Balay Scalar **hd; /* Hash table data */ 60fef45726SSatish Balay int ht_size; 61187ce0cbSSatish Balay int ht_total_ct,ht_insert_ct; /* Hash table statistics */ 62b133499aSSatish Balay int ht_flag; /* Flag to indicate if hash tables are used */ 63133cdb44SSatish Balay double ht_fact; /* Factor to determine the HT size */ 64e8823a70SSatish Balay } Mat_MPIBAIJ; 6579bdfe76SSatish Balay 6679bdfe76SSatish Balay 6779bdfe76SSatish Balay #endif 68