xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision da33ede1553502984e650134bd16e8383e3e4e5b)
173f4d377SMatthew Knepley /* $Id: mpiadj.h,v 1.8 2000/10/11 17:49:33 bsmith Exp $ */
2b97cf49bSBarry Smith 
33eda8832SBarry Smith #if !defined(__ADJ_H)
43eda8832SBarry Smith #define __ADJ_H
5*da33ede1SBarry Smith #include "src/mat/matimpl.h"
6*da33ede1SBarry Smith 
7b97cf49bSBarry Smith 
8b97cf49bSBarry Smith /*
93eda8832SBarry Smith   MATMPIAdj format - Compressed row storage for storing adjacency lists, and possibly weights
10329f5518SBarry Smith                      This is for grid reorderings (to reduce bandwidth)
11b97cf49bSBarry Smith                      grid partitionings, etc. This is NOT currently a dynamic data-structure.
12b97cf49bSBarry Smith 
13b97cf49bSBarry Smith */
14b97cf49bSBarry Smith 
15b97cf49bSBarry Smith typedef struct {
160752156aSBarry Smith   int              *rowners;         /* ranges owned by each processor */
170752156aSBarry Smith   int              rstart,rend;     /* start and end of local rows */
18b97cf49bSBarry Smith   int              nz;
190752156aSBarry Smith   int              *diag;            /* pointers to diagonal elements, if they exist */
20b97cf49bSBarry Smith   int              *i;               /* pointer to beginning of each row */
21b97cf49bSBarry Smith   int              *j;               /* column values: j + i[k] - 1 is start of row k */
224c49b128SBarry Smith   int              *values;          /* numerical values */
23b97cf49bSBarry Smith   PetscTruth       symmetric;        /* user indicates the nonzero structure is symmetric */
24a2e34c3dSBarry Smith   PetscTruth       freeaij;          /* call PetscFree() on a, i,j at destroy */
253eda8832SBarry Smith } Mat_MPIAdj;
26b97cf49bSBarry Smith 
27b97cf49bSBarry Smith #endif
28