Actual source code: mpibdiag.h
2: #include src/mat/impls/bdiag/seq/bdiag.h
4: /*
5: Mat_MPIBDiag - Parallel, block-diagonal format, where each diagonal
6: element consists of a square block of size bs x bs. Dense storage
7: within each block is in column-major order.
9: For now, the parallel part is just a copy of the Mat_MPIAIJ
10: parallel data structure.
11: */
13: typedef struct {
14: PetscInt *rowners; /* row range owned by each processor */
15: PetscInt rstart,rend; /* starting and ending local rows */
16: PetscInt brstart,brend; /* block starting and ending local rows */
17: Mat A; /* local matrix */
18: PetscInt gnd; /* number of global diagonals */
19: PetscInt *gdiag; /* global matrix diagonal numbers */
20: PetscMPIInt size; /* size of communicator */
21: PetscMPIInt rank; /* rank of proc in communicator */
23: /* The following variables are used for matrix assembly */
24: PetscTruth donotstash; /* 1 if off processor entries dropped */
25: MPI_Request *send_waits; /* array of send requests */
26: MPI_Request *recv_waits; /* array of receive requests */
27: PetscInt nsends,nrecvs; /* numbers of sends and receives */
28: PetscScalar *svalues,*rvalues; /* sending and receiving data */
29: PetscInt rmax; /* maximum message length */
30: PetscInt *garray; /* work array */
31: PetscTruth roworiented; /* indicates MatSetValues() input default 1*/
33: /* The following variables are used for matrix-vector products */
35: Vec lvec; /* local vector */
36: VecScatter Mvctx; /* scatter context for vector */
37: } Mat_MPIBDiag;
39: EXTERN PetscErrorCode MatLoad_MPIBDiag(PetscViewer, MatType,Mat*);
40: EXTERN PetscErrorCode MatSetUpMultiply_MPIBDiag(Mat);