[Gmsh] getMaxVertexNumber vs getNumMeshVertices

Agnese, Marco m.agnese13 at imperial.ac.uk
Thu May 8 17:25:29 CEST 2014


Hello,
I am using the API of gmsh and I do not understand the vertex numbering. I create a gmodel loading a .geo file and meshing it (3D domain, 3D mesh). 
I call indexMeshVertices(true,0,true) to obtain a continuous indexing of my mesh vertices. 
Now I expect that if I loop from 1 to getNumMeshVertices I would obtain all my pointer to MVertex but this is not always the case: sometimes it returns some nullptr. 
Instead If I loop until getMaxVertexNumber I obtain all the vertices and some nullptr. 
But if the indexing is continuos why I have some nullptr? Is there a way to have just a continuous indexing without nullptr?

Thank you very much,
cheers,
Marco.