xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision b0a32e0c6855ee6a6cd3495fa7da12ea9885bc5d)
1*b0a32e0cSBarry Smith /* $Id: mpiaij.h,v 1.20 2000/10/24 20:25:36 bsmith 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           rstart,rend;           /* starting and ending owned rows */
128c386bf4SBarry Smith   int           cstart,cend;           /* starting and ending owned columns */
138c386bf4SBarry Smith   Mat           A,B;                   /* local submatrices: A (diag part),
148c386bf4SBarry Smith                                            B (off-diag part) */
158c386bf4SBarry Smith   int           size;                   /* size of communicator */
168c386bf4SBarry Smith   int           rank;                   /* rank of proc in communicator */
178c386bf4SBarry Smith 
188c386bf4SBarry Smith   /* The following variables are used for matrix assembly */
198c386bf4SBarry Smith 
207c922b88SBarry Smith   PetscTruth    donotstash;             /* PETSC_TRUE if off processor entries dropped */
218c386bf4SBarry Smith   MPI_Request   *send_waits;            /* array of send requests */
228c386bf4SBarry Smith   MPI_Request   *recv_waits;            /* array of receive requests */
238c386bf4SBarry Smith   int           nsends,nrecvs;         /* numbers of sends and receives */
248c386bf4SBarry Smith   Scalar        *svalues,*rvalues;     /* sending and receiving data */
258c386bf4SBarry Smith   int           rmax;                   /* maximum message length */
26ac2a4f0dSBarry Smith #if defined (PETSC_USE_CTABLE)
27ac2a4f0dSBarry Smith   PetscTable    colmap;
2832b39ab2SSatish Balay #else
298c386bf4SBarry Smith   int           *colmap;                /* local col number of off-diag col */
3032b39ab2SSatish Balay #endif
31*b0a32e0cSBarry Smith   int           *garray;                /* global index of all off-processor columns */
328c386bf4SBarry Smith 
338c386bf4SBarry Smith   /* The following variables are used for matrix-vector products */
348c386bf4SBarry Smith 
358c386bf4SBarry Smith   Vec           lvec;              /* local vector */
368c386bf4SBarry Smith   VecScatter    Mvctx;             /* scatter context for vector */
377c922b88SBarry Smith   PetscTruth    roworiented;       /* if true, row-oriented input, default true */
383369ce9aSBarry Smith 
393369ce9aSBarry Smith   /* The following variables are for MatGetRow() */
403369ce9aSBarry Smith 
413369ce9aSBarry Smith   int           *rowindices;       /* column indices for row */
423369ce9aSBarry Smith   Scalar        *rowvalues;        /* nonzero values in row */
433369ce9aSBarry Smith   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
44*b0a32e0cSBarry Smith 
45*b0a32e0cSBarry Smith   /* for factorization codes to hide stuff */
46*b0a32e0cSBarry Smith   void          *spptr;
47180e1086SBarry Smith } Mat_MPIAIJ;
483369ce9aSBarry Smith 
493369ce9aSBarry Smith #endif
50