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