Dear Anna, On 16/12/15 15:17, Anna Kalogirou wrote:
Dear all,
I need to import my own mesh which was not created using Gmsh, so I am trying to convert it to Gmsh format. I have some questions and I didn't find any documentation on this on the Gmsh website.
Before you try and do this conversion, where does the mesh come from? PETSc (and therefore we) claim to support the following formats read from file: - gmsh (extension .msh) - exodus (extension .e or .exo) - cgns (extension .cgns) Although boundary markers aren't supported - triangle (extension .node) We also, although it's not a public API, support building a mesh from a list of cells and their vertex coordinates. Would any of these suit you?
For example, in the sample msh file attached there should be 40 elements and not 72. I don't understand what the first 32 lines (i.e. lines 64-95 in the file) under "Elements" actually are. Also, in the actual elements (lines 96-135), what is the first quadruplet {3 2 0 5} after the global element number?
The documentation for the gmsh file format is http://www.geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-ASCII-file-format Note that not all "elements" in the file are what you think of as elements, some of them will be lines and points I think. Lawrence