TET_MESH
Routines for a Tet Mesh
TET_MESH
is a C++ library which
constructs, describes, or modifies a mesh of tetrahedrons.
Linear and Quadratic Meshes
The simplest tet mesh, which we term an order 4
or linear mesh, uses four points to define each tetrahedron.
A second type of mesh, known as an order 10 or quadratic
mesh, uses ten points.
While an order 4 mesh can naturally be constructed directly from
most sets of data points, a mesh of order 10 is not usually
constructed directly from the data; at least in the simplest case,
one wants the 6 extra nodes to be the midpoints of the sides
determined by the 4 vertices.
Thus, an order 10 tet mesh is typically generated in two steps:

generate an order 4 mesh, in which every tetrahedral vertex
comes from a user data point;

generate an order 10 mesh from the order 4 mesh, in which
the new midside points are not user data points, but rather
averages of pairs of tetrahedral vertices.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TET_MESH is available in
a C++ version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Programs:
CVT_TET_MESH,
a FORTRAN90 library which
uses CVT methods to compute a tet mesh in a region.
GEOMETRY,
a C++ library which
includes a number of routines for
making computations involving tetrahedrons.
GEOMPACK,
a C++ library which
contains a routine
DTRIS3 that can compute the tet mesh for a set of 3D points,
as well as the adjacency information.
KEAST,
a C++ library which
defines a number of quadrature rules
for a tetrahedron.
NCC_TETRAHEDRON,
a C++ library which
defines NewtonCotes closed quadrature
rules on a tetrahedron.
NCO_TETRAHEDRON,
a C++ library which
defines NewtonCotes open quadrature
rules on a tetrahedron.
QUADRATURE_RULES_TET,
a dataset directory which
contains triples of files defining various quadrature
rules on tetrahedrons.
TABLE_TET_MESH,
a FORTRAN90 program which
can compute the tet mesh for a given set of points.
TEST_TET_MESH,
a FORTRAN90 library which
defines a few test regions for the generation
of a tet mesh.
TET_MESH_BOUNDARY,
a C++ program which
returns the nodes and faces of the boundary of a tetrahedral mesh,
which themselves form a 3D triangular mesh or "TRI_SURFACE".
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
can read in the
node and tetra files defining a tet mesh and display a wireframe
image.
TET_MESH_L2Q,
a C++ program which
converts a linear to quadratic
tet mesh.
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_Q2L,
a C++ program which
converts a quadratic to linear tet mesh.
TET_MESH_QUAD,
a C++ program which
estimates the integral of a function over a region defined by a tetrahedral mesh.
TET_MESH_QUALITY,
a C++ program which
computes the quality of a tet mesh.
TET_MESH_RCM,
a C++ program which
takes a tet mesh and
relabels the nodes to reduce the bandwidth of the
corresponding adjacency matrix.
TET_MESH_REFINE,
a C++ program which
can refine a tet mesh.
TET_MESH_TET_NEIGHBORS,
a C++ program which
computes the tetrahedral adjacency information.
TET_MESH_VOLUMES,
a C++ program which
computes the volume of each tetrahedron in a tet mesh;
Reference:

Herbert Edelsbrunner,
Geometry and Topology for Mesh Generation,
Cambridge, 2001,
ISBN: 0521793092,
LC: QA377.E36.

Barry Joe,
GEOMPACK  a software package for the generation of meshes
using geometric algorithms,
Advances in Engineering Software,
Volume 13, Number 5, 1991, pages 325331.

Anwei Liu, Barry Joe,
Quality Local Refinement of Tetrahedral Meshes Based
on 8Subtetrahedron Subdivision,
Mathematics of Computation,
Volume 65, Number 215, July 1996, pages 11831200.

PerOlof Persson, Gilbert Strang,
A Simple Mesh Generator in MATLAB,
SIAM Review,
Volume 46, Number 2, June 2004, pages 329345.
Source Code:
Examples and Tests:
List of Routines:

I4_MAX returns the maximum of two I4's.

I4_MIN returns the minimum of two I4's.

I4_SWAP switches two I4's.

I4_UNIFORM returns a scaled pseudorandom I4.

I4COL_COMPARE compares columns I and J of an I4COL.

I4COL_SORT_A ascending sorts the columns of an I4COL.

I4COL_SORT2_A ascending sorts the elements of each column of an I4COL.

I4COL_SORTED_UNIQUE_COUNT counts unique elements in an I4COL.

I4COL_SWAP swaps two columns of an I4COL.

I4I4_SORT_A ascending sorts a pair of I4's.

I4I4I4_SORT_A ascending sorts a triple of I4's.

I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.

I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.

I4VEC_PRINT prints an I4VEC.

I4VEC_SUM sums the entries of an I4VEC.

I4VEC_ZERO zeroes an I4VEC.

R4_ABS returns the absolute value of an R4.

R4_NINT returns the nearest integer to an R4.

R8_HUGE returns a "huge" R8.

R8_MAX returns the maximum of two R8's.

R8_MIN returns the minimum of two R8's.

R8_SWAP switches two R8's.

R8_UNIFORM_01 returns a unit pseudorandom R8.

R8MAT_DET_4D computes the determinant of a 4 by 4 R8MAT.

R8MAT_MV multiplies a matrix times a vector.

R8MAT_PRINT prints an R8MAT, with an optional title.

R8MAT_PRINT_SOME prints some of an R8MAT.

R8MAT_SOLVE uses GaussJordan elimination to solve an N by N linear system.

R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.

R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.

R8MAT_UNIFORM_01 fills a double precision array with unit pseudorandom values.

R8VEC_CROSS_3D computes the cross product of two vectors in 3D.

R8VEC_IS_NONNEGATIVE is true if all entries in an R8VEC are nonnegative.

R8VEC_IS_ZERO is true if the entries in an R8VEC are all zero.

R8VEC_LENGTH returns the Euclidean length of a R8VEC

R8VEC_MAX returns the maximum element in an R8VEC.

R8VEC_MEAN returns the mean of a R8VEC.

R8VEC_MIN returns the minimum element in an R8VEC.

R8VEC_PRINT prints an R8VEC.

R8VEC_SUM returns the sum of an R8VEC.

R8VEC_UNIFORM_01 returns a unit pseudorandom R8VEC.

R8VEC_VARIANCE returns the variance of a double vector.

R8VEC_ZERO zeroes a real vector.

S_LEN_TRIM returns the length of a string to the last nonblank.

SORT_HEAP_EXTERNAL externally sorts a list of items into ascending order.

TET_MESH_NEIGHBOR_TETS determines tetrahedron neighbors.

TET_MESH_NODE_ORDER: determines the order of nodes.

TET_MESH_ORDER4_ADJ_COUNT counts the number of nodal adjacencies.

TET_MESH_ORDER4_BOUNDARY_FACE_COUNT counts the number of boundary faces.

TET_MESH_ORDER4_EDGE_COUNT counts the number of edges.

TET_MESH_ORDER4_EXAMPLE_SET sets an example linear tet mesh.

TET_MESH_ORDER4_EXAMPLE_SIZE sizes an example linear tet mesh.

TET_MESH_ORDER4_REFINE_COMPUTE computes a refined order 4 tet mesh

TET_MESH_ORDER4_REFINE_SIZE sizes a refined order 4 tet mesh.

TET_MESH_ORDER4_TO_ORDER10_COMPUTE computes a quadratic tet mesh from a linear one.

TET_MESH_ORDER4_TO_ORDER10_SIZE sizes a quadratic tet mesh from a linear one.

TET_MESH_ORDER10_EXAMPLE_SET sets an example quadratic tet mesh.

TET_MESH_ORDER10_EXAMPLE_SIZE sizes an example quadratic tet mesh.

TET_MESH_ORDER10_TO_ORDER4_COMPUTE linearizes a quadratic tet mesh.

TET_MESH_ORDER10_TO_ORDER4_SIZE sizes a linear tet mesh from a quadratic one.

TET_MESH_QUAD approximates an integral over a tet mesh.

TET_MESH_QUALITY1 returns a tet mesh quality factor.

TET_MESH_QUALITY2 returns a tet mesh quality factor.

TET_MESH_QUALITY3 returns a tet mesh quality factor.

TET_MESH_QUALITY4 returns a tet mesh quality factor.

TET_MESH_QUALITY5 returns a tet mesh quality factor.

TET_MESH_SEARCH_DELAUNAY searches a Delaunay tet mesh for a point.

TET_MESH_SEARCH_NAIVE naively searches a tet mesh.

TETRAHEDRON_BARYCENTRIC returns the barycentric coordinates of a point.

TETRAHEDRON_CIRCUMSPHERE_3D computes the circumsphere of a tetrahedron in 3D.

TETRAHEDRON_EDGE_LENGTH_3D returns edge lengths of a tetrahedron in 3D.

TETRAHEDRON_INSPHERE_3D finds the insphere of a tetrahedron in 3D.

TETRAHEDRON_ORDER4_PHYSICAL_TO_REFERENCE maps physical points to reference points.

TETRAHEDRON_ORDER4_REFERENCE_TO_PHYSICAL maps reference points to physical points.

TETRAHEDRON_QUALITY1_3D: "quality" of a tetrahedron in 3D.

TETRAHEDRON_QUALITY2_3D: "quality" of a tetrahedron in 3D.

TETRAHEDRON_QUALITY3_3D computes the mean ratio of a tetrahedron.

TETRAHEDRON_QUALITY4_3D computes the minimum solid angle of a tetrahedron.

TETRAHEDRON_REFERENCE_SAMPLE samples points in the reference tetrahedron.

TETRAHEDRON_SAMPLE returns random points in a tetrahedron.

TETRAHEDRON_VOLUME_3D computes the volume of a tetrahedron in 3D.

TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 20 August 2009.