xref: /petsc/src/mat/impls/aij/seq/crl/crl.h (revision 7c4f633dc6bb6149cca88d301ead35a99e103cbb)
1805d1734SBarry Smith 
2*7c4f633dSBarry Smith #include "../src/mat/impls/aij/seq/aij.h"
3805d1734SBarry Smith 
4805d1734SBarry Smith typedef struct {
5805d1734SBarry Smith   PetscInt    nz;
6805d1734SBarry Smith   PetscInt    m;        /* number of rows */
7805d1734SBarry Smith   PetscInt    rmax;     /* maximum number of columns in a row */
8805d1734SBarry Smith   PetscInt    ncols;    /* number of columns in each row */
9805d1734SBarry Smith   PetscInt    *icols;   /* columns of nonzeros, stored one column at a time */
10805d1734SBarry Smith   PetscScalar *acols;   /* values of nonzeros, stored as icols */
11805d1734SBarry Smith 
12805d1734SBarry Smith   /* We need to keep a pointer to MatAssemblyEnd_AIJ because we
13805d1734SBarry Smith    * actually want to call this function from within the
14805d1734SBarry Smith    * MatAssemblyEnd_CRL function.  Similarly, we also need
15805d1734SBarry Smith    * MatDestroy_AIJ and MatDuplicate_AIJ. */
16805d1734SBarry Smith   PetscErrorCode (*AssemblyEnd)(Mat,MatAssemblyType);
17805d1734SBarry Smith   PetscErrorCode (*MatDestroy)(Mat);
18805d1734SBarry Smith   PetscErrorCode (*MatDuplicate)(Mat,MatDuplicateOption,Mat*);
19805d1734SBarry Smith 
20805d1734SBarry Smith   /* these are only needed for the parallel case */
21805d1734SBarry Smith   Vec         xwork,fwork;
22805d1734SBarry Smith   VecScatter  xscat;  /* gathers the locally needed part of global vector */
239222b4acSBarry Smith   PetscScalar *array; /* array used to create xwork */
24805d1734SBarry Smith } Mat_CRL;
25