[Gmsh] freefemm++

Geordie McBain gdmcbain at freeshell.org
Thu Jun 25 06:00:53 CEST 2009


On Sat, Jun 7, 2008 at 1:05 AM, David Colignon<David.Colignon at ulg.ac.be> wrote:
> Hi,
>
> if freefem++ can read the medit mesh format, then the latest Gmsh version 2.2 is able to export a mesh in this medit format.

Yes, but I found I had to reorder the listing of vertices for each
tetrahedron in the output MEDIT .mesh file or FreeFem++ (v. 3.3-3)
thinks the volumes are negative (and other finite element operations
nonsensical).  I did this in Gawk (an action like { print $1, $3, $2,
$4, $5 } on the lines following the one matching "Tetrahedra").  Did
others have this problem?
 Should the writeMESH function be modified?  I think it'd be only a
couple of local lines of code, which I could supply.  I couldn't see a
specification for the convention on vertex-numbering in the MEDIT
.mesh format (Frey's INRIA technical report
http://www.ann.jussieu.fr/~frey/publications/RT-0253.pdf).  Is it only
FreeFem++'s
interpretation of the MEDIT .mesh format that is idiosyncratic?
  I think there are only two essentially different ways to number the
four vertices in a tetrahedron, just as there are only two for a
three-node triangle in a plane.  For the triangle, it's clockwise or
counterclockwise looking down on the plane, and for the tetrahedron
similarly for the triangle defined by the first three vertices,
looking from the fourth vertex.  The Gmsh .msh file format description
in Gmsh ch. 9 does seem to imply one of these two choices rather than
the other for four-node tetrahedra.
 I'm using Gmsh 2.3.1 on openSUSE 10.2 and Gmsh 2.2.5 as
packaged for Ubuntu Hardy.
 (I realize this is a very old post to reply to; should I have
started a new thread?)

Geordie McBain
http://gdmcbain.freeshell.org