Node
#
- class ansys.dpf.core.nodes.Node(mesh, nodeid, index, coordinates)#
Encapsulates all properties of a node in the mesh.
A node is created from the
ansys.dpf.core.elements
oransys.dpf.core.meshed_region
class.- Parameters:
mesh (
ansys.dpf.core.meshed_region
class) – Mesh region that the node is contained in.nodeid (int) – ID of the node.
index (int) – Index of the node.
coordinates (list) – List of
[x, y, z]
coordinates for the node.
Examples
>>> import ansys.dpf.core as dpf >>> from ansys.dpf.core import examples >>> model = dpf.Model(examples.find_static_rst()) >>> nodes = model.metadata.meshed_region.nodes
>>> # Initialize a node from a nodes collection >>> node = nodes[0]
Initialize a node from an element.
>>> element = model.metadata.meshed_region.elements[0] >>> node = element.nodes[0]
Overview#
Index of the node. The index starts at 0. |
|
ID of the node. |
|
Cartesian coordinates of the node. |
|
Elements indices connected to the node. |
Return string representation of the node. |
Import detail#
from ansys.dpf.core.nodes import Node
Property detail#
- property Node.index: int#
Index of the node. The index starts at 0.
- property Node.id: int#
ID of the node.
- property Node.coordinates#
Cartesian coordinates of the node.
Examples
>>> import ansys.dpf.core as dpf >>> from ansys.dpf.core import examples >>> model = dpf.Model(examples.find_static_rst()) >>> node = model.metadata.meshed_region.nodes[0] >>> node.coordinates [0.015, 0.045, 0.015]
- property Node.nodal_connectivity#
Elements indices connected to the node.
- Returns:
nodal_connectivity
- Return type:
numpy.array
Method detail#
- Node.__str__()#
Return string representation of the node.