xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision a58c3bc3391eee32bc3fd94ac7edeea38fe57aae)
1 
2 #if !defined(__ADJ_H)
3 #define __ADJ_H
4 #include "include/private/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         nz;
16   PetscInt         *diag;            /* pointers to diagonal elements, if they exist */
17   PetscInt         *i;               /* pointer to beginning of each row */
18   PetscInt         *j;               /* column values: j + i[k] - 1 is start of row k */
19   PetscInt         *values;          /* numerical values */
20   PetscTruth       symmetric;        /* user indicates the nonzero structure is symmetric */
21   PetscTruth       freeaij;          /* call PetscFree() on a, i,j at destroy */
22 } Mat_MPIAdj;
23 
24 #endif
25