xref: /petsc/src/mat/impls/aij/mpi/mpiaij.h (revision 3369ce9a255b285539dc954b9ad9cefcea2f84b6)
1*3369ce9aSBarry Smith /* $Id: mpiaij.h,v 1.12 1995/12/23 21:57:19 bsmith Exp bsmith $ */
28a729477SBarry Smith 
3*3369ce9aSBarry Smith #if !defined(__MPIAIJ_H)
4*3369ce9aSBarry Smith #define __MPIAIJ_H
5*3369ce9aSBarry Smith 
6*3369ce9aSBarry Smith #include "src/mat/impls/aij/seq/aij.h"
78a729477SBarry Smith 
88a729477SBarry Smith typedef struct {
9180e1086SBarry Smith   int           *rowners, *cowners;     /* ranges owned by each processor */
108c386bf4SBarry Smith   int           m, n;                   /* local rows and columns */
118c386bf4SBarry Smith   int           M, N;                   /* global rows and columns */
128c386bf4SBarry Smith   int           rstart, rend;           /* starting and ending owned rows */
138c386bf4SBarry Smith   int           cstart, cend;           /* starting and ending owned columns */
148c386bf4SBarry Smith   Mat           A, B;                   /* local submatrices: A (diag part),
158c386bf4SBarry Smith                                            B (off-diag part) */
168c386bf4SBarry Smith   int           size;                   /* size of communicator */
178c386bf4SBarry Smith   int           rank;                   /* rank of proc in communicator */
188c386bf4SBarry Smith 
198c386bf4SBarry Smith   /* The following variables are used for matrix assembly */
208c386bf4SBarry Smith 
218c386bf4SBarry Smith   Stash         stash;                  /* stash for non-local elements */
22*3369ce9aSBarry 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 */
288c386bf4SBarry Smith   int           *colmap;                /* local col number of off-diag col */
298c386bf4SBarry Smith   int           *garray;                /* work array */
308c386bf4SBarry Smith 
318c386bf4SBarry Smith   /* The following variables are used for matrix-vector products */
328c386bf4SBarry Smith 
338c386bf4SBarry Smith   Vec           lvec;              /* local vector */
348c386bf4SBarry Smith   VecScatter    Mvctx;             /* scatter context for vector */
354096ce27SBarry Smith   int           roworiented;       /* if true, row-oriented input, default true */
36*3369ce9aSBarry Smith 
37*3369ce9aSBarry Smith   /* The following variables are for MatGetRow() */
38*3369ce9aSBarry Smith 
39*3369ce9aSBarry Smith   int           *rowindices;       /* column indices for row */
40*3369ce9aSBarry Smith   Scalar        *rowvalues;        /* nonzero values in row */
41*3369ce9aSBarry Smith   PetscTruth    getrowactive;      /* indicates MatGetRow(), not restored */
42180e1086SBarry Smith } Mat_MPIAIJ;
43*3369ce9aSBarry Smith 
44*3369ce9aSBarry Smith #endif
45