[petsc-users] MatCreateMPIAdj and mat/examples/tutorials/ex11.c

Torquil Macdonald Sørensen torquil at gmail.com
Fri Mar 21 10:51:11 CDT 2014


Hi!

In the documentation of MatCreateMPIAdj it says that the fifth argument
"j" should be "sorted for each row":

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateMPIAdj.html

The same page links to an example:

http://www.mcs.anl.gov/petsc/petsc-current/src/mat/examples/tutorials/ex11.c.html

but in that example the entries in "jj", on lines 40 and 42, do not seem
to be "sorted for each row".

On rank 0, the column indices are 0, 1 and 2, which are sorted. But the
second row correspond to the column indices 1, 3, 2, which are not given
in increasing order. The same goes for the indices given in jj for rank
1 on line 42, corresponding to the second row on rank 1.

Doesn't that conflict with the documentation?

Best regards
Torquil Sørensen



More information about the petsc-users mailing list