1b97cf49bSBarry Smith 23eda8832SBarry Smith #if !defined(__ADJ_H) 33eda8832SBarry Smith #define __ADJ_H 4*7c4f633dSBarry Smith #include "private/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 { 15b24ad042SBarry Smith PetscInt nz; 16b24ad042SBarry Smith PetscInt *diag; /* pointers to diagonal elements, if they exist */ 17b24ad042SBarry Smith PetscInt *i; /* pointer to beginning of each row */ 18b24ad042SBarry Smith PetscInt *j; /* column values: j + i[k] - 1 is start of row k */ 19b24ad042SBarry Smith PetscInt *values; /* numerical values */ 20b97cf49bSBarry Smith PetscTruth symmetric; /* user indicates the nonzero structure is symmetric */ 21a2e34c3dSBarry Smith PetscTruth freeaij; /* call PetscFree() on a, i,j at destroy */ 223eda8832SBarry Smith } Mat_MPIAdj; 23b97cf49bSBarry Smith 24b97cf49bSBarry Smith #endif 25