sdynpy.core.sdynpy_coordinate.coordinate_array
- coordinate_array(node=None, direction=None, structured_array=None, string_array=None, force_broadcast=False)[source]
Creates a coordinate array that specify degrees of freedom.
Creates an array of coordinates that specify degrees of freedom in a test or analysis. Coordinate arrays can be created using a numpy structured array or two arrays for node and direction. Multidimensional arrays can be used.
- Parameters
node (ndarray) – Integer array corresponding to the node ids of the coordinates. Input will be cast to an integer (i.e. 2.0 -> 2, 1.9 -> 1)
direction (ndarray) – Direction corresponding to the coordinate. If a string is passed, it must consist of a direction (RX, RY, RZ, X, Y, Z) and whether or not it is positive or negative (+ or -). If no positive or negative value is given, then positive will be assumed.
structured_array (ndarray (structured)) – Alternatively to node and direction, a single numpy structured array can be passed, which should have names [‘node’,’direction’]
string_array (ndarray) – Alternatively to node and direction, a single numpy string array can be passed into the function, which will be parsed to create the data.
force_broadcast (bool, optional) – Return all combinations of nodes and directions regardless of their shapes. This will return a flattened array
- Returns
coordinate_array
- Return type