TetGenSetTetrahedraVolumes


constrains tetrahedra volumes for refinement.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

To use TetGenLink, it must first be loaded:

In[1]:=
Click for copyable input

You start by specifying the coordinates and displaying them:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Then you create the input instance and set the points:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Next, the list of facets is created:

In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]=

Set the facets in the input instance of TetGen:

In[8]:=
Click for copyable input
Out[8]=

Tetrahedralize the input with an area constraint:

In[9]:=
Click for copyable input
Out[9]=

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

In[10]:=
Click for copyable input
In[11]:=
Click for copyable input
Out[11]=

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

In[12]:=
Click for copyable input

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

In[13]:=
Click for copyable input
Out[13]//Short=

The total volume can then be computed:

In[14]:=
Click for copyable input
Out[14]=

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

In[15]:=
Click for copyable input
Out[15]=

The refinement elements are then found:

In[16]:=
Click for copyable input
Out[16]=

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

In[17]:=
Click for copyable input

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

In[18]:=
Click for copyable input

Set a TetGen instance with the new tetrahedra volumes:

In[19]:=
Click for copyable input
Out[19]=

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

In[20]:=
Click for copyable input
Out[20]=

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

In[21]:=
Click for copyable input
In[22]:=
Click for copyable input
Out[22]=