Actual source code: aij.h

     4:  #include src/mat/impls/csr/inode/inode.h
      5: /*
      6:   MATSEQAIJ format - Compressed row storage (also called Yale sparse matrix
      7:   format).  The i[] and j[] arrays start at 0. For example,
      8:   j[i[k]+p] is the pth column in row k.  Note that the diagonal
      9:   matrix elements are stored with the rest of the nonzeros (not separately).
     10: */

     12: typedef struct {
     13:   MAT_INODE_HEADER;
     14:   PetscTruth       sorted;           /* if true, rows are sorted by increasing columns */
     15:   PetscTruth       roworiented;      /* if true, row-oriented input, default */
     16:   PetscInt         nonew;            /* 1 don't add new nonzeros, -1 generate error on new */
     17:   PetscTruth       singlemalloc;     /* if true a, i, and j have been obtained with
     18:                                           one big malloc */
     19:   PetscTruth       freedata;         /* free the i,j,a data when the matrix is destroyed; true by default */
     20:   PetscInt         maxnz;            /* allocated nonzeros */
     21:   PetscInt         *imax;            /* maximum space allocated for each row */
     22:   PetscInt         *ilen;            /* actual length of each row */
     23:   PetscInt         reallocs;         /* number of mallocs done during MatSetValues()
     24:                                         as more values are set than were prealloced */
     25:   PetscInt         rmax;             /* max nonzeros in any row */
     26:   PetscScalar      *saved_values;    /* location for stashing nonzero values of matrix */
     27:   PetscScalar      *idiag,*ssor;     /* inverse of diagonal entries; space for eisen */

     29:   PetscTruth       keepzeroedrows;   /* keeps matrix structure same in calls to MatZeroRows()*/
     30:   PetscTruth       ignorezeroentries;
     31:   ISColoring       coloring;         /* set with MatADSetColoring() used by MatADSetValues() */

     33:   PetscInt         *xtoy,*xtoyB;     /* map nonzero pattern of X into Y's, used by MatAXPY() */
     34:   Mat              XtoY;             /* used by MatAXPY() */
     35:   Mat_CompressedRow compressedrow;   /* use compressed row format */
     36: } Mat_SeqAIJ;

     39: EXTERN PetscErrorCode MatSeqAIJSetPreallocation_SeqAIJ(Mat,PetscInt,PetscInt*);
     41: EXTERN PetscErrorCode MatILUFactorSymbolic_SeqAIJ(Mat,IS,IS,MatFactorInfo*,Mat *);
     42: EXTERN PetscErrorCode MatICCFactorSymbolic_SeqAIJ(Mat,IS,MatFactorInfo*,Mat *);
     43: EXTERN PetscErrorCode MatCholeskyFactorSymbolic_SeqAIJ(Mat,IS,MatFactorInfo*,Mat*);
     44: EXTERN PetscErrorCode MatCholeskyFactorNumeric_SeqAIJ(Mat,MatFactorInfo*,Mat*);
     45: EXTERN PetscErrorCode MatDuplicate_SeqAIJ(Mat,MatDuplicateOption,Mat*);
     46: EXTERN PetscErrorCode MatMissingDiagonal_SeqAIJ(Mat);
     47: EXTERN PetscErrorCode MatMarkDiagonal_SeqAIJ(Mat);

     49: EXTERN PetscErrorCode MatMult_SeqAIJ(Mat A,Vec,Vec);
     50: EXTERN PetscErrorCode MatMultAdd_SeqAIJ(Mat A,Vec,Vec,Vec);
     51: EXTERN PetscErrorCode MatMultTranspose_SeqAIJ(Mat A,Vec,Vec);
     52: EXTERN PetscErrorCode MatMultTransposeAdd_SeqAIJ(Mat A,Vec,Vec,Vec);
     53: EXTERN PetscErrorCode MatRelax_SeqAIJ(Mat,Vec,PetscReal,MatSORType,PetscReal,PetscInt,PetscInt,Vec);

     55: EXTERN PetscErrorCode MatSetColoring_SeqAIJ(Mat,ISColoring);
     56: EXTERN PetscErrorCode MatSetValuesAdic_SeqAIJ(Mat,void*);
     57: EXTERN PetscErrorCode MatSetValuesAdifor_SeqAIJ(Mat,PetscInt,void*);

     59: EXTERN PetscErrorCode MatGetSymbolicTranspose_SeqAIJ(Mat,PetscInt *[],PetscInt *[]);
     60: EXTERN PetscErrorCode MatGetSymbolicTransposeReduced_SeqAIJ(Mat,PetscInt,PetscInt,PetscInt *[],PetscInt *[]);
     61: EXTERN PetscErrorCode MatRestoreSymbolicTranspose_SeqAIJ(Mat,PetscInt *[],PetscInt *[]);
     62: EXTERN PetscErrorCode MatToSymmetricIJ_SeqAIJ(PetscInt,PetscInt*,PetscInt*,PetscInt,PetscInt,PetscInt**,PetscInt**);
     63: EXTERN PetscErrorCode MatLUFactorSymbolic_SeqAIJ(Mat,IS,IS,MatFactorInfo*,Mat*);
     64: EXTERN PetscErrorCode MatLUFactorNumeric_SeqAIJ(Mat,MatFactorInfo*,Mat*);
     65: EXTERN PetscErrorCode MatLUFactor_SeqAIJ(Mat,IS,IS,MatFactorInfo*);
     66: EXTERN PetscErrorCode MatSolve_SeqAIJ(Mat,Vec,Vec);
     67: EXTERN PetscErrorCode MatSolveAdd_SeqAIJ(Mat,Vec,Vec,Vec);
     68: EXTERN PetscErrorCode MatSolveTranspose_SeqAIJ(Mat,Vec,Vec);
     69: EXTERN PetscErrorCode MatSolveTransposeAdd_SeqAIJ(Mat,Vec,Vec,Vec);
     70: EXTERN PetscErrorCode MatEqual_SeqAIJ(Mat A,Mat B,PetscTruth* flg);
     71: EXTERN PetscErrorCode MatFDColoringCreate_SeqAIJ(Mat,ISColoring,MatFDColoring);
     72: EXTERN PetscErrorCode MatILUDTFactor_SeqAIJ(Mat,IS,IS,MatFactorInfo*,Mat*);
     73: EXTERN PetscErrorCode MatLoad_SeqAIJ(PetscViewer, MatType,Mat*);
     74: EXTERN PetscErrorCode RegisterApplyPtAPRoutines_Private(Mat);
     75: EXTERN PetscErrorCode MatMatMult_SeqAIJ_SeqAIJ(Mat,Mat,MatReuse,PetscReal,Mat*);
     76: EXTERN PetscErrorCode MatMatMultSymbolic_SeqAIJ_SeqAIJ(Mat,Mat,PetscReal,Mat*);
     77: EXTERN PetscErrorCode MatMatMultNumeric_SeqAIJ_SeqAIJ(Mat,Mat,Mat);
     78: EXTERN PetscErrorCode MatPtAPSymbolic_SeqAIJ(Mat,Mat,PetscReal,Mat*);
     79: EXTERN PetscErrorCode MatPtAPNumeric_SeqAIJ(Mat,Mat,Mat);
     80: EXTERN PetscErrorCode MatPtAPSymbolic_SeqAIJ_SeqAIJ(Mat,Mat,PetscReal,Mat*);
     81: EXTERN PetscErrorCode MatPtAPNumeric_SeqAIJ_SeqAIJ(Mat,Mat,Mat);
     82: EXTERN PetscErrorCode MatMatMultTranspose_SeqAIJ_SeqAIJ(Mat,Mat,MatReuse,PetscReal,Mat*);
     83: EXTERN PetscErrorCode MatMatMultTransposeSymbolic_SeqAIJ_SeqAIJ(Mat,Mat,PetscReal,Mat*);
     84: EXTERN PetscErrorCode MatMatMultTransposeNumeric_SeqAIJ_SeqAIJ(Mat,Mat,Mat);
     85: EXTERN PetscErrorCode MatSetValues_SeqAIJ(Mat,PetscInt,const PetscInt[],PetscInt,const PetscInt[],const PetscScalar[],InsertMode);
     86: EXTERN PetscErrorCode MatGetRow_SeqAIJ(Mat,PetscInt,PetscInt*,PetscInt**,PetscScalar**);
     87: EXTERN PetscErrorCode MatRestoreRow_SeqAIJ(Mat,PetscInt,PetscInt*,PetscInt**,PetscScalar**);
     88: EXTERN PetscErrorCode MatPrintHelp_SeqAIJ(Mat);
     89: EXTERN PetscErrorCode MatAXPY_SeqAIJ(Mat,PetscScalar,Mat,MatStructure);

     92: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatConvert_SeqAIJ_SeqSBAIJ(Mat, MatType,MatReuse,Mat*);
     93: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatConvert_SeqAIJ_SeqBAIJ(Mat, MatType,MatReuse,Mat*);
     94: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatReorderForNonzeroDiagonal_SeqAIJ(Mat,PetscReal,IS,IS);

     97: #endif