sdynpy.core.sdynpy_coordinate.from_nodelist

from_nodelist(nodes, directions=[1, 2, 3], flatten=True)

Returns a coordinate array with a set of nodes with a set of directions

Parameters
  • nodes (iterable) – A list of nodes to create degrees of freedom at

  • directions (iterable, optional) – A list of directions to create for each node. The default is [1,2,3], which provides the three positive translations (X+, Y+, Z+).

  • flatten (bool, optional) – Specifies that the array should be flattened prior to output. The default is True. If False, the output will have a dimension one larger than the input node list due to the added direction dimension.

Returns

coordinate_array – Array of coordinates with each specified direction defined at each node. If flatten is false, this array will have shape nodes.shape + directions.shape. Otherwise, this array will have shape (nodes.size*directions.size,)

Return type

CoordinateArray