The -q Switch: Quality mesh generation

The -q switch performs quality mesh generation by Shewchuk's Delaunay refinement algorithm. Add vertices to the CDT (used together with -p) or a previously generated mesh (used together with -r) to ensure that no tetrahedra have radius-edge ratio greater than 2.0. An alternative minimum radius-edge ratio may be specified after the 'q'. Do not supply a too small ratio, e.g., smaller than 1.0, otherwise, TetGen may not terminate.

If no input angle or input dihedral angle (of the PLC) smaller than 60 degree, this algorithm is theoretically guaranteed to terminate with no tetrahedron has radius-edge ratio greater than 2.0. In practice, this algorithm offen successes for radius-edge ratio be 1.414 or even smaller.

Radius-Edge Ratio

A tetrahedron t has a unique circumsphere. Let R=R(t) be that radius and L=L(t) be the length of the shortest edge. The radius-edge ratio Q=Q(t)is measured by taking the ratio, that is:
Q = R/L
It is effective for measuring the quality of a tetrahedron. For all well-shaped tetrahedra, this value is usually small (e.g., samller than 2.5). While for most of badly-shaped tetrahedra, it is large. Hence, for a good quality mesh, this value should be bounded as small as possible. However, the ratio can not be arbitrarily small, it is minimized by the regular tetrahedron (in which case the length of the six edges are equal and the circumcenter is the barycenter), that is:
Q >= 0.612
A special type of badly-shaped tetrahedron is called sliver, which is very flat and nearly degenerate. Slivers can have very small radius-edge ratio, as small as 0.707. The radius-edge ratio is not a proper measure for slivers. However, it is the most natural and elegant measure for analyzing Delaunay refinement algorithms.

Examples of Using the '-q' Switch

The geometry of our example is a wing of an airplane and a box enclosed it (shown below on the left). The mesh domain is outside the wing and bounded by the box. Hence, there is an internal hole inside this domain. The wing is described in two files: wing.node and wing.poly.

The command line:

tetgen -pq wing
generates the quality mesh (shown below on the right) in three files: wing.1.node, wing.1.ele, and wing.1.face.

The input PLC, 323 points, 618 facets. The quality mesh generated by switches '-pq', 5324 points, 24690 tetrahedra, 5714 boundary faces.

Hint: By adding a '-V' switch into the above command line, TetGen will print a brief quality report on screen.

Default, the radius-edge ratio of each tetrahedron is bounded below 2.0. You can impose a tight bound by adding a number directly after the '-q' switch. Like follows:

tetgen -pq1.2 wing
generates a quality mesh (shown below on the left) which have more points inserted than the mesh created in above.

Another way to refine mesh is to impose a maximum volume constraint on the mesh by adding a number directly after the '-a' switch. The command:

tetgen -pq1.2a0.0001 wing
generates a quality mesh (shown below on the right) which has both radius-edge ratio bounded and maximum volume bounded.
The quality mesh generated by switches '-pq1.2', 11769 points, 59307 tetrahedra, 9632 boundary faces. The quality mesh generated by switches '-pq1.2a0.0001', 34484 points, 186480 tetrahedra, 20900 boundary faces.


Return to TetGen Command line switches page.
Return to TetGen home page.
Hang Si