Lesson 8 : Using File Converters

A mesh file converter : cmesh

The program cmesh converts mesh files to and from MDF format. The command line of the program is :


    cmesh  --from <mdf|em|amd|bamg|emc2|gambit|gmsh|netgen|tetgen|matlab|triangle>
           --to <mdf|amd|gpl|gmsh|tec|vtk|matlab> -i <string> 
           [-o <string>] [-n <int>] [--version] [-h]
Where:

       --from <mdf|em|amd|bamg|emc2|gambit|gmsh|netgen|tetgen|matlab|triangle>
         (required)
Available input formats:

mdf MDF file (*.m)
em EasyMesh files (*.s *.e *.n)
amd AMD BA mesh file
bamg BAMG file (*.bamg)
emc2 EMC2 Formatted file (*.msh)
gambit Gambit Neutral file (*.neu)
gmsh Gmsh file (*.msh)
netgen Netgen file (*.vol)
tetgen Tetgen files (*.node and *.ele)
matlab Matlab file (*-matlab.m)
triangle Triangle files (*.node and *.ele)



     --to <mdf|amd|gpl|gmsh|tec|vtk|matlab>
     (required)
Available output formats:

mdf MDF file (*.m)
em EasyMesh files (*.s *.e *.n)
amd AMD BA mesh file
bamg BAMG file (*.bamg)
emc2 EMC2 Formatted file (*.msh)
gambit Gambit Neutral file (*.neu)
gmsh Gmsh file (*.msh)
netgen Netgen file (*.vol)
tetgen Tetgen files (*.node and *.ele)
matlab Matlab file (*-matlab.m)
triangle Triangle files (*.node and *.ele)


-i <string>,  --input <string>
(required) Mesh Input File
-o <string>,  --output <string>
Mesh Output File
-n <int>,  --nb_dof <int>
Nb. of degrees of freedom per node
--version
Displays version information and exits.
-h,  --help
Displays usage information and exits. Here, in the invoked programs and file formats are the following :



  • The optional argument is an integer that defines the (constant) number of degrees of freedom per node. This information is indeed not always available from mesh generators and is needed in MDF format. Its default value is 1.

    A field file converter : cfield

    The command line of the program is :

    The program cfield converts input and output field used by in FFI format to other formats.

    
         cfield  -f <gmsh|gpl|tec|vtk> -m <string> -i <string> [-o <string>]  [--version] [-h]
    
    Where:
    
    -f <gmsh|gpl|tec|vtk>,  --format <gmsh|gpl|tec|vtk>
    
    (required)

    Available output formats:

    gmsh Gmsh Postprocessing File (*.pos)
    gpl Gnuplot File (*-gnuplot.dat)
    tec Tecplot file (*-tecplot.dat)
    vtk vtk file (*.vtk)
      -m <string>,  --mesh <string>
          (required) Mesh file name
      -i ,  --input 
          (required) Input field file name
      -o ,  --output 
          Output field file name
      --version
          Displays version information and exits.
      -h,  --help
          Displays usage information and exits.

     
    Copyright © 1998-2007 Rachid Touzani