TET_MESH_L2Q is a FORTRAN90 program which converts a 4-node tetrahedral mesh ("tet mesh") into a 10-node tet mesh.
In particular, TET_MESH_L2Q reads information describing a set of 3D points, and a 4 node ("linear") tet mesh of those points. It creates a "quadratic" tet mesh, which has the same number of tetrahedrons, but in which each tetrahedron is defined by 10 nodes. In the process, it adds just enough nodes, at the midsides of the edges of the original mesh, to define the new mesh. The data defining the new mesh is written out to files for further use.
The refinement of a single tetrahedron is easy. Every pair of nodes generates a new node whose location is the average of the locations of the original two nodes. The problem is that many tetrahedrons may share the same edge. The new node needs to be generated exactly once, and assigned a unique index, which all the tetrahedrons will share. The tricky part of this calculation is thus figuring out whether it is time to generate a new node, or whether the node has already been generated, in which case the appropriate index must be retrieved.
tet_mesh_l2q prefixwhere prefix is the common file prefix:
The input and output files use the simple TABLE format; comment lines begin with a "#" character. Otherwise, each line of the file contains one set of information, either the coordinates of a node (for a node file), or the indices of nodes that make up a tetrahedron, (for a tetrahedron file).
The input file prefix_nodes.txt contains the coordinate information for the 4-node tet mesh. Each data line contains the X and Y coordinates of a single node.
The input file prefix_elements.txt contains the tetrahedron information for the 4-node tet mesh. Each data line contains the indices of four nodes that form a tetrahedron.
The output file prefix_l2q_nodes.txt contains the coordinate information for the 10-node tet mesh. The data lines begin with the node information from nodes.txt, followed by the coordinates of the new nodes.
The output file prefix_l2q_elements.txt contains the tetrahedron information for the 10-node tet mesh. There are exactly as many tetrahedrons as before, but now each tetrahedron uses 10 nodes. Each line of the file contains the indices of 10 nodes that form the tetrahedron, listed in a particular order. The first four node indices are the same as for the linear tet mesh. The next six node indices may be thought of as being obtained as averages of pairs of the first four nodes. Symbolically, this may be thought of as:
1 2 3 4 (1+2) (1+3) (1+4) (2+3) (2+4) (3+4)
TET_MESH_L2Q is available in a C++ version and a FORTRAN90 version and a MATLAB version.
CVT_TET_MESH, a FORTRAN90 library which uses CVT methods to compute a tet mesh in a region.
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, a FORTRAN90 library which includes a variety of routines for working with tetrahedral 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_Q2L, a FORTRAN90 program which takes a 10-node tet mesh and makes a 4-node tet mesh.
TET_MESH_QUALITY, a FORTRAN90 program which takes a 4-node tet mesh and computes the "quality" of the 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;
You may copy data defining an initial 4-node tet mesh:
You can go up one level to the FORTRAN90 source codes.