xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision 32b39ab223e5adfce98c83fbe40c792294ca23b1)
1*32b39ab2SSatish Balay /* $Id: mpiaij.h,v 1.13 1997/03/26 01:35:49 bsmith Exp balay $ */
28a729477SBarry Smith 
33369ce9aSBarry Smith #if !defined(__MPIAIJ_H)
43369ce9aSBarry Smith #define __MPIAIJ_H
53369ce9aSBarry Smith 
63369ce9aSBarry Smith #include "src/mat/impls/aij/seq/aij.h"
7*32b39ab2SSatish Balay #include "src/sys/ctable.h"
88a729477SBarry Smith 
98a729477SBarry Smith typedef struct {
10180e1086SBarry Smith   int           *rowners, *cowners;     /* ranges owned by each processor */
118c386bf4SBarry Smith   int           m, n;                   /* local rows and columns */
128c386bf4SBarry Smith   int           M, N;                   /* global rows and columns */
138c386bf4SBarry Smith   int           rstart, rend;           /* starting and ending owned rows */
148c386bf4SBarry Smith   int           cstart, cend;           /* starting and ending owned columns */
158c386bf4SBarry Smith   Mat           A, B;                   /* local submatrices: A (diag part),
168c386bf4SBarry Smith                                            B (off-diag part) */
178c386bf4SBarry Smith   int           size;                   /* size of communicator */
188c386bf4SBarry Smith   int           rank;                   /* rank of proc in communicator */
198c386bf4SBarry Smith 
208c386bf4SBarry Smith   /* The following variables are used for matrix assembly */
218c386bf4SBarry Smith 
228c386bf4SBarry Smith   Stash         stash;                  /* stash for non-local elements */
233369ce9aSBarry Smith   int           donotstash;             /* 1 if off processor entries dropped */
248c386bf4SBarry Smith   MPI_Request   *send_waits;            /* array of send requests */
258c386bf4SBarry Smith   MPI_Request   *recv_waits;            /* array of receive requests */
268c386bf4SBarry Smith   int           nsends, nrecvs;         /* numbers of sends and receives */
278c386bf4SBarry Smith   Scalar        *svalues, *rvalues;     /* sending and receiving data */
288c386bf4SBarry Smith   int           rmax;                   /* maximum message length */
29*32b39ab2SSatish Balay #if defined (USE_CTABLE)
30*32b39ab2SSatish Balay   Table         colmap
31*32b39ab2SSatish Balay #else
328c386bf4SBarry Smith   int           *colmap;                /* local col number of off-diag col */
33*32b39ab2SSatish Balay #endif
348c386bf4SBarry Smith   int           *garray;                /* work array */
358c386bf4SBarry Smith 
368c386bf4SBarry Smith   /* The following variables are used for matrix-vector products */
378c386bf4SBarry Smith 
388c386bf4SBarry Smith   Vec           lvec;              /* local vector */
398c386bf4SBarry Smith   VecScatter    Mvctx;             /* scatter context for vector */
404096ce27SBarry Smith   int           roworiented;       /* if true, row-oriented input, default true */
413369ce9aSBarry Smith 
423369ce9aSBarry Smith   /* The following variables are for MatGetRow() */
433369ce9aSBarry Smith 
443369ce9aSBarry Smith   int           *rowindices;       /* column indices for row */
453369ce9aSBarry Smith   Scalar        *rowvalues;        /* nonzero values in row */
463369ce9aSBarry Smith   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
47180e1086SBarry Smith } Mat_MPIAIJ;
483369ce9aSBarry Smith 
493369ce9aSBarry Smith #endif
50