TEST_TET_MESH Mesh Generation Test Regions

TEST_TET_MESH is a FORTRAN90 library which sets up a number of test problems for mesh generation ("tetrahedralization") in 3D.

As far as possible, a uniform and abstract approach has been used. For each test region, a number of routines are provided, via which it is possible for the user to determine many things about the region. Often, just one or two routines would be needed for a particular purpose. The names of the routines, and their purposes are:

• BOUNDARY_NEAREST: returns the nearest point on the boundary of the region to a given point or set of points;
• BOUNDARY_PROJECT: projects exterior points onto the boundary.
• BOUNDARY_SEGMENT: returns a sequence of roughly equally spaced points that lie on one particular boundary segment;
• BOUNDARY_SEGMENT_LENGTH: returns the "length" (number of nodes) of a particular boundary segment. This simply counts the number of points needed to trace or approximate the boundary segment;
• BOUNDARY_SEGMENT_NUM: returns the number of boundary segments. Simple regions have one boundary segment. A region with one hole has two, and so on;
• BOX: returns a bounding box for the region. All points in the region are within this box;
• DENSITY: the value of the mesh density function at any point in the region. If this is not constant, then high values correspond to places where many more mesh points should be placed;
• ELEMENT_SIZE: returns a requested typical element size. This refers to the average size of the triangles formed by a triangulation of the points;
• FIXED_NUM: returns the number of points which must be included as nodes of the mesh (which may be zero);
• FIXED_POINTS: returns the coordinates of the points which must be included as nodes of the mesh;
• HEADER: prints a brief description of the problem;
• HOLE_NUM: returns the number of "holes" in the region;
• HOLE_POINT: returns the coordinates of one point in a hole (useful when TRIANGLE is to be invoked);
• INSIDE: reports which of a given set of points are inside the region.
• SAMPLE: returns a set of sample points from the region, chosen with uniform probability;
• SDIST: returns the signed distance to the boundary of the region for each of a set of input points. (a positive distance means the point is outside the region, a negative distance means it is inside); (Not ready for problems 4, 5, 6, 7, 8, 9 )
• TITLE: a title for the problem;

The test problems include:

1. The 3x1x1 channel;
2. The vertical cylinder, R = 1, H = 4;
3. The unit cube;
4. The unit sphere;

MATLAB has a command delaunay3() that can compute the tet mesh for a set of 3D points.

Languages:

TEST_TET_MESH is available in a FORTRAN90 version.

Related Data and 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.

KEAST, a FORTRAN90 library which defines a number of quadrature rules for a tetrahedron.

TABLE_TET_MESH, a FORTRAN90 program which can compute the tet mesh for a given set of points.

TET_MESH, a FORTRAN90 library which is useful for tet mesh calculations.

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 program which converts a linear to quadratic tet mesh.

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

TET_MESH_ORDER10, a data 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_QUALITY, a FORTRAN90 program which computes the quality of a 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_TET_NEIGHBORS, a FORTRAN90 program which computes the tetrahedral adjacency information.

Reference:

A Simple Mesh Generator in MATLAB,
SIAM Review,
Volume 46, Number 2, June 2004, pages 329-345.

Examples and Tests:

TEST_TET_MESH_PRB carries out some simple tasks with the sample problems.

List of Routines:

• ARC_COSINE computes the arc cosine function, with argument truncation.
• BALL_UNIT_SAMPLE_3D picks a random point in the unit ball in 3D.
• CYLINDER_POINT_DIST_3D determines the distance from a cylinder to a point in 3D.
• CYLINDER_POINT_DIST_SIGNED_3D: signed distance from cylinder to point in 3D.
• CYLINDER_POINT_INSIDE_3D determines if a cylinder contains a point in 3D.
• CYLINDER_POINT_NEAR_3D determines the nearest point on a cylinder to a point in 3D.
• DISK_POINT_DIST_3D determines the distance from a disk to a point in 3D.
• P00_BOUNDARY_EDGE_NUM counts the boundary edges in a problem.
• P00_BOUNDARY_EDGES returns the boundary edges for any problem.
• P00_BOUNDARY_FACE_NUM counts the boundary faces in a problem.
• P00_BOUNDARY_FACES returns the boundary faces in any problem.
• P00_BOUNDARY_NODE_NUM counts the boundary nodes in a problem.
• P00_BOUNDARY_NODES returns the boundary nodes in problem 01.
• P00_BOUNDARY_PROJECT projects exterior points to the boundary.
• P00_BOX returns a bounding box for a problem.
• P00_FIXED_NUM returns the number of fixed points in a problem.
• P00_FIXED_POINTS returns the fixed points in a problem.
• P00_INSIDE reports if a point is inside the region in a problem.
• P00_SAMPLE samples points from the region in a problem.
• P00_SAMPLE_H1 samples points from the enlarged region in a problem.
• P00_SDIST returns the signed distance to the region in a problem.
• P00_TEST_NUM returns the number of available tests.
• P00_TITLE returns a title for a problem.
• P01_BOUNDARY_EDGE_NUM counts the boundary edges in problem 01.
• P01_BOUNDARY_EDGES returns the boundary edges in problem 01.
• P01_BOUNDARY_FACE_NUM counts the boundary faces in problem 01.
• P01_BOUNDARY_FACES returns the boundary faces in problem 01.
• P01_BOUNDARY_NODE_NUM counts the boundary nodes in problem 01.
• P01_BOUNDARY_NODES returns the boundary nodes in problem 01.
• P01_BOUNDARY_PROJECT projects exterior points to the boundary in problem 01.
• P01_BOX returns a bounding box for problem 01.
• P01_FIXED_NUM returns the number of fixed points in problem 01.
• P01_FIXED_POINTS returns the fixed points in problem 01.
• P01_INSIDE reports if a point is inside the region in problem 01.
• P01_SAMPLE samples points from the region in problem 01.
• P01_SAMPLE_H1 samples points from the enlarged region in problem 01.
• P01_SDIST returns the signed distance to the region in problem 01.
• P01_TITLE returns a title for problem 01.
• P02_BOUNDARY_EDGE_NUM counts the boundary edges in problem 02.
• P02_BOUNDARY_EDGES returns the boundary edges in problem 02.
• P02_BOUNDARY_FACE_NUM counts the boundary faces in problem 02.
• P02_BOUNDARY_FACES returns the boundary faces in problem 02.
• P02_BOUNDARY_NODE_NUM counts the boundary nodes in problem 02.
• P02_BOUNDARY_NODES returns the boundary nodes in problem 02.
• P02_BOUNDARY_PROJECT projects exterior points to the boundary in problem 02.
• P02_BOX returns a bounding box for problem 02.
• P02_FIXED_NUM returns the number of fixed points in problem 02.
• P02_FIXED_POINTS returns the fixed points in problem 02.
• P02_INSIDE reports if a point is inside the region in problem 02.
• P02_SAMPLE samples points from the region in problem 02.
• P02_SAMPLE_H1 samples points from the enlarged region in problem 02.
• P02_SDIST returns the signed distance to the region in problem 02.
• P02_TITLE returns a title for problem 02.
• P03_BOUNDARY_EDGE_NUM counts the boundary edges in problem 03.
• P03_BOUNDARY_EDGES returns the boundary edges in problem 03.
• P03_BOUNDARY_FACE_NUM counts the boundary faces in problem 03.
• P03_BOUNDARY_FACES returns the boundary faces in problem 03.
• P03_BOUNDARY_NODE_NUM counts the boundary nodes in problem 03.
• P03_BOUNDARY_NODES returns the boundary nodes in problem 03.
• P03_BOUNDARY_PROJECT projects exterior points to the boundary in problem 03.
• P03_BOX returns a bounding box for problem 03.
• P03_FIXED_NUM returns the number of fixed points in problem 03.
• P03_FIXED_POINTS returns the fixed points in problem 03.
• P03_INSIDE reports if a point is inside the region in problem 03.
• P03_SAMPLE samples points from the region in problem 03.
• P03_SAMPLE_H1 samples points from the enlarged region in problem 03.
• P03_SDIST returns the signed distance to the region in problem 03.
• P03_TITLE returns a title for problem 03.
• P04_BOUNDARY_EDGE_NUM counts the boundary edges in problem 04.
• P04_BOUNDARY_EDGES returns the boundary edges in problem 04.
• P04_BOUNDARY_FACE_NUM counts the boundary faces in problem 04.
• P04_BOUNDARY_FACES returns the boundary faces in problem 04.
• P04_BOUNDARY_NODE_NUM counts the boundary nodes in problem 04.
• P04_BOUNDARY_NODES returns the boundary nodes in problem 04.
• P04_BOUNDARY_PROJECT projects exterior points to the boundary in problem 04.
• P04_BOX returns a bounding box for problem 04.
• P04_FIXED_NUM returns the number of fixed points in problem 04.
• P04_FIXED_POINTS returns the fixed points in problem 04.
• P04_INSIDE reports if a point is inside the region in problem 04.
• P04_SAMPLE samples points from the region in problem 04.
• P04_SAMPLE_H1 samples points from the enlarged region in problem 04.
• P04_SDIST returns the signed distance to the region in problem 04.
• P04_TITLE returns a title for problem 04.
• R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
• R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
• R8VEC_ANY_NORMAL returns some normal vector to V1.
• R8VEC_LENGTH returns the Euclidean length of a vector.
• R8VEC_UNIFORM_01 returns a unit pseudorandom R8VEC.
• TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the FORTRAN90 source codes.

Last revised on 27 October 2005.