petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatPermute

Creates a new matrix with rows and columns permuted from the original.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatPermute(Mat mat,IS row,IS col,Mat *B)

Collective on Mat Many br

### Input Parameters

| mat | - the matrix to permute Many br
| row | - row permutation, each processor supplies only the permutation for its rows Many br
| col | - column permutation, each processor supplies only the permutation for its columns Many br

### Output Parameters

B -the permuted matrix Many br

Many br

### Note

The index sets map from row/col of permuted matrix to row/col of original matrix. Many brThe index sets should be on the same communicator as Mat and have the same local sizes. Many br

### See Also

MatGetOrdering(), ISAllGather()

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

### Examples

src/ksp/ksp/examples/tutorials/ex18.c.html