I've asked this question on Computational Science SE too.
Consider the following triangulation of a rectangle $(0,a)\times(0,b)$:
We have two types of triangles:
I enumerate the rectangles(consisting of two triangles) starting at the bottom left corner from left to right and bottom to top. The triangles are enumerated in the following way: Each triangle of type A has the same index as its corresponding cell and each index of a triangle of type B is the sum of the index of its corresponding cell "$+$ the total number of cells".
For example, in the triangulation depicted above, the cell at the bottom left corner has index $1$ and the contained triangles of type A and B have the index 1 and 17, respectively.
The local numbering of the vertices is shown the second figure. Starting from the bottom left corner, from left to right and bottom to top, I build the global indexing of the vertices. For example, in the triangulation depicted above, the vertex at the bottom left corner has index $1$, its horizontal neighbor has index $2$ and its vertical neighbor has index $6$.
This indexing is suitable if each triangle is considered to be a linear Lagrange element (evaluation at the vertices). How do I need to modify my indexing, if I want to use quadratic Lagrange elements instead (evaluation at the vertices plus evaluation at the midpoints of the edges)?
I would like to use the following local numbering for the vertices:
It's not clear to me how I should build the global numbering of the additional nodes (i.e. the midpoints of the edges). I'm not sure, but I could imagine that the choice of the numbering influences the linear system of equations in a crucial way (I've read, for example, that a tuple of increasing local vertex numbers should correspond to a tuple of global vertex numbers).


