Loading

 

Lesson 8: Using File Converters

A mesh file converter : cmesh

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


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

where:


       --from <ofeli|em|bamg|gambit|gmsh|netgen|tetgen|matlab|triangle>
         (required)

Available input formats:

ofeli OFELI mesh file (*.m)
em EasyMesh files (*.s *.e *.n)
bamg BAMG file (*.bamg)
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 <ofeli|amd|gpl|gmsh|tec|vtk|matlab>
     (required)

Available output formats:

ofeli OFELI mesh file (*.m)
em EasyMesh files (*.s *.e *.n)
bamg BAMG file (*.bamg)
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 program cfield converts input and output field used by in FFI format to other formats.

    The command line of the program is:

    
         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-2016 Rachid Touzani