[petsc-users] Matrix Reordering

Barry Smith bsmith at mcs.anl.gov
Thu Sep 29 07:40:14 CDT 2011


On Sep 29, 2011, at 6:24 AM, behzad baghapour wrote:

> Dear all,
> 
> How can I use the result ( rperm and cperm ) of 
> 
> MatGetOrdering( Mat mat, const MatOrderingType type, IS *rperm, IS *cperm )
> 
> as an array of integers in order to permute my own Matrix?

   MatPermute() gives you a new matrix in the new ordering.

   But note that mostly these routines are used internally and automatically by the -pc_type lu direct solver.

   You can use ISGetIndices() to get back out of the IS the raw list of integers that you can use in any way you like,

   Barry

> 
> Thanks a lot,
> Behzad
> -- 
> ==================================
> Behzad Baghapour
> Ph.D. Candidate, Mechecanical Engineering
> University of Tehran, Tehran, Iran
> https://sites.google.com/site/behzadbaghapour
> Fax: 0098-21-88020741
> ==================================
> 



More information about the petsc-users mailing list