TRIANGULATION_TO_GMSH
Convert Triangulation to GMSH File


TRIANGULATION_TO_GMSH is a MATLAB program which reads a file of node coordinates and a file of elements defined by node indices, which define a triangulation of a 2D region in terms of 3-node or 6-node triangles, and creates a corresponding Gmsh mesh file.

Usage:

triangulation_to_gmsh ( 'prefix' )
where 'prefix' is the common filename prefix:

Licensing:

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

Languages:

TRIANGULATION_TO_GMSH is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

DOLFIN-CONVERT, a Python program which can convert mesh file from Gmsh, MEDIT, METIS or SCOTCH format to an XML format suitable for use by DOLFIN or FENICS, by Anders Logg.

GMSH, examples which illustrate the use of the Gmsh program, a 3D mesh generator for the finite element method (FEM).

MSH, a data directory of examples of MSH files, the native 3D mesh format used by Gmsh.

TET_MESH_TO_GMSH, a MATLAB program which converts the data defining a tetrahedral mesh into an equivalent Gmsh msh file.

TRIANGULATION, a MATLAB library which performs various operations on order 3 (linear) or order 6 (quadratic) triangulations.

TRIANGULATION_L2Q, a MATLAB program which reads information about a 3-node (linear) triangulation and creates data defining a corresponding 6-node (quadratic) triangulation;

TRIANGULATION_ORDER3, a data directory which defines TRIANGULATION_ORDER3 files, a description of a linear triangulation of a set of 2D points, using a pair of files to list the node coordinates and the 3 nodes that make up each triangle;

TRIANGULATION_Q2L, a MATLAB program which reads information about a 6-node (quadratic) triangulation and creates data defining a corresponding 3-node (linear) triangulation;

TRIANGULATION_T3_TO_T4, a MATLAB program which reads information about a 3-node triangulation and creates data defining a corresponding 4-node triangulation (vertices + centroid);

Reference:

  1. 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:

RECTANGLE is a rectangular region which has been divided into 3 rows and 4 columns of squares, each then split into two 3-node triangles. The node and element files of this triangulation are converted into a Gmsh msh file describing the same triangulation.

You can go up one level to the MATLAB source codes.


Last revised on 28 May 2013.