xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision 4e278199b78715991f5c71ebbd945c1489263e6c)
1 
2 #if !defined(__ADJ_H)
3 #define __ADJ_H
4 #include <petsc/private/matimpl.h>
5 
6 /*
7   MATMPIAdj format - Compressed row storage for storing adjacency lists, and possibly weights
8                      This is for grid reorderings (to reduce bandwidth)
9                      grid partitionings, etc. This is NOT currently a dynamic data-structure.
10 
11 */
12 
13 typedef struct {
14   PetscInt  nz;
15   PetscInt  *diag;                   /* pointers to diagonal elements, if they exist */
16   PetscInt  *i;                      /* pointer to beginning of each row */
17   PetscInt  *j;                      /* column values: j + i[k] is start of row k */
18   PetscInt  *values;                 /* numerical values */
19   PetscBool useedgeweights;          /* if edge weights are used  */
20   PetscBool symmetric;               /* user indicates the nonzero structure is symmetric */
21   PetscBool freeaij;                 /* free a, i,j at destroy */
22   PetscBool freeaijwithfree;         /* use free() to free i,j instead of PetscFree() */
23   PetscScalar *rowvalues;            /* scalar work space for MatGetRow() */
24   PetscInt    rowvalues_alloc;
25 } Mat_MPIAdj;
26 
27 #endif
28