TetGenLink`
TetGenLink`

TetGenSetTetrahedraVolumes

TetGenSetTetrahedraVolumes[expr,volumes]

constrains tetrahedra volumes for refinement.

Details

  • To use TetGenSetTetrahedraVolumes, you first need to load it using Needs["TetGenLink`"].
  • TetGenSetTetrahedraVolumes constrains the tetrahedra volume in a refinement of a TetGen instance.

Examples

Basic Examples  (1)

To use TetGenLink, it must first be loaded:

You start by specifying the coordinates and displaying them:

Then you create the input instance and set the points:

Next, the list of facets is created:

Set the facets in the input instance of TetGen:

Tetrahedralize the input with an area constraint:

To extract the faces and visualize them, you use TetGenGetFaces:

To compute the volume of each of the tetrahedra of the object, you write a support function first:

The volume of each tetrahedron can then be computed in the following manner:

The total volume can then be computed:

To refine some tetrahedra, choose a selection of coordinates. For example, all coordinates where the component is larger than 0.7:

The refinement elements are then found:

The tetrahedra that should keep their volume during refinement are the complement of all tetrahedra and the tetrahedra selected for refinement:

Each tetrahedron that is to be refined gets a new volume assigned. Those tetrahedra that should remain unchanged are assigned a :

Set a TetGen instance with the new tetrahedra volumes:

By specifying the string "r", the TetGen instance is refined. The string "a" implies that volume constraints are to be fulfilled:

To extract the refined faces and visualize them, you use TetGenGetFaces: