element¶
The element module defines reference elements such as the
LineReference
and TriangleReference
, but also more exotic
objects like the MosaicReference
. A set of (interconnected) elements
together form a nutils.topology.Topology
. Elements have edges and
children (for refinement), which are in turn elements and map onto self by an
affine transformation. They also have a well defined reference coordinate
system, and provide pointsets for purposes of integration and sampling.
-
class
nutils.element.
Reference
(ndims)¶ Bases:
nutils.types.Singleton
Reference element.
-
vertices
¶ Array of shape
nverts x ndims
that defines the coordinates of the element’s vertices.
-
edge_vertices
¶ Sequence of integer arrays that specifies per edge (outer sequence, corresponding to
edges
) for each vertex (inner sequence, corresponding toedges[iedge].vertices
) its index invertices
.
-
simplices
¶ Partition of the element consisting of simplices.
The simplices attribute is a sequence of integer arrays that specify per simplex the indices of the vertices in
vertices
.
-
simplex_transforms
¶ Sequence of transforms from simplex to parent element.
The simplex_transforms attribute is a sequence of objects of type
nutils.transform.TransformItem
that provide per simplex the coordinate mapping from the simplex to the parent element. The origin of the simplex-local coordinate system maps to its first vertex, the first unit vector to the second, the second to the third, and so on.
-
__mul__
(self, other)¶ Return
self*other
.
-
trim
(self, levels, maxrefine, ndivisions)¶ trim element along levelset
-
-
class
nutils.element.
EmptyLike
(baseref)¶ Bases:
nutils.element.Reference
inverse reference element
-
class
nutils.element.
SimplexReference
(ndims)¶ Bases:
nutils.element.Reference
simplex reference
-
class
nutils.element.
PointReference
¶ Bases:
nutils.element.SimplexReference
0D simplex
-
class
nutils.element.
LineReference
¶ Bases:
nutils.element.SimplexReference
1D simplex
-
class
nutils.element.
TriangleReference
¶ Bases:
nutils.element.SimplexReference
2D simplex
-
class
nutils.element.
TetrahedronReference
¶ Bases:
nutils.element.SimplexReference
3D simplex
-
class
nutils.element.
TensorReference
(ref1, ref2)¶ Bases:
nutils.element.Reference
tensor reference
-
class
nutils.element.
OwnChildReference
(baseref)¶ Bases:
nutils.element.Reference
forward self as child
-
class
nutils.element.
WithChildrenReference
(baseref, child_refs)¶ Bases:
nutils.element.Reference
base reference with explicit children
-
class
nutils.element.
MosaicReference
(baseref, edge_refs, midpoint)¶ Bases:
nutils.element.Reference
triangulation