Interactive Finite Element Mesh Generation


GLMESH2 is an interactive triangle-based two-dimensional finite element mesh generation program written in C and using OpenGL and GLUT. It provides for both uniform mesh refinement and Delaunay refinement of unstructured triangle meshes. A user-specified subset of the domain may be refined, coarsened, smoothed, or removed with a keystroke.


System Requirements and Installation

The required computing platform is a workstation running OpenGL and the OpenGL Utility Toolkit GLUT or one of its alternatives. In the case of Apple OS X, both OpenGL and GLUT are installed as part of Xcode. OpenGL is included in most Linux distributions, and is installed with Microsoft Visual Studio, but it may be necessary to download GLUT: link to glut

Three files are needed: a static link library (libglut.a or glut32.lib in the case of Windows), a dynamic link library (libglut.so.3.8.0, along with soft links libglut.so.3 and libglut.so or, for Windows, glut.dll), and a header file glut.h.

The source code must be compiled and run from a terminal window.

Compile and link command for Linux/X11/gcc:

gcc -O3 glmesh2.c -o glmesh2 -lglut -lGLU -lGL -lXext -lX11 -lm

Compile and link command for Apple OS X/Cocoa:

gcc -O3 glmesh2.c -o glmesh2 --ansi -framework GLUT -framework OpenGL -framework Cocoa

Compile and link command for Windows Visual C++

cl glmesh2.c

Note that the command must be executed in a command window obtained from Visual Studio so that the path environment variable is appropriately set.

Program execution command

glmesh2 input_file output_file


Download Files

Preprint of a paper: glmesh2.pdf

Source code file: glmesh2.c

Sample input files: glmesh2.in, glmesh2.unt, naca4412

Last updated: 03/25/2012