:orphan: # MatCheckCompressedRow Determines whether the compressed row matrix format should be used. Compressed row format provides high performance routines by taking advantage of zero rows. ## Synopsis ``` #include "petscmat.h" PETSC_EXTERN PetscErrorCode MatCheckCompressedRow(Mat A, PetscInt nrows, Mat_CompressedRow *compressedrow, PetscInt *ai, PetscInt mbs, PetscReal ratio) ``` Collective ## Input Parameters - ***A -*** the matrix - ***nrows -*** number of rows with nonzero entries - ***compressedrow -*** pointer to the struct Mat_CompressedRow - ***ai -*** row pointer used by `MATSEQAIJ` and `MATSEQBAIJ` - ***mbs -*** number of (block) rows represented by `ai` - ***ratio -*** ratio of (num of zero rows)/m, used to determine if the compressed row format should be used ## Note Supported types are `MATAIJ`, `MATBAIJ` and `MATSBAIJ`. ## Developer Note The reason this takes the `compressedrow`, `ai` and `mbs` arguments is because it is called by both the `MATSEQAIJ` and `MATSEQBAIJ` matrices and the values are not therefore obtained by directly taking the values from the matrix object. This is not a general public routine and hence is not listed in petscmat.h (it exposes a private data structure) but it is used by some preconditioners and hence is labeled as `PETSC_EXTERN` ## See Also `Mat`, `MATAIJ`, `MATBAIJ`, `MATSBAIJ`. ## Level developer ## Location src/mat/utils/compressedrow.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/utils/compressedrow.c) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)