MapdlDb#
- class ansys.mapdl.core.database.MapdlDb(mapdl)#
Abstract mapdl database class. Created from a
Mapdl
instance.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)
Methods
MapdlDb.clear
(**kwargs)Delete everything in the MAPDL database.
MapdlDb.load
(fname[, progress_bar])Load a MAPDL database file in memory.
MapdlDb.save
(fname[, option])Save the MAPDL database to disk.
MapdlDb.start
([port, timeout])Start the gRPC MAPDL database server.
Shutdown the MAPDL database service and close the connection.
Attributes
Return if the database server is active.
MAPDL database element interface.
MAPDL database nodes interface.