1*ea709b57SSatish Balay /* $Id: mpiaij.h,v 1.22 2001/06/21 21:16:31 bsmith Exp balay $ */ 28a729477SBarry Smith 33369ce9aSBarry Smith #if !defined(__MPIAIJ_H) 43369ce9aSBarry Smith #define __MPIAIJ_H 53369ce9aSBarry Smith 63369ce9aSBarry Smith #include "src/mat/impls/aij/seq/aij.h" 732b39ab2SSatish Balay #include "src/sys/ctable.h" 88a729477SBarry Smith 98a729477SBarry Smith typedef struct { 10180e1086SBarry Smith int *rowners,*cowners; /* ranges owned by each processor */ 118c386bf4SBarry Smith int rstart,rend; /* starting and ending owned rows */ 128c386bf4SBarry Smith int cstart,cend; /* starting and ending owned columns */ 138c386bf4SBarry Smith Mat A,B; /* local submatrices: A (diag part), 148c386bf4SBarry Smith B (off-diag part) */ 158c386bf4SBarry Smith int size; /* size of communicator */ 168c386bf4SBarry Smith int rank; /* rank of proc in communicator */ 178c386bf4SBarry Smith 188c386bf4SBarry Smith /* The following variables are used for matrix assembly */ 198c386bf4SBarry Smith 207c922b88SBarry Smith PetscTruth donotstash; /* PETSC_TRUE if off processor entries dropped */ 218c386bf4SBarry Smith MPI_Request *send_waits; /* array of send requests */ 228c386bf4SBarry Smith MPI_Request *recv_waits; /* array of receive requests */ 238c386bf4SBarry Smith int nsends,nrecvs; /* numbers of sends and receives */ 24*ea709b57SSatish Balay PetscScalar *svalues,*rvalues; /* sending and receiving data */ 258c386bf4SBarry Smith int rmax; /* maximum message length */ 26ac2a4f0dSBarry Smith #if defined (PETSC_USE_CTABLE) 27ac2a4f0dSBarry Smith PetscTable colmap; 2832b39ab2SSatish Balay #else 298c386bf4SBarry Smith int *colmap; /* local col number of off-diag col */ 3032b39ab2SSatish Balay #endif 31b0a32e0cSBarry Smith int *garray; /* global index of all off-processor columns */ 328c386bf4SBarry Smith 338c386bf4SBarry Smith /* The following variables are used for matrix-vector products */ 348c386bf4SBarry Smith 358c386bf4SBarry Smith Vec lvec; /* local vector */ 368c386bf4SBarry Smith VecScatter Mvctx; /* scatter context for vector */ 377c922b88SBarry Smith PetscTruth roworiented; /* if true, row-oriented input, default true */ 383369ce9aSBarry Smith 393369ce9aSBarry Smith /* The following variables are for MatGetRow() */ 403369ce9aSBarry Smith 413369ce9aSBarry Smith int *rowindices; /* column indices for row */ 42*ea709b57SSatish Balay PetscScalar *rowvalues; /* nonzero values in row */ 433369ce9aSBarry Smith PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 44b0a32e0cSBarry Smith 45b0a32e0cSBarry Smith /* for factorization codes to hide stuff */ 46b0a32e0cSBarry Smith void *spptr; 47180e1086SBarry Smith } Mat_MPIAIJ; 483369ce9aSBarry Smith 493a7fca6bSBarry Smith EXTERN int MatSetColoring_MPIAIJ(Mat,ISColoring); 503a7fca6bSBarry Smith EXTERN int MatSetValuesAdic_MPIAIJ(Mat,void*); 513a7fca6bSBarry Smith EXTERN int MatSetValuesAdifor_MPIAIJ(Mat,int,void*); 523a7fca6bSBarry Smith 533a7fca6bSBarry Smith 543369ce9aSBarry Smith #endif 55