[petsc-users] reorder a sparse matrix

Umut Tabak u.tabak at tudelft.nl
Mon Sep 27 11:38:12 CDT 2010


Dear all,

How can I reorder a sparse matrix in Petsc?

Sth like in a dirty MATLAB like pseudo-code:
A = diag([1 3 4 5]);
neworder = [2 4 1 3];
B = A(neworder, neworder)

I know I will destroy the sparsity pattern, but for my application there 
is no other way, the matrices should be reordered for some partitioning.

Best regards,
Umut


More information about the petsc-users mailing list