Reading and Writing MESH Files
is a FORTRAN77 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.
a FORTRAN77 program which
reads a pair of FEM files defining node coordinates and elements,
and creates a corresponding MEDIT mesh file.
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.
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.
a FORTRAN77 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.
a FORTRAN77 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().
MEDIT: An interactive mesh visualization software,
Technical Report RT-0253,
Institut National de Recherche en Informatique et en Automatique,
03 December 2001.
Examples and Tests:
List of Routines:
CH_CAP capitalizes a single character.
CH_EQI is a case insensitive comparison of two characters for equality.
CH_TO_DIGIT returns the integer value of a base 10 digit.
CYL248_DATA defines the data for a 3D tetrahedral mesh.
CYL248_SIZE defines the sizes for a 3D tetrahedral mesh.
GET_UNIT returns a free FORTRAN unit number.
HEXAHEXA_2X2X2_DATA defines the data for a 3D hexahedral mesh.
HEXAHEXA_2X2X2_SIZE defines the sizes for a 3D hexahedral mesh.
I4MAT_COPY copies an I4MAT.
I4VEC_COPY copies an I4VEC.
MESH_DATA_PRINT prints mesh data.
MESH_DATA_READ reads data from a MESH file.
MESH_SIZE_PRINT prints mesh sizes.
MESH_SIZE_READ reads sizes from a MESH file.
MESH_WRITE writes sizes and data to a MESH file.
R8MAT_COPY copies an R8MAT.
R8VEC_COPY copies an R8VEC.
S_BEGIN is TRUE if one string matches the beginning of the other.
S_EQI is a case insensitive comparison of two strings for equality.
S_TO_I4 reads an integer value from a string.
S_TO_I4VEC reads an integer vector from a string.
S_TO_R8 reads an R8 value from a string.
S_TO_R8VEC reads an R8VEC from a string.
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 23 November 2010.