Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from dolfin import *
- from dolfin_utils import meshconvert
- dolfin-convert cylinder6.msh out.xml
- $ 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
- from dolfin_utils import meshconvert
- # Convert to XML
- meshconvert.convert2xml(ifilename, ofilename, iformat=iformat)
- # Order mesh
- os.system("dolfin-order %s" % ofilename)
- import os
- os.system('dolfin-convert carbon_f.msh mesh.xml')
- meshio-convert cylinder6.msh out.xml
Add Comment
Please, Sign In to add comment