xref: /petsc/src/mat/impls/adj/mpi/mpiadj.h (revision b97cf49b8d97305ad9adb42ff93e7a781049f527)
1*b97cf49bSBarry Smith /* $Id: adj.h,v 1.2 1997/07/02 22:25:57 bsmith Exp $ */
2*b97cf49bSBarry Smith 
3*b97cf49bSBarry Smith #include "src/mat/matimpl.h"
4*b97cf49bSBarry Smith #include <math.h>
5*b97cf49bSBarry Smith 
6*b97cf49bSBarry Smith #if !defined(__ADJ_H)
7*b97cf49bSBarry Smith #define __ADJ_H
8*b97cf49bSBarry Smith 
9*b97cf49bSBarry Smith /*
10*b97cf49bSBarry Smith   MATSEQADJ format - Compressed row storage for storing adjacency lists, but no
11*b97cf49bSBarry Smith                      matrix values. This is for grid reorderings (to reduce bandwidth)
12*b97cf49bSBarry Smith                      grid partitionings, etc. This is NOT currently a dynamic data-structure.
13*b97cf49bSBarry Smith 
14*b97cf49bSBarry Smith */
15*b97cf49bSBarry Smith 
16*b97cf49bSBarry Smith typedef struct {
17*b97cf49bSBarry Smith   int              m, n;             /* rows, columns */
18*b97cf49bSBarry Smith   int              nz;
19*b97cf49bSBarry Smith   int              *diag;            /* pointers to diagonal elements */
20*b97cf49bSBarry Smith   int              *i;               /* pointer to beginning of each row */
21*b97cf49bSBarry Smith   int              *j;               /* column values: j + i[k] - 1 is start of row k */
22*b97cf49bSBarry Smith   PetscTruth       symmetric;        /* user indicates the nonzero structure is symmetric */
23*b97cf49bSBarry Smith } Mat_SeqAdj;
24*b97cf49bSBarry Smith 
25*b97cf49bSBarry Smith #endif
26