[Gmsh] gmsh and FreeFem
Geordie McBain
gdmcbain at freeshell.org
Fri May 21 02:26:24 CEST 2010
2010/5/20 marco restelli <mrestelli at gmail.com>:
> Hi all,
> I would be interested in working with gmsh and FreeFem++
> (http://www.freefem.org/ff++/), using FreeFem for the finite element
> computations and gmsh for data visualization and postprocessing. Does
> anybody have suggestions about the most effective way to get data from
> FreeFem into gmsh?
I note your previous post about VTK; FreeFem++ can output VTK, but
then Gmsh only reads the mesh, not the data.
I use Gmsh a lot for FreeFem++ pre- and postprocessing. The way I get
the data from FreeFem++ into Gmsh is to write an ASCII .msh file,
following the format description at
http://geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-ASCII-file-format
using some FreeFem++ macros I've written, exploiting the techniques
from Section 5.1.4 `Mesh connectivity' of the FreeFem++ manual. I
attach a modification of FreeFem++ example 3.1 which uses the macros
in writemsh.edp to write the result file membrane.msh for Gmsh.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: membrane.edp
Type: application/octet-stream
Size: 815 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100521/a932411e/attachment.edp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writemsh.edp
Type: application/octet-stream
Size: 3295 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100521/a932411e/attachment-0001.edp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: membrane.msh
Type: model/mesh
Size: 394518 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100521/a932411e/attachment.msh>