improve the construction of the mesh adjacency