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: 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 to edges[iedge].vertices) its index in vertices.

property 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.

property 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: Reference

inverse reference element

class nutils.element.SimplexReference(ndims)

Bases: Reference

simplex reference

class nutils.element.PointReference

Bases: SimplexReference

0D simplex

class nutils.element.LineReference

Bases: SimplexReference

1D simplex

class nutils.element.TriangleReference

Bases: SimplexReference

2D simplex

class nutils.element.TetrahedronReference

Bases: SimplexReference

3D simplex

class nutils.element.TensorReference(ref1, ref2)

Bases: Reference

tensor reference

class nutils.element.OwnChildReference(baseref)

Bases: Reference

forward self as child

class nutils.element.WithChildrenReference(baseref, child_refs)

Bases: Reference

base reference with explicit children

class nutils.element.MosaicReference(baseref, edge_refs, midpoint)

Bases: Reference

triangulation