1 /* $Id: mpibaij.h,v 1.10 1998/01/12 20:34:54 balay Exp balay $ */ 2 3 #include "src/mat/impls/baij/seq/baij.h" 4 5 #if !defined(__MPIBAIJ_H) 6 #define __MPIBAIJ_H 7 8 typedef struct { 9 int *rowners, *cowners; /* ranges owned by each processor */ 10 int m, n; /* local rows and columns */ 11 int M, N; /* global rows and columns */ 12 int rstart, rend; /* starting and ending owned rows */ 13 int cstart, cend; /* starting and ending owned columns */ 14 Mat A, B; /* local submatrices: A (diag part), 15 B (off-diag part) */ 16 int size; /* size of communicator */ 17 int rank; /* rank of proc in communicator */ 18 int bs, bs2; /* block size, bs2 = bs*bs */ 19 int Mbs, Nbs; /* number block rows/cols in matrix; M/bs, N/bs */ 20 int mbs, nbs; /* number block rows/cols on processor; m/bs, n/bs */ 21 22 /* The following variables are used for matrix assembly */ 23 24 Stash stash; /* stash for non-local elements */ 25 int donotstash; /* if 1, off processor entries dropped */ 26 MPI_Request *send_waits; /* array of send requests */ 27 MPI_Request *recv_waits; /* array of receive requests */ 28 int nsends, nrecvs; /* numbers of sends and receives */ 29 Scalar *svalues, *rvalues; /* sending and receiving data */ 30 int rmax; /* maximum message length */ 31 int *colmap; /* local col number of off-diag col */ 32 int *garray; /* work array */ 33 34 /* The following variable is used by blocked matrix assembly */ 35 Scalar *barray; /* Block array of size bs2 */ 36 37 /* The following variables are used for matrix-vector products */ 38 39 Vec lvec; /* local vector */ 40 VecScatter Mvctx; /* scatter context for vector */ 41 int roworiented; /* if true, row-oriented input, default true */ 42 43 /* The following variables are for MatGetRow() */ 44 45 int *rowindices; /* column indices for row */ 46 Scalar *rowvalues; /* nonzero values in row */ 47 PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 48 49 /* Some variables to make MatSetValues and others more efficient */ 50 int rstart_bs, rend_bs; 51 int cstart_bs, cend_bs; 52 int *ht; /* Hast table to speed up matrix assembly */ 53 Scalar **hd; /* Hast table data */ 54 int ht_size; 55 } Mat_MPIBAIJ; 56 57 58 #endif 59