TET_MESH_QUALITY
Interactive Program for
Tet Mesh Quality
TET_MESH_QUALITY
is a FORTRAN90 program which
computes and prints a variety
of quality measures for a given tet mesh of a set of
points in 3D.
The tet mesh is defined by a node file containing
the coordinates of nodes, and a tetra file containing
sets of 4 or 10 node indices.
The quality measures computed include:

Measure 1, the minimum, over all tetrahedrons, of 3 times
the radius of the insphere divided by the radius of the circumsphere.

Measure 2, the minimum, over all tetrahedrons, of 2 times
sqrt ( 6 ) times the radius of the insphere divided by the
length of the longest side of the tetrahedron.

Measure 3, the minimum, over all tetrahedrons, of
12 * ( 3 * volume )**(2/3) / (sum of squares of edge lengths);

Measure 4, the minimum solid angle in any tetrahedron;

Measure 5, a uniformity measure, the ratio of the
maximum to minimum tetrahedron volume;
Each quality measure is defined as the minimum of its value
over each tetrahedron. The maximum and best possible value is 1, and
the minimum and worst value is 0.
Usage:
tet_mesh_quality prefix
where prefix is the common file prefix:

prefix_nodes.txt, the node coordinates;

prefix_elements.txt, the element definitions.

prefix_quality.txt the quality file created by the program.
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_QUALITY is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Programs:
CVT_TET_MESH,
a FORTRAN90 program which
uses CVT methods to compute a tet mesh in a region.
GEOMPACK,
a FORTRAN90 library which
contains a routine
DTRIS3 that can compute the tet mesh for a set of 3D points,
as well as the adjacency information.
TABLE_QUALITY,
a FORTRAN90 program which
can compute quality measures for an arbitrary (untriangulated)
set of points in any dimension.
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_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_L2Q,
a FORTRAN90 library 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 FORTRAN90 program which
converts a quadratic to linear tet mesh.
TET_MESH_RCM,
a FORTRAN90 program which
takes a tet mesh and
relabels the nodes to reduce the bandwidth of the
corresponding adjacency matrix.
TET_MESH_REFINE,
a FORTRAN90 program which
can refine a tet mesh.
TET_MESH_TET_NEIGHBORS,
a FORTRAN90 program which
computes the tetrahedral adjacency information.
TET_MESH_VOLUMES,
a FORTRAN90 program which
computes the volume of each tetrahedron in a tet mesh;
TETRAHEDRON_PROPERTIES,
a FORTRAN90 program which
computes properties of a given tetrahedron.
TETRAHEDRONS,
a dataset directory which
contains examples of tetrahedrons;
TRIANGULATION_QUALITY,
a FORTRAN90 program which
computes
trianglebased quality measures for a triangulation of a set
of points in 2D.
Reference:

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

David Field,
Qualitative Measures for Initial Meshes,
International Journal of Numerical Methods in Engineering,
Volume 47, 2000, pages 887906.

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

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
CUBE is a simple example of 8 nodes in a cube.
List of Routines

MAIN is the main program for TET_MESH_QUALITY.

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.

DTABLE_DATA_READ reads data from a double precision table file.

DTABLE_DATA_WRITE writes data to a double precision table file.

DTABLE_HEADER_READ reads the header from a double precision table file.

DTABLE_HEADER_WRITE writes the header to a double precision table file.

DTABLE_WRITE writes a double precision table file.

FILE_COLUMN_COUNT counts the number of columns in the first line of a file.

FILE_ROW_COUNT counts the number of row records in a file.

GET_UNIT returns a free FORTRAN unit number.

I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.

I4MAT_TRANSPOSE_PRINT_SOME prints some of the transpose of an I4MAT.

ITABLE_DATA_READ reads data from an integer table file.

ITABLE_HEADER_READ reads the header from an integer table file.

I4VEC_HISTOGRAM computes a histogram of the elements of an I4VEC.

I4VEC_PRINT prints an I4VEC.

R8_SWAP switches two R8's.

R8MAT_DET_4D computes the determinant of a 4 by 4 matrix.

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.

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

R8VEC_LENGTH returns the Euclidean length of an R8VEC.

R8VEC_MEAN returns the mean of an R8VEC.

R8VEC_PRINT prints an R8VEC.

R8VEC_VARIANCE returns the variance of an R8VEC.

S_BLANK_DELETE removes blanks from a string, left justifying the remainder.

S_TO_I4 reads an I4 from a string.

S_TO_I4VEC reads an I4VEC from a string.

S_TO_R8 reads an R8VEC from a string.

S_TO_R8VEC reads an R8VEC from a string.

S_WORD_COUNT counts the number of "words" in a string.

TET_MESH_NODE_ORDER: determine the order of nodes in a tetra mesh.

TET_MESH_QUALITY1 returns the quality of each tet in a mesh.

TET_MESH_QUALITY2 returns the quality of each tet in a mesh.

TET_MESH_QUALITY3 returns the quality of each tet in a mesh.

TET_MESH_QUALITY4 returns the quality of each tet in a mesh.

TET_MESH_QUALITY5 returns the quality of each tet in a mesh.

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_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_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 FORTRAN90 source codes.
Last revised on 30 September 2009.