1 2 #if !defined(__MPISELL_H) 3 #define __MPISELL_H 4 #endif 5 #include <../src/mat/impls/sell/seq/sell.h> 6 7 typedef struct { 8 Mat A,B; /* local submatrices: A (diag part), 9 B (off-diag part) */ 10 PetscMPIInt size; /* size of communicator */ 11 PetscMPIInt rank; /* rank of proc in communicator */ 12 13 /* The following variables are used for matrix assembly */ 14 PetscBool donotstash; /* PETSC_TRUE if off processor entries dropped */ 15 MPI_Request *send_waits; /* array of send requests */ 16 MPI_Request *recv_waits; /* array of receive requests */ 17 PetscInt nsends,nrecvs; /* numbers of sends and receives */ 18 PetscScalar *svalues,*rvalues; /* sending and receiving data */ 19 PetscInt rmax; /* maximum message length */ 20 #if defined(PETSC_USE_CTABLE) 21 PetscTable colmap; 22 #else 23 PetscInt *colmap; /* local col number of off-diag col */ 24 #endif 25 PetscInt *garray; /* global index of all off-processor columns */ 26 27 /* The following variables are used for matrix-vector products */ 28 Vec lvec; /* local vector */ 29 Vec diag; 30 VecScatter Mvctx; /* scatter context for vector */ 31 PetscBool roworiented; /* if true, row-oriented input, default true */ 32 33 /* The following variables are for MatGetRow() */ 34 PetscInt *rowindices; /* column indices for row */ 35 PetscScalar *rowvalues; /* nonzero values in row */ 36 PetscBool getrowactive; /* indicates MatGetRow(), not restored */ 37 38 PetscInt *ld; /* number of entries per row left of diagona block */ 39 } Mat_MPISELL; 40 41 PETSC_EXTERN PetscErrorCode MatCreate_MPISELL(Mat); 42 PETSC_INTERN PetscErrorCode MatSetUpMultiply_MPISELL(Mat); 43 44 PETSC_INTERN PetscErrorCode MatDisAssemble_MPISELL(Mat); 45 PETSC_INTERN PetscErrorCode MatDuplicate_MPISELL(Mat,MatDuplicateOption,Mat*); 46 47 PETSC_INTERN PetscErrorCode MatDestroy_MPISELL_PtAP(Mat); 48 PETSC_INTERN PetscErrorCode MatDestroy_MPISELL(Mat); 49 50 PETSC_INTERN PetscErrorCode MatSetValues_MPISELL(Mat,PetscInt,const PetscInt[],PetscInt,const PetscInt[],const PetscScalar [],InsertMode); 51 PETSC_INTERN PetscErrorCode MatSetOption_MPISELL(Mat,MatOption,PetscBool); 52 PETSC_INTERN PetscErrorCode MatGetSeqNonzeroStructure_MPISELL(Mat,Mat*); 53 54 PETSC_INTERN PetscErrorCode MatSetFromOptions_MPISELL(PetscOptionItems*,Mat); 55 PETSC_INTERN PetscErrorCode MatMPISELLSetPreallocation_MPISELL(Mat,PetscInt,const PetscInt[],PetscInt,const PetscInt[]); 56 57 PETSC_INTERN PetscErrorCode MatConvert_MPISELL_MPIAIJ(Mat,MatType,MatReuse,Mat*); 58 PETSC_INTERN PetscErrorCode MatConvert_MPIAIJ_MPISELL(Mat,MatType,MatReuse,Mat*); 59 60 PETSC_INTERN PetscErrorCode MatSOR_MPISELL(Mat,Vec,PetscReal,MatSORType,PetscReal,PetscInt,PetscInt,Vec); 61 62 PETSC_INTERN PetscErrorCode MatCreateColmap_MPISELL_Private(Mat); 63 PETSC_INTERN PetscErrorCode MatDiagonalScaleLocal_MPISELL(Mat,Vec); 64