xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision d0e4ac2e2bc9e1be9c22e9b3e15c37cdf7c79f7b)
1 /* $Id: mpiaij.h,v 1.15 1999/01/08 21:33:53 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   int           donotstash;             /* 1 if off processor entries dropped */
23   MPI_Request   *send_waits;            /* array of send requests */
24   MPI_Request   *recv_waits;            /* array of receive requests */
25   int           nsends, nrecvs;         /* numbers of sends and receives */
26   Scalar        *svalues, *rvalues;     /* sending and receiving data */
27   int           rmax;                   /* maximum message length */
28 #if defined (USE_CTABLE)
29   Table         colmap;
30 #else
31   int           *colmap;                /* local col number of off-diag col */
32 #endif
33   int           *garray;                /* work array */
34 
35   /* The following variables are used for matrix-vector products */
36 
37   Vec           lvec;              /* local vector */
38   VecScatter    Mvctx;             /* scatter context for vector */
39   int           roworiented;       /* if true, row-oriented input, default true */
40 
41   /* The following variables are for MatGetRow() */
42 
43   int           *rowindices;       /* column indices for row */
44   Scalar        *rowvalues;        /* nonzero values in row */
45   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
46 } Mat_MPIAIJ;
47 
48 #endif
49