Sorting a vector

tog guillaume.alleon at
Tue Jun 16 05:38:10 CDT 2009

Hi there

This is a kind of newbie question :)
I have a vector which is the solution of my simulation, I want then to
extract the p indices corresponding to the p biggest values in my vector. Is
there a way to do this with PETSc ?
What if I want to sort my vector to get the indices in ascending order of
their values ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list