TET_MESH_BOUNDARY


TET_MESH_BOUNDARY, a Fortran90 code which reads information defining a tetrahedral mesh of points in 3D, and determines the triangular faces that form the boundary of the mesh; it writes out files containing the nodes and elements defining this triangulated surface.

The tet mesh is defined by a node file containing the coordinates of nodes, and an element file containing sets of 4 or 10 node indices.

Each tetrahedron has 4 triangular faces. Most of these faces will be shared by a neighbor tetrahedron, but some are not. It is precisely those faces that are not shared by a neighbor that constitute the boundary faces of the mesh.

The program identifies the triangular faces that form the boundary, and writes two files, a "boundary_node" file that lists the coordinates of the boundary nodes, and a "boundary_element" file that lists the (renumbered) indices of the boundary nodes used to form the boundary faces. This pair of files defines a triangulated 3D surface, or "TRI_SURFACE", and can be plotted, for instance, by tri_surface_display or tri_surface_display_open_gl.

The program also writes out a "boundary node mask" file, which reports the value 1 for each boundary node, and 0 for interior nodes. A boundary node is a node that occurs on a boundary face. This file is of use to the fem_to_mesh program.

Usage:

tet_mesh_boundary prefix
where prefix is the common file prefix:

Licensing:

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

Languages:

tet_mesh_boundary is available in a C++ version and a Fortran90 version and a MATLAB version and a Octave version.

Related Programs:

tet_mesh_boundary_test

tet_mesh, a Fortran90 library which is useful for work with tet meshes.

tet_mesh_display, a MATLAB program which can read in the node and tetra files defining a tet mesh and display a wireframe image.

tet_mesh_display_opengl, a C++ program which reads a tet mesh and displays the nodes and edges using OpenGL.

tet_mesh_order4, a directory which contains a description and examples of a tet mesh using order 4 elements.

tet_mesh_order10, a directory which contains a description and examples of a tet mesh using order 10 elements.

tet_mesh_tet_neighbors, a data directory which contains a description and examples of the format for storing information about neighboring tetrahedrons in a tetrahedral mesh.

tri_surface, a data directory which contains examples of TRI_SURFACE files, a 3D surface described by a collection of triangles.

tri_surface_display, a MATLAB program which displays the 3D graphics information in a TRI_SURFACE file;

tri_surface_display_opengl, a C++ program which displays the 3D graphics information in a TRI_SURFACE file using OpenGL.

Reference:

  1. Herbert Edelsbrunner,
    Geometry and Topology for Mesh Generation,
    Cambridge, 2001,
    ISBN: 0-521-79309-2,
    LC: QA377.E36.
  2. Barry Joe,
    GEOMPACK - a software package for the generation of meshes using geometric algorithms,
    Advances in Engineering Software,
    Volume 13, 1991, pages 325-331.
  3. Per-Olof Persson, Gilbert Strang,
    A Simple Mesh Generator in MATLAB,
    SIAM Review,
    Volume 46, Number 2, June 2004, pages 329-345.

Source code


Last revised on 17 January 2024.