On Tue, Feb 23, 2010 at 7:14 PM, <[email protected]> wrote: > Hi, > > I would like to use gmsh to perform simple 2D meshes. I use for the moment > the option -2 in command line, but the dimension in the resulting mesh file > is still 3. The solver code I use reads .mesh files but does not read the > 3rd coordinate Z. > Does anybody knows an option to specify that the 3rd coordinate must not be > written in the .mesh file ? I searched along the reference manual and > messages but did not find it out.
I came across this problem too, for the solver FreeFem++ before it acquired the ability to read Gmsh's .msh format. I thought about modifying Gmsh to output two-dimensional MEDIT .mesh files, but I read in the MEDIT documentation that that wasn't compliant, so I took the path recommended by D. L. and used a simple script to strip the spurious third coordinate; Sed would no doubt serve, but I used Gawk. I attach it in the hope you'll find it useful. Run as "gawk -f 3to2.awk yourmesh3.mesh > yourmesh2.mesh".
3to2.awk
Description: Binary data
_______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
