The -a switch can be used to control both global and local mesh size. It imposes a maximum volume constraint on all tetrahedra. If a number follows the 'a', no tetrahedra is generated whose volume is larger than that number.
If no number is specified and the -r switch is not used, file .poly or .smesh specifies a set of maximum volume constraints. A .poly file or .smesh file can optionally contain a volume constraint for each facet-bounded region, thereby controlling tetrahedra densities in a tetrahedralization of a PLC.
You can impose both a fixed volume constraint and a varying volume constraint by invoking the -a switch twice, once with and once without a number following. Each volume specified may include a decimal point.
If no number is specified and -r switch is used, a .vol file is expected, which contains a separate volume constraint for each tetrahedron, and is useful for refining a finite element or finite volume mesh based on a posteriori error estimates.
Examples of Using the '-a' Switch
The geometry of this example is a rectangular bar shown below. In
additional, it has two boundary markers (-1 and -2) and two regions
(-10 and -20) defined as shown in the below picture. The source file
is bar2.poly
.
The command line:
tetgen -pa0.01 bar2generates a mesh (shown below on the left) that no tetrahedron has volume larger than 0.01.
While the command line:
tetgen -pa bar2generates a mesh (shown below on the right) which has different densities in two defined regions.
The quality mesh generated by switches '-a0.01', 2063 points, 9414 tetrahedra, 2332 boundary faces. | The quality mesh generated by switches '-a', 590 points, 2551 tetrahedra, 778 boundary faces. |