-r: Reconstructs/refines a mesh

The -r switch reconstructs a previously generated mesh. The mesh is read from a .node and an .ele file, and possibly a .face file. If a .face file exists, it is read and used to constrain subfaces in the mesh, else, TetGen will automatically identify the subfaces, internal subfaces are also identified by comparing the attributes of two adjacent tetrahedra. Subsegments will be automatically identified from the existing subfaces. The reconstructed mesh is distinguished from its origin with a different iteration number.

For example, ``tetgen -r xxx.1'' reads the mesh in files xxx.1.node, xxx.1.ele and possibly xxx.1.face and xxx.1.edge if they exist; reconstructs the mesh; outputs it into three files xxx.2.node, xxx.2.ele and xxx.2.face. Now, you can give xxx.2 as input in the above command, you will get another mesh saved files xxx.3.node, and so on. Mesh iteration numbers allows you to create a sequence of successively finer meshes. They also allow you to produce a sequence of meshes using error estimate-driven mesh refinement.

You can refine a mesh by combining -r with -q, -a, and -i switches. Several ways are possible:

-r is not compatible with -p and -I, don't try to use them together.


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