Read and Write GMSH Mesh files
is a MATLAB library which
can read and write the files used by the GMSH meshing program.
The computer code and data files made available on this
web page are distributed under
the GNU LGPL license.
GMSH_IO is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
a Python program which
can convert a mesh file from Gmsh, MEDIT, METIS or SCOTCH format to an
XML format suitable for use by DOLFIN or FENICS,
by Anders Logg.
a MATLAB program which
reads FEM files definining a 1D, 2D or 3D mesh, namely
a file of node coordinates and a file of elements defined by
node indices, and creates a Gmsh mesh file.
illustrate the use of the Gmsh program,
a 1D, 2D or 3D mesh generator that can create meshes
suitable for use by the finite element method (FEM).
a MATLAB program which
reads a mesh data file created by the GMSH program
and writes a pair of node and element files that correspond
to the FEM format.
a data directory of examples of MSH files,
the native 3D mesh format used by Gmsh.
illustrate the use of TETHEX,
a C++ program which
can read a Gmsh file defining a mesh of triangles or tetrahedrons,
and subdivide the mesh into quadrilaterals or hexahedrons, which
are suitable for use by the DEALII finite element program,
by Mikhail Artemiev.
Christophe Geuzaine, Jean-Francois Remacle,
Gmsh: a three-dimensional finite element mesh generator with
built-in pre- and post-processing facilities,
International Journal for Numerical Methods in Engineering,
Volume 79, Number 11, pages 1309-1331, 2009.
returns the capitalized version of a character;
returns TRUE if a two characters are equal (ignoring case);
reads data from a GMSH data file.
writes a 1D mesh as a GMSH data file.
sets element data for a 2D example.
sets element sizes for a 2D example.
sets node data for a 2D example.
sets node sizes for a 2D example.
writes a 2D mesh as a GMSH data file.
writes a 3D mesh as a GMSH data file.
reads sizes from a GMSH data file.
prints an I4MAT, transposed.
prints some of the transpose of an I4MAT.
adjusts a mesh to use 1-based indexing.
prints an R8MAT, transposed.
prints some of an R8MAT, transposed.
is TRUE if two strings match, up to the end of the shorter string,
ignoring spaces and capitalization;
returns the length of a string to the last nonblank.
prints the current YMDHMS date as a time stamp.
Examples and Tests:
You can go up one level to
the MATLAB source codes.
Last revised on 23 October 2014.