[Gmsh] Triangles in .msh file

Gmsh User amrit_pou at hotmail.com
Sun May 1 19:52:42 CEST 2011


Hello everyone,
I had one quick question regarding the output in .msh file. I see that .msh file
contains nodal numbers and nodal coordinates of different types of elements. For
instance, if you mesh a cube with tetrahedrons, you will obtain nodal numbers
and coordinates for following types of elements: points, lines, triangles and
tetrahedrons.
Here is my question: Are the output triangles in .msh file ONLY surface
triangles of the mesh, or are those ALL possible triangles (including the
interior triangles that form the faces of an interior tetrahedron) in the mesh? 
The reason I am asking this question is because I also need surface triangles
along with tetrahedrons in my calculation to implement boundary conditions, and
it is really helpful if I am getting all the surface triangles(only surface
triangles) along with tetrahedrons right off the bat in .msh file. 
But what really confuses me is the fact that surface triangles (assuming
triangles in .msh files are indeed the surface triangles only) obtained from
Gmsh are NOT the same as surface triangles obtained by running a MATLAB program
called surftri.m, which is included in distmesh package (developed by Per-Olof
Persson and Gilbert Strang), on tetrahedron meshes obtained from Gmsh. surftri.m
uses very simple algorithm (faces of tetrahedrons that do not repeat are surface
triangles) to determine surface triangles from a mesh of tetrahedrons.


Does anyone of you who share a similar experience but have managed to fix this
problem be willing to share what exactly is going on with this problem? I'd
appreciate it.
Thanks in advance!