Reading and Writing MESH Files

MEDIT_IO is a FORTRAN90 library which can read or write files used by the MEDIT program, which can be used to define the a mesh associated with the finite element method (FEM) in 2D or 3D, using triangles, quadrilaterals, tetrahedrons or hexahedrons.


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


MEDIT_IO is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

Related Programs:

FEM_TO_MEDIT, a FORTRAN90 program which reads a pair of FEM files defining node coordinates and elements, and creates a corresponding MEDIT mesh file.

MEDIT, a data directory which contains examples of files which can be used by the MEDIT program to define a 2D or 3D mesh for use by the finite element method (FEM), using triangles, quadrilaterals, tetrahedrons or hexahedrons.

MEDIT, examples which illustrate the use of medit, an interactive graphics program developed to visualize numerical simulation results on unstructured meshes in two and three dimensions. Scalar, vector and tensor fields can be easily associated and displayed with meshes. The program is by Pascal Frey.

MEDIT_TO_FEM, a FORTRAN90 program which reads a mesh file created by the MEDIT program and writes a corresponding pair of node and element files that correspond to the FEM format.

TRIANGLE_TO_MEDIT, a FORTRAN90 program which reads the NODE and ELE files created by triangle() to describe a triangular mesh, and writes a corresponding MESH file for input to medit().


  1. Pascal Frey,
    MEDIT: An interactive mesh visualization software,
    Technical Report RT-0253,
    Institut National de Recherche en Informatique et en Automatique,
    03 December 2001.

Source Code:

Examples and Tests:

List of Routines:

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

Last revised on 10 October 2014.