UFC numbering convention in parallel
It appears that vertex numbering convention (according to FENICS book, p 296, bottom) is no longer valid with the dev version. A tuple of increasing local vertex numbers does no longer result in a tuple of increasing global vertex numbers.
A minimal code to reproduce the bug (to be run in parallel with 2 procs) is attached.
Cell number 0 for process 0 obeys the convention (local vertices 0,1,2 mapped to global vertices 0,1,4), but cell number 1 doesn't (0,3,2 mapped to 0,3,4).
Comments (8)
-
-
The UFC numbering convention allows cells to agree on a common orientation of edges/faces. FFC relies on this in the code generation for H(div)/H(curl) elements.
-
@meg It would be nice to encode this information differently. I presume the present ordering must be based on global indices to get the dofs right on process boundaries. However, using process-wise indices would give better memory traversal. Does the current reliance on ordering generalise to quads/hexes?
-
It is of course also used for higher order Lagrange elements to agree on dofs on common facets. In ancient FFC, this was handled by encoding a (large) number of permutations instead.
The current ordering does not immediately generalise to quads/hexes; this is a known and open issue (as of now).
-
Also, is this change in numbering a recent change?
-
- changed status to invalid
UFC refers to cell-wise local indices, not process-wise. The example code show that the global indices are increasing.
-
@garth-wells so the cell-wise vertex indices are still sorted by global index?
I.e. with the numbers from the top post here, the cell-local indices 0,1,2 correspond to process-wise indices 0,3,2 which corresponds to the global indices 0,3,4 which are sorted. So I agree this looks correct.
-
@martinal Yes, sorting is by global vertex index. This has always been the case.
- Log in to comment
I don't know why UFC claims/enforces this convention. Doesn't seem sensible to me, and it's ambiguous in parallel where a vertex has a local (process-wise) and global (user specificed) index.