mesh.Mesh.eltype#

property Mesh.eltype#

Return the element type of the Mesh.

Returns#

elements.ElementType

The eltype attribute of the elems attribute.

Examples#

>>> M = Mesh(eltype='tri3')
>>> M.eltype
Tri3
>>> M.eltype = 'line3'
>>> M.eltype
Line3
>>> print(M)
Mesh: n_nodes: 3, n_elems: 1, plexitude: 3, level: 1, eltype: line3
BBox: [0.  0.  0.], [1.  1.  0.]
Size: [1.  1.  0.]
Length: 1.0

One cannot set an element type with nonmatching plexitude:

>>> M.eltype = 'quad4'
Traceback (most recent call last):
...
h...InvalidElementType: Data plexitude (3) != eltype plexitude (4)