[Gmsh] freefem
Geordie McBain
gdmcbain at freeshell.org
Wed Jun 16 01:57:33 CEST 2010
2010/6/16 Luis Casillas <casillasluis at lanl.gov>:
> Hi,
> I have tried with the MEDIT format,
> I did it for 3D and no problem, but I need the 2D case,
> I have gmsh 2.4.2 for mac,
> I do,
> gmsh -3 -format mesh -string 'Mesh.SaveElementTagType=2;' file.geo
> then I run the 3to2.awk (thanks for the code)
> import to freefem with readmesh, but no luck
> thanks
> Luis
Oh. I think the dimension flag should be -2 rather than -3 for plane
problems, although if there aren't any volumes in your geometry that
shouldn't matter.
Anyway, try the following example; FreeFem++ seems happy enough with
it. Besides the three input files (oblong.geo for Gmsh, 3to2.awk for
Gawk, and oblong.edp for FreeFem++), I also attach a picture of the
mesh as plotted by FreeFem++.
gmsh -2 -format mesh -string 'Mesh.SaveElementTagType=2;' -o
oblong.3.mesh oblong.geo
gawk -f 3to2.awk oblong.3.mesh > oblong.mesh
FreeFem++-nw oblong.edp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oblong.geo
Type: application/octet-stream
Size: 278 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100616/2c0191b9/attachment.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3to2.awk
Type: application/octet-stream
Size: 550 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100616/2c0191b9/attachment.awk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oblong.edp
Type: application/octet-stream
Size: 69 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100616/2c0191b9/attachment.edp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oblong.Th.png
Type: image/png
Size: 26408 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100616/2c0191b9/attachment.png>