← Back to team overview

dolfin team mailing list archive

Re: Mesh generators

 

On Fri, Mar 24, 2006 at 07:17:28PM +0100, Jensen, Stian wrote:

> Hello,
> 
> I have downloaded and installed DOLFIN, FFC and FIAT and it looks very impressive.
> 
> I have tried to run the mesh generator Gmesh. However, in contrast to how I understand the information on the web site (http://www.fenics.org/) the Python conversion script following DOLFIN does not seem to be able to convert meshes (with suffix .msh) from Gmsh to the DOLFIN file format with suffix .xml. Is it any remedy for this problem?
> 
> My question is then: Do you have any mesh generators to recommend? 
> 
> best regards,
> Stian
> 
> ----------------------------------------
> Stian Jensen
> PhD kandidat
> NTNU
> Institutt for energi- og prosessteknikk
> Telefon: 73593755
> Mobil: 92859178
> E-post: stian.jensen@xxxxxxx

The dolfin-convert script does support gmsh, but there may be a couple
of minor issues that we should be able to fix. I didn't implement the
gmsh conversion myself, so I'll post some questions here for further
discussion. (Garth did the gmsh conversion.)

1. When I run gmsh, the default suffix for the files it generates
seems to be .msh, rather than .gmsh. Should we change to .msh?

2. When I generate a mesh with gmsh, for example from the demo example
cube.geo, I get errors when I convert it with dolfin-convert (after
having renamed the mesh file to cube.gmsh from cube.msh):

Traceback (most recent call last):
  File "./dolfin-convert", line 364, in ?
    main(sys.argv[1:])
  File "./dolfin-convert", line 52, in main
    gmsh2xml(ifilename, ofilename)
  File "./dolfin-convert", line 282, in gmsh2xml
    n1 = nodelist[int(element[6])]
IndexError: list index out of range

The problem seems to be that the file contains both the surface mesh
and the volume mesh. Right after $NOD, the number of vertices is
claimed to be 94, but these are only the surface nodes, so when
dolfin-convert starts reading the vertices for the volume mesh it runs
in to trouble.

/Anders



Follow ups