GMSH_IO
Read and Write GMSH Mesh files
GMSH_IO
is a C++ library which
can read and write the files used by the GMSH meshing program.
Licensing:
The computer code and data files made available on this
web page are distributed under
the GNU LGPL license.
Languages:
GMSH_IO is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
DOLFIN-CONVERT,
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.
FEM_TO_GMSH,
a C++ 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.
GMSH,
examples which
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).
GMSH_TO_FEM,
a C++ 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.
MSH,
a data directory of examples of MSH files,
the native 3D mesh format used by Gmsh.
TETHEX,
examples which
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.
Reference:
-
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.
Source Code:
Examples and Tests:
List of Routines:
-
CH_CAP capitalizes a single character.
-
CH_EQI is true if two characters are equal, disregarding case.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
GMSH_DATA_READ reads data from a GMSH file.
-
GMSH_SIZE_READ reads sizes from a GMSH file.
-
GMSH_MESH2D_ELEMENT_DATA_EXAMPLE returns element information for the example.
-
GMSH_MESH2D_ELEMENT_SIZE_EXAMPLE returns element sizes for the example.
-
GMSH_MESH2D_NODE_DATA_EXAMPLE returns node information for the example.
-
GMSH_MESH2D_NODE_SIZE_EXAMPLE returns the sizes of node information for the example.
-
GMSH_MESH1D_WRITE writes 1d mesh data as a Gmsh mesh file.
-
GMSH_MESH2D_WRITE writes 2d mesh data as a Gmsh mesh file.
-
GMSH_MESH3D_WRITE writes 3D mesh data as a Gmsh mesh file.
-
I4MAT_COPY_NEW copies an I4MAT to a "new" I4MAT.
-
I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.
-
I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
-
MESH_BASE_ONE ensures that the element definition is one-based.
-
R8_MAX returns the maximum of two R8's.
-
R8_MIN returns the minimum of two R8's.
-
R8MAT_COPY_NEW copies one R8MAT to a "new" R8MAT.
-
R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
-
S_BEGIN reports whether string 1 begins with string 2, ignoring case.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_TO_I4 reads an I4 from a string.
-
S_TO_R8 reads an R8 from a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 21 October 2014.