[petsc-users] Reordering rows of parallel matrix across processors
Cyrill Vonplanta
cyrill.von.planta at usi.ch
Thu Jul 7 03:37:26 CDT 2016
Dear all,
I would like to reorder the rows of a matrix across processors. Is this possible with MatPermute(…)?
To illustrate here is how an index set would look like for a matrix with M=35 on 2 CPU’s. Amongst other things I intend to swap the first and last row here.
[0] Number of indices in set 24
[0] 0 34
[0] 1 1
[0] 2 2
[0] 3 3
[0] 4 4
[0] 5 5
[0] 6 6
[0] 7 7
[0] 8 15
[0] 9 16
[0] 10 11
[0] 11 8
[0] 12 10
[0] 13 21
[0] 14 9
[0] 15 12
[0] 16 13
[0] 17 14
[0] 18 17
[0] 19 18
[0] 20 19
[0] 21 20
[0] 22 22
[0] 23 23
[1] Number of indices in set 11
[1] 0 24
[1] 1 25
[1] 2 26
[1] 3 27
[1] 4 28
[1] 5 29
[1] 6 30
[1] 7 31
[1] 8 32
[1] 9 33
[1] 10 0
Instead of exchanging the first and last row it seems to replace them with zeros only.
If this can’t be done with MatPermute how could it be done?
Thanks
Cyrill
More information about the petsc-users
mailing list