xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision b24ad0428a60bb3d8d9be05f5b432634d28bad96)
1b97cf49bSBarry Smith 
23eda8832SBarry Smith #if !defined(__ADJ_H)
33eda8832SBarry Smith #define __ADJ_H
4da33ede1SBarry Smith #include "src/mat/matimpl.h"
5da33ede1SBarry Smith 
6b97cf49bSBarry Smith 
7b97cf49bSBarry Smith /*
83eda8832SBarry Smith   MATMPIAdj format - Compressed row storage for storing adjacency lists, and possibly weights
9329f5518SBarry Smith                      This is for grid reorderings (to reduce bandwidth)
10b97cf49bSBarry Smith                      grid partitionings, etc. This is NOT currently a dynamic data-structure.
11b97cf49bSBarry Smith 
12b97cf49bSBarry Smith */
13b97cf49bSBarry Smith 
14b97cf49bSBarry Smith typedef struct {
15*b24ad042SBarry Smith   PetscInt         *rowners;         /* ranges owned by each processor */
16*b24ad042SBarry Smith   PetscInt         rstart,rend;      /* start and end of local rows */
17*b24ad042SBarry Smith   PetscInt         nz;
18*b24ad042SBarry Smith   PetscInt         *diag;            /* pointers to diagonal elements, if they exist */
19*b24ad042SBarry Smith   PetscInt         *i;               /* pointer to beginning of each row */
20*b24ad042SBarry Smith   PetscInt         *j;               /* column values: j + i[k] - 1 is start of row k */
21*b24ad042SBarry Smith   PetscInt         *values;          /* numerical values */
22b97cf49bSBarry Smith   PetscTruth       symmetric;        /* user indicates the nonzero structure is symmetric */
23a2e34c3dSBarry Smith   PetscTruth       freeaij;          /* call PetscFree() on a, i,j at destroy */
243eda8832SBarry Smith } Mat_MPIAdj;
25b97cf49bSBarry Smith 
26b97cf49bSBarry Smith #endif
27