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