DbElems#

class ansys.mapdl.core.database.elems.DbElems(db)#

Abstract mapdl database element class.

Examples

Create a MAPDL database element instance.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> elems = mapdl.db.elems
>>> print(elems)
MAPDL Database Elements
    Number of elements:          64
    Number of selected elements: 64
    Maximum element number:      64

Return the element information of element 1.

>>> elems = mapdl.db.elems
>>> elem_info = elems.get(1)

Return the nodes belonging to the element.

>>> elem_info.nodes
[2, 27, 37, 8]

Return the element data.

>>> elem_info.elmdat
[1, 1, 1, 1, 0, 0, 14, 0, 0, 0]

Methods

DbElems.first([ielm])

Get the number of the first element.

DbElems.get(ielm)

Get element attributes and nodes.

DbElems.info(ielm, ikey)

Get information about a element

DbElems.next()

Return the number of the next selected element.

DbElems.num([selected])

Number of elements.

DbElems.push(ielm, elmdat, nodes)

Push an element into the database.

Attributes

DbElems.max_num

Maximum element number.