xref: /petsc/src/mat/impls/aij/seq/crl/crl.h (revision 805d1734ef8e45400e84c22a34f7f43936952371)
1*805d1734SBarry Smith 
2*805d1734SBarry Smith #include "src/mat/impls/aij/seq/aij.h"
3*805d1734SBarry Smith 
4*805d1734SBarry Smith typedef struct {
5*805d1734SBarry Smith   PetscInt    nz;
6*805d1734SBarry Smith   PetscInt    m;        /* number of rows */
7*805d1734SBarry Smith   PetscInt    rmax;     /* maximum number of columns in a row */
8*805d1734SBarry Smith   PetscInt    ncols;    /* number of columns in each row */
9*805d1734SBarry Smith   PetscInt    *icols;   /* columns of nonzeros, stored one column at a time */
10*805d1734SBarry Smith   PetscScalar *acols;   /* values of nonzeros, stored as icols */
11*805d1734SBarry Smith 
12*805d1734SBarry Smith   /* We need to keep a pointer to MatAssemblyEnd_AIJ because we
13*805d1734SBarry Smith    * actually want to call this function from within the
14*805d1734SBarry Smith    * MatAssemblyEnd_CRL function.  Similarly, we also need
15*805d1734SBarry Smith    * MatDestroy_AIJ and MatDuplicate_AIJ. */
16*805d1734SBarry Smith   PetscErrorCode (*AssemblyEnd)(Mat,MatAssemblyType);
17*805d1734SBarry Smith   PetscErrorCode (*MatDestroy)(Mat);
18*805d1734SBarry Smith   PetscErrorCode (*MatDuplicate)(Mat,MatDuplicateOption,Mat*);
19*805d1734SBarry Smith 
20*805d1734SBarry Smith   /* these are only needed for the parallel case */
21*805d1734SBarry Smith   Vec        xwork,fwork;
22*805d1734SBarry Smith   VecScatter xscat;  /* gathers the locally needed part of global vector */
23*805d1734SBarry Smith } Mat_CRL;
24