xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision 7eb4e439e85a62817f0f2ee27461d73cf6c9615d)
1 /* $Id: mpiaij.h,v 1.14 1999/01/08 16:45:26 balay Exp balay $ */
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           m, n;                   /* local rows and columns */
12   int           M, N;                   /* global rows and columns */
13   int           rstart, rend;           /* starting and ending owned rows */
14   int           cstart, cend;           /* starting and ending owned columns */
15   Mat           A, B;                   /* local submatrices: A (diag part),
16                                            B (off-diag part) */
17   int           size;                   /* size of communicator */
18   int           rank;                   /* rank of proc in communicator */
19 
20   /* The following variables are used for matrix assembly */
21 
22   Stash         stash;                  /* stash for non-local elements */
23   int           donotstash;             /* 1 if off processor entries dropped */
24   MPI_Request   *send_waits;            /* array of send requests */
25   MPI_Request   *recv_waits;            /* array of receive requests */
26   int           nsends, nrecvs;         /* numbers of sends and receives */
27   Scalar        *svalues, *rvalues;     /* sending and receiving data */
28   int           rmax;                   /* maximum message length */
29 #if defined (USE_CTABLE)
30   Table         colmap;
31 #else
32   int           *colmap;                /* local col number of off-diag col */
33 #endif
34   int           *garray;                /* work array */
35 
36   /* The following variables are used for matrix-vector products */
37 
38   Vec           lvec;              /* local vector */
39   VecScatter    Mvctx;             /* scatter context for vector */
40   int           roworiented;       /* if true, row-oriented input, default true */
41 
42   /* The following variables are for MatGetRow() */
43 
44   int           *rowindices;       /* column indices for row */
45   Scalar        *rowvalues;        /* nonzero values in row */
46   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
47 } Mat_MPIAIJ;
48 
49 #endif
50