Obtaining unexpected xadj and adjncy arrays when using MeshToNodal API for quad meshes
Jeff-Hadley opened this issue · comments
The xadj and adjncy nodal graph arrays obtained when using the MeshToNodal function contain nodes which are not part of the "root" node's adjacency list. For example, let's take the sample quad mesh/graph from METIS's documentation:
When using this mesh in the MeshToNodal API function with the eptr & eind arrays, and other inputs as follows:
eptr: 0 4 8 12 16 20 24 28 32
eind: 0 5 6 1 1 6 7 2 2 7 8 3 3 8 9 4 5 10 11 6 6 11 12 7 7 12 13 8 8 13 14 9
nn = 15
ne = 8
numflag = 0
The returned xadj and adjncy arrays are as follows:
xadj: 0 3 8 13 18 21 26 34 42 50 55 58 63 68 73 76
adjncy: 5 6 1, 0 5 6 7 2, 1 6 7 8 3, 2 7 8 9 4, 3 8 9, 0 6 1 10 11, 0 5 1 7 2 10 11 12, 1 6 2 8 3 11 12 13, 2 7 3 9 4 12 13 14, 3 8 4 13 14, 5 11 6, 5 10 6 12 7, 6 11 7 13 8, 7 12 8 14 9, 8 13 9
(I've included commas to help identify the "root" node lists)
The bolded values in the adjncy array are the nodes which should not be part of a nodes' adjacency list as I understand it's format.
I would expect the xadj and adjncy arrays to match the ones from the sample mesh/graph above, however it's including all nodes in the elements which the "root" node is a part of, and not only the nodes directly connected by a single edge.
Am I misunderstanding the purpose of the MeshToNodal function, or is there in fact an issue here?
Thank you,
Jeff Hadley