1 /* $Id: mpiaij.h,v 1.12 1995/12/23 21:57:19 bsmith Exp bsmith $ */ 2 3 #include "baij.h" 4 5 typedef struct { 6 int *rowners, *cowners; /* ranges owned by each processor */ 7 int m, n; /* local rows and columns */ 8 int M, N; /* global rows and columns */ 9 int rstart, rend; /* starting and ending owned rows */ 10 int cstart, cend; /* starting and ending owned columns */ 11 Mat A, B; /* local submatrices: A (diag part), 12 B (off-diag part) */ 13 int size; /* size of communicator */ 14 int rank; /* rank of proc in communicator */ 15 16 /* The following variables are used for matrix assembly */ 17 18 InsertMode insertmode; /* mode for MatSetValues */ 19 Stash stash; /* stash for non-local elements */ 20 MPI_Request *send_waits; /* array of send requests */ 21 MPI_Request *recv_waits; /* array of receive requests */ 22 int nsends, nrecvs; /* numbers of sends and receives */ 23 Scalar *svalues, *rvalues; /* sending and receiving data */ 24 int rmax; /* maximum message length */ 25 int *colmap; /* local col number of off-diag col */ 26 int *garray; /* work array */ 27 28 /* The following variables are used for matrix-vector products */ 29 30 Vec lvec; /* local vector */ 31 VecScatter Mvctx; /* scatter context for vector */ 32 int roworiented; /* if true, row-oriented input, default true */ 33 34 /* The following variables are for MatGetRow() */ 35 36 int *rowindices; /* column indices for row */ 37 Scalar *rowvalues; /* nonzero values in row */ 38 PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 39 } Mat_MPIBAIJ; 40