Hello,
I think there is no official rule concerning the ordering of dof.
Nevertheless you can get it a posteriori.
In the FreeFem documentation
p.116-120 you can find ways to get the mesh info,
like Th[k][i]
to get the vertex number (for i=0,1,2) in triangle k
and Th[k][i].x Th[k][i].y
its coordinates
It induces a first vertex (i=0) associated to triangle k,
a second vertex (i=1) and a third vertex (i=2).
For your fespace XhxXhxMh(Th,[P1,P1,P0])
corresponding to x,y components of velocity in P1, pressure in P0
you have the command XhxXhxMh(k,i)
for k the triangle number, i=0,1…6
it gives the 7 dof numbers around the triangle k. They are listed as
x component of velocity for first vertex
x component of velocity for second vertex
x component of velocity for third vertex
y component of velocity for first vertex
y component of velocity for second vertex
y component of velocity for third vertex
pressure component for the triangle
For example, to show these values you can write
for (int k=0;k<Th.nt;k++){//loop on triangles
for (int i=0;i<7;i++){//loop on dof around triangle
int dof=XhxXhxMh(k,i);
cout << "k="<< k << " i=" << i << " dof=" << dof << endl;
}
}
With this you have the needed information. Then you should be able to reorder the indices as you wish…