[petsc-dev] MatPermute definition

Matthew Knepley knepley at gmail.com
Sat Dec 20 12:49:07 CST 2014

On Sat, Dec 20, 2014 at 7:51 AM, Victor Magri @Sinmec <
victorapm at sinmec.ufsc.br> wrote:
> Hello!
> I'm using MatPermute function to create a permuted matrix from two given
> index sets. According to line 4711 of
> ${PETSC_DIR}/src/mat/interface/matrix.c they map from row/col of permuted
> matrix to row/col of the original one. So, the index sets are inverted
> before the act of permutation. Shouldn't it be better to call this function
> MatInvertPermute or something like this in oppose to MatPermute? Besides
> that, I think it would be good to define a new function which does not
> invert the index sets before permutation.

The old ordering routines of Alan George, which we wrap up in MatOrdering
give back

  p[new number] = old number

Thus this is what we use for input. We get the inverse, because for
parallelism, it makes
sense to have

  p[old number] = new number



> Thank you!

What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20141220/1624e3d2/attachment.html>

More information about the petsc-dev mailing list