Elementsnodes(Nel,10)
Elementsnodes(Nel,10) are corresponding to gmsh's element information. Typically, the node's information in gmsh file are in 6-9 point. So if we want to get the four nodes of the tetrahedron elements, we need to do following:
do j=1,totalelements
node1=elementsnodes(j,6)
node2=elementsnodes(j,7)
node3=elementsnodes(j,8)
node4=elementsnodes(j,9)
end do