1 /* $Id: mpiaij.h,v 1.23 2001/08/07 03:02:49 balay Exp $ */ 2 3 #if !defined(__MPIAIJ_H) 4 #define __MPIAIJ_H 5 6 #include "src/mat/impls/aij/seq/aij.h" 7 #include "src/sys/ctable.h" 8 9 typedef struct { 10 int *rowners,*cowners; /* ranges owned by each processor */ 11 int rstart,rend; /* starting and ending owned rows */ 12 int cstart,cend; /* starting and ending owned columns */ 13 Mat A,B; /* local submatrices: A (diag part), 14 B (off-diag part) */ 15 int size; /* size of communicator */ 16 int rank; /* rank of proc in communicator */ 17 18 /* The following variables are used for matrix assembly */ 19 20 PetscTruth donotstash; /* PETSC_TRUE if off processor entries dropped */ 21 MPI_Request *send_waits; /* array of send requests */ 22 MPI_Request *recv_waits; /* array of receive requests */ 23 int nsends,nrecvs; /* numbers of sends and receives */ 24 PetscScalar *svalues,*rvalues; /* sending and receiving data */ 25 int rmax; /* maximum message length */ 26 #if defined (PETSC_USE_CTABLE) 27 PetscTable colmap; 28 #else 29 int *colmap; /* local col number of off-diag col */ 30 #endif 31 int *garray; /* global index of all off-processor columns */ 32 33 /* The following variables are used for matrix-vector products */ 34 35 Vec lvec; /* local vector */ 36 VecScatter Mvctx; /* scatter context for vector */ 37 PetscTruth roworiented; /* if true, row-oriented input, default true */ 38 39 /* The following variables are for MatGetRow() */ 40 41 int *rowindices; /* column indices for row */ 42 PetscScalar *rowvalues; /* nonzero values in row */ 43 PetscTruth getrowactive; /* indicates MatGetRow(), not restored */ 44 45 } Mat_MPIAIJ; 46 47 EXTERN int MatSetColoring_MPIAIJ(Mat,ISColoring); 48 EXTERN int MatSetValuesAdic_MPIAIJ(Mat,void*); 49 EXTERN int MatSetValuesAdifor_MPIAIJ(Mat,int,void*); 50 EXTERN int MatSetUpMultiply_MPIAIJ(Mat); 51 EXTERN int DisAssemble_MPIAIJ(Mat); 52 EXTERN int MatSetValues_SeqAIJ(Mat,int,int*,int,int*,PetscScalar*,InsertMode); 53 EXTERN int MatGetRow_SeqAIJ(Mat,int,int*,int**,PetscScalar**); 54 EXTERN int MatRestoreRow_SeqAIJ(Mat,int,int*,int**,PetscScalar**); 55 EXTERN int MatPrintHelp_SeqAIJ(Mat); 56 EXTERN int MatDuplicate_MPIAIJ(Mat,MatDuplicateOption,Mat *); 57 EXTERN int MatIncreaseOverlap_MPIAIJ(Mat,int,IS [],int); 58 EXTERN int MatFDColoringCreate_MPIAIJ(Mat,ISColoring,MatFDColoring); 59 EXTERN int MatGetSubMatrices_MPIAIJ (Mat,int,const IS[],const IS[],MatReuse,Mat *[]); 60 EXTERN int MatGetSubMatrix_MPIAIJ (Mat,IS,IS,int,MatReuse,Mat *); 61 EXTERN int MatLoad_MPIAIJ(PetscViewer,const MatType,Mat*); 62 EXTERN int MatAXPY_SeqAIJ(const PetscScalar[],Mat,Mat,MatStructure); 63 64 #if !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE) 65 EXTERN int MatLUFactorSymbolic_MPIAIJ_TFS(Mat,IS,IS,MatFactorInfo*,Mat*); 66 #endif 67 68 EXTERN_C_BEGIN 69 EXTERN int MatGetDiagonalBlock_MPIAIJ(Mat,PetscTruth *,MatReuse,Mat *); 70 EXTERN int MatDiagonalScaleLocal_MPIAIJ(Mat,Vec); 71 EXTERN_C_END 72 73 #endif 74