[Getdp] getdp read mesh bug

Andre Antunes andre.antunes at tuebingen.mpg.de
Mon Apr 20 21:22:21 CEST 2015


Dear getdp community

I have implemented binary meshes using the documented method to write $Elements:

int header[3] = {elm_type, num_elm_follow, num_tags};
fwrite(header, sizeof(int), 3, file);


by using num_elm_follow equal to the number of triangles or tetrahedra, and then writing all element types in one go.
That works fine in gmsh, and is of great use to us.

But.. when using such a mesh in getdp, an error appears:

Info : Loading Geometric data 'binary.msh'
Info : Mesh is in binary format
Error: Premature end of file

I am using in the .pro file GmshRead (in Resolution - Operation) to read the mesh.

Looking at getdp's source, I tracked the error to Legacy/GeoData.cpp

Do you think there's something that could be done in this case?

Best regards, 
Andre