xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision 0752156a28ac8f8e9dfaef7ce98457a01bf27fb6)
1*0752156aSBarry Smith /* $Id: mpiadj.h,v 1.1 1997/09/23 20:11:19 bsmith Exp bsmith $ */
2b97cf49bSBarry Smith 
3b97cf49bSBarry Smith #include "src/mat/matimpl.h"
4b97cf49bSBarry Smith #include <math.h>
5b97cf49bSBarry Smith 
6b97cf49bSBarry Smith #if !defined(__ADJ_H)
7b97cf49bSBarry Smith #define __ADJ_H
8b97cf49bSBarry Smith 
9b97cf49bSBarry Smith /*
10*0752156aSBarry Smith   MATMPIADJ format - Compressed row storage for storing adjacency lists, but no
11b97cf49bSBarry Smith                      matrix values. This is for grid reorderings (to reduce bandwidth)
12b97cf49bSBarry Smith                      grid partitionings, etc. This is NOT currently a dynamic data-structure.
13b97cf49bSBarry Smith 
14b97cf49bSBarry Smith */
15b97cf49bSBarry Smith 
16b97cf49bSBarry Smith typedef struct {
17*0752156aSBarry Smith   int              *rowners;         /* ranges owned by each processor */
18*0752156aSBarry Smith   int              rstart, rend;     /* start and end of local rows */
19*0752156aSBarry Smith   int              m;                /* local rows */
20b97cf49bSBarry Smith   int              nz;
21*0752156aSBarry Smith   int              *diag;            /* pointers to diagonal elements, if they exist */
22b97cf49bSBarry Smith   int              *i;               /* pointer to beginning of each row */
23b97cf49bSBarry Smith   int              *j;               /* column values: j + i[k] - 1 is start of row k */
24b97cf49bSBarry Smith   PetscTruth       symmetric;        /* user indicates the nonzero structure is symmetric */
25*0752156aSBarry Smith } Mat_MPIAdj;
26b97cf49bSBarry Smith 
27b97cf49bSBarry Smith #endif
28