# MatPermuteSparsify

Creates a new matrix with rows and columns permuted from the original and sparsified to the prescribed tolerance.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatPermuteSparsify(Mat A, PetscInt band, PetscReal frac, PetscReal tol, IS rowp, IS colp, Mat *B)

Collective on Mat

### Input Parameters

| A | - The matrix to permute
| band | - The half-bandwidth of the sparsified matrix, or PETSC_DECIDE
| frac | - The half-bandwidth as a fraction of the total size, or 0.0
| tol | - The drop tolerance
| rowp | - The row permutation
| colp | - The column permutation

### Output Parameter

B -The permuted, sparsified matrix

### Note

The default behavior (band = PETSC_DECIDE and frac = 0.0) is to restrict the half-bandwidth of the resulting matrix to 5% of the total matrix size.

### Keywords

matrix, permute, sparsify

### See Also

MatGetOrdering(), MatPermute()

Level:advanced
Location: src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages