TriangleLink`
TriangleLink`

TriangleGetElementAttributes

TriangleGetElementAttributes[expr]

gets the element attributes in a Triangle expression.

Details and Options

  • To use TriangleGetElementAttributes, you first need to load it using Needs["TriangleLink`"].
  • TriangleGetElementAttributes returns attributes that are stored in a TriangleExpression.
  • TriangleGetElementAttributes needs the "A" switch to be set during the call to TriangleTriangulate.

Examples

Basic Examples  (1)

First, load the package:

This creates an instance of a Triangle expression:

This sets up points and segments to use:

This sets the points and facets in the Triangle instance:

This sets up variables that specify a point within a material domain, as well as a region attribute and a region constraint:

The material variables are set in the Triangle instance:

This carries out the triangulation, returning a new Triangle instance:

This extracts the points and elements from the triangulation:

With the following support function, you can visualize the triangles:

Each element now carries the material attribute: