xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision ac2a4f0d24b3b6a4ee93edbcad41f4bb9e923944)
1*ac2a4f0dSBarry Smith /* $Id: mpiaij.h,v 1.16 1999/03/18 00:43:27 balay Exp bsmith $ */
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"
732b39ab2SSatish 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 
223369ce9aSBarry Smith   int           donotstash;             /* 1 if off processor entries dropped */
238c386bf4SBarry Smith   MPI_Request   *send_waits;            /* array of send requests */
248c386bf4SBarry Smith   MPI_Request   *recv_waits;            /* array of receive requests */
258c386bf4SBarry Smith   int           nsends, nrecvs;         /* numbers of sends and receives */
268c386bf4SBarry Smith   Scalar        *svalues, *rvalues;     /* sending and receiving data */
278c386bf4SBarry Smith   int           rmax;                   /* maximum message length */
28*ac2a4f0dSBarry Smith #if defined (PETSC_USE_CTABLE)
29*ac2a4f0dSBarry Smith   PetscTable    colmap;
3032b39ab2SSatish Balay #else
318c386bf4SBarry Smith   int           *colmap;                /* local col number of off-diag col */
3232b39ab2SSatish Balay #endif
338c386bf4SBarry Smith   int           *garray;                /* work array */
348c386bf4SBarry Smith 
358c386bf4SBarry Smith   /* The following variables are used for matrix-vector products */
368c386bf4SBarry Smith 
378c386bf4SBarry Smith   Vec           lvec;              /* local vector */
388c386bf4SBarry Smith   VecScatter    Mvctx;             /* scatter context for vector */
394096ce27SBarry Smith   int           roworiented;       /* if true, row-oriented input, default true */
403369ce9aSBarry Smith 
413369ce9aSBarry Smith   /* The following variables are for MatGetRow() */
423369ce9aSBarry Smith 
433369ce9aSBarry Smith   int           *rowindices;       /* column indices for row */
443369ce9aSBarry Smith   Scalar        *rowvalues;        /* nonzero values in row */
453369ce9aSBarry Smith   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
46180e1086SBarry Smith } Mat_MPIAIJ;
473369ce9aSBarry Smith 
483369ce9aSBarry Smith #endif
49