To see which mesh types dolfin-convert can handle see the command line help:
$ dolfin-convert
Usage: dolfin-convert [OPTIONS] ... input.x output.y
Options:
-h display this help text and exit
-i format specify input format
-o format specify output format
Alternatively, the following long options may be used:
--help same as -h
--input same as -i
--output same as -o
Supported formats:
xml - DOLFIN XML mesh format (current)
xml-old - DOLFIN XML mesh format (DOLFIN 0.6.2 and earlier)
mesh - Medit, generated by tetgen with option -g
Triangle - Triangle file format (input prefix of .ele and .node files)
gmsh - Gmsh, version 2.0 file format
metis - Metis graph file format
scotch - Scotch graph file format
diffpack - Diffpack tetrahedral grid format
abaqus - Abaqus tetrahedral grid format
ExodusII - Sandia Format (requires ncdump utility from NetCDF)
Star-CD - Star-CD tetrahedral grid format
If --input or --output are not specified, the format will
be deduced from the suffix:
.xml - xml
.mesh - mesh
.gmsh - gmsh
.msh - gmsh
.gra - metis
.grf - scotch
.grid - diffpack
.inp - abaqus
.e - Exodus II
.exo - Exodus II
.ncdf - ncdump'ed Exodus II
.vrt and .cell - starcd
To call dolfin mesh conversion utilities from python, try:
from dolfin_utils import meshconvert
# Convert to XML
meshconvert.convert2xml(ifilename, ofilename, iformat=iformat)
but then you have to order the mesh yourself (or call the command dolfin-order)
# Order mesh
os.system("dolfin-order %s" % ofilename)