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