petsc-master 2014-12-20
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

Input Parameters

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

Output Parameters

B -the permuted matrix

Note

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

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