nodes#
- property MapdlDb.nodes#
MAPDL database nodes interface.
- Returns:
Examples
Create a nodes instance.
>>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> # create nodes... >>> nodes = mapdl.db.nodes >>> print(nodes) MAPDL Database Nodes Number of nodes: 270641 Number of selected nodes: 270641 Maximum node number: 270641
>>> mapdl.nsel("NONE") >>> print(nodes) MAPDL Database Nodes Number of nodes: 270641 Number of selected nodes: 0 Maximum node number: 270641
Return the selection status and the coordinates of node 22.
>>> nodes = mapdl.db.nodes >>> sel, coord = nodes.coord(22) >>> coord (1.0, 0.5, 0.0, 0.0, 0.0, 0.0)
Return all the node indices, coordinates, and angles of all the nodes.
>>> nodes = mapdl.db.nodes >>> ind, coords, angles = nodes.all_asarray() >>> ind array([ 1, 2, 3, ..., 270639, 270640, 270641], dtype=int32)
>>> coords array([[0. , 1. , 0. ], [0. , 0. , 0. ], [0. , 0.9875, 0. ], ..., [0.9875, 0.975 , 0.925 ], [0.9875, 0.975 , 0.95 ], [0.9875, 0.975 , 0.975 ]])
>>> angles array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.], ..., [0., 0., 0.], [0., 0., 0.], [0., 0., 0.]])