TetGenLink`
TetGenLink`

TetGenTetrahedralize

TetGenTetrahedralize[expr,settings]

tetrahedralizes a TetGen expression using settings and returns the result in a new TetGen expression.

Details

  • To use TetGenTetrahedralize, you first need to load it using Needs["TetGenLink`"].
  • The settings given to TetGenTetrahedralize are a string of different commands:
  • "p"tetrahedralize a piecewise linear complex (PLC)
    "q"quality mesh generation; a minimum radius-edge ratio may be specified (default 2.0)
    "a"apply a maximum tetrahedron volume constraint
    "A"assign attributes to identify tetrahedra in certain regions
    "r"reconstruct/refine a previously generated mesh
    "Y"suppress splitting of boundary facets/segments
    "YY"suppress splitting of exterior and interior boundary facets/segments
    "i"insert a list of additional points into mesh
    "M"do not merge coplanar facets
    "T"set a tolerance for coplanar test (default )
    "d"detect intersections of PLC facets
    "o2"generate second-order subparametric elements
    "C"check the consistency of the final mesh
    "Q"quiet: no terminal output except error
  • An empty string " " given to TetGenTetrahedralize creates a Delaunay tetrahedralization.
  • TetGenTetrahedralize has the following options:
  • "TetrahedronRefinement"Nonefunction to refine a tetrahedron

Examples

open allclose all

Basic Examples  (1)

First, load the package:

This creates an instance of a TetGen expression:

This sets up points and facets to use:

This sets the points and facets in the TetGen instance:

This carries out the tetrahedralization, returning a new TetGen instance:

This extracts the points and faces from the tetrahedralization:

This plots the faces:

Set the "r" string in place of "p" to refine an existing TetGen instance:

This extracts the points and faces from the tetrahedralization:

This plots the faces:

Options  (1)

"TetrahedronRefinement"  (1)

First, load the package:

This creates an instance of a TetGen expression:

This sets up points and facets to use:

This sets the points and facets in the TetGen instance:

This carries out the tetrahedralization, returning a new TetGen instance:

This extracts the points and faces from the tetrahedralization:

This plots the faces:

This sets up a compiled function that returns True if a tetrahedron should be refined and False otherwise:

This carries out the tetrahedralization with the refinement function, returning a new TetGen instance:

In this case the "p" string is used as the refinement operates on the initial TetGen instance.

This extracts the points and faces from the tetrahedralization:

This plots the faces:

Refine the already tetrahedralized TetGen instance:

In this case the "r" string is used as the refinement operates on an already tetrahedralized TetGen instance.

This extracts the points and faces from the tetrahedralization:

This plots the faces:

Possible Issues  (1)

Refinement of an already tetrahedralized TetGen instance needs to be done with the "r" string.

First, load the package:

Set up and tetrahedralize an initial TetGen instance:

Inspect the number of tetrahedra in the tetrahedralized instance:

Tetrahedralization of an already tetrahedralized TetGen instance as a piecewise linear complex (PLC) does not work. No new elements are generated:

Refinement of an already tetrahedralized TetGen instance needs to be done with the "r" string: