itasca.ballarray
Array interface for Itasca balls.
Functions
- itasca.ballarray.create(radii: array float{ball}, centroids: array float{ball, dim}, **kwds) array int{ball} IDs of the newly created balls.
Create balls from two arrays. The first array must contain the radii, and the second array the positions. The arrays must be the correct shape. Additional keyword arguments can be specified which will set the newly created ball attributes. The keyword arguments values can be scalars, vecs or arrays of 1 or two dimensions. The keyword argument props can be used to set ball properties, the value should be a dict of type {str: value}. The keyword argument extra can be used to set extra variables, the value should be a dict of type {int: value}. The props or extra dictionary values can be a 1 or 2 dimensional array of doubles, a number, a vec or a string.
- itasca.ballarray.damp() array float{ball}.
Get a numpy array of the ball local damping.
- itasca.ballarray.density() array float{ball}.
Get a numpy array of the ball density.
- itasca.ballarray.disp() array float{ball,3}.
Get a numpy array of the ball displacement.
- itasca.ballarray.euler() array float{ball,3}.
Get a numpy array of the ball orientation.
- itasca.ballarray.extra(slot: int) array float{ball} or float{ball,3}.
Get the ball extra data in the given slot as an array. Extra variables accessed by array must be of type float or vec.
- itasca.ballarray.fill_damp(data: array float{ball}) None.
Fill an existing array with the ball local damping. The array must be the correct shape.
- itasca.ballarray.fill_density(data: array float{ball}) None.
Fill an existing array with the ball density. The array must be the correct shape.
- itasca.ballarray.fill_disp(data: array float{ball, 3}) None.
Fill an existing array with the ball displacement. The array must be the correct shape.
- itasca.ballarray.fill_euler(data: array float{ball, 3}) None.
Fill an existing array with the ball orientation. The array must be the correct shape.
- itasca.ballarray.fill_force_app(data: array float{ball, 3}) None.
Fill an existing array with the ball applied force. The array must be the correct shape.
- itasca.ballarray.fill_force_contact(data: array float{ball, 3}) None.
Fill an existing array with the ball contact force. The array must be the correct shape.
- itasca.ballarray.fill_force_unbal(data: array float{ball, 3}) None.
Fill an existing array with the ball unbalanced force. The array must be the correct shape.
- itasca.ballarray.fill_mass(data: array float{ball}) None.
Fill an existing array with the inertial ball mass. The array must be the correct shape.
- itasca.ballarray.fill_mass_real(data: array float{ball}) None.
Fill an existing array with the real (gravitational) ball mass. The array must be the correct shape.
- itasca.ballarray.fill_moment_app(data: array float{ball, 3}) None.
Fill an existing array with the ball applied moment. The array must be the correct shape.
- itasca.ballarray.fill_moment_contact(data: array float{ball, 3}) None.
Fill an existing array with the ball contact moment. The array must be the correct shape.
- itasca.ballarray.fill_moment_unbal(data: array float{ball, 3}) None.
Fill an existing array with the ball unbalanced moment. The array must be the correct shape.
- itasca.ballarray.fill_pos(data: array float{ball, 3}) None.
Fill an existing array with the ball centroid location. The array must be the correct shape.
- itasca.ballarray.fill_radius(data: array float{ball}) None.
Fill an existing array with the ball radii. The array must be the correct shape.
- itasca.ballarray.fill_spin(data: array float{ball, 3}) None.
Fill an existing array with the ball angular velocity. The array must be the correct shape.
- itasca.ballarray.fill_vel(data: array float{ball, 3}) None.
Fill an existing array with the ball velocity. The array must be the correct shape.
- itasca.ballarray.force_app() array float{ball,3}.
Get a numpy array of the ball applied force.
- itasca.ballarray.force_contact() array float{ball,3}.
Get a numpy array of the ball contact force.
- itasca.ballarray.force_unbal() array float{ball,3}.
Get a numpy array of the ball unbalanced force.
- itasca.ballarray.ids() array int{ball}.
Get the ball ids as an array.
- itasca.ballarray.in_group(group_name: str, slot=1) array bool{ball}.
Return ball group membership as a Boolean array.
- itasca.ballarray.mass() array float{ball}.
Get a numpy array of the inertial ball mass.
- itasca.ballarray.mass_real() array float{ball}.
Get a numpy array of the real (gravitational) ball mass.
- itasca.ballarray.moment_app() array float{ball,3}.
Get a numpy array of the ball applied moment.
- itasca.ballarray.moment_contact() array float{ball,3}.
Get a numpy array of the ball contact moment.
- itasca.ballarray.moment_unbal() array float{ball,3}.
Get a numpy array of the ball unbalanced moment.
- itasca.ballarray.pos() array float{ball,3}.
Get a numpy array of the ball centroid location.
- itasca.ballarray.radius() array float{ball}.
Get a numpy array of the ball radii.
- itasca.ballarray.set_damp(data: array float{ball}) None.
Set the ball local damping from an array.
- itasca.ballarray.set_density(data: array float{ball}) None.
Set the ball density from an array.
- itasca.ballarray.set_disp(data: array float{ball, 3}) None.
Set the ball displacement from an array.
- itasca.ballarray.set_euler(data: array float{ball, 3}) None.
Set the ball orientation from an array.
- itasca.ballarray.set_extra(slot: int, data: array float{ball} or float{ball, 3}) None.
Set the ball extra data in the given slot with an array. Extra variables set by array must be of type float or vec.
- itasca.ballarray.set_force_app(data: array float{ball, 3}) None.
Set the ball applied force from an array.
- itasca.ballarray.set_force_contact(data: array float{ball, 3}) None.
Set the ball contact force from an array.
- itasca.ballarray.set_group(membership: array bool{ball}, group_name: str, slot=1) None.
Set ball group from an array. Where membership True set the corresponding ball to be a member of group group_name in the given slot.
- itasca.ballarray.set_moment_app(data: array float{ball, 3}) None.
Set the ball applied moment from an array.
- itasca.ballarray.set_moment_contact(data: array float{ball, 3}) None.
Set the ball contact moment from an array.
- itasca.ballarray.set_pos(data: array float{ball, 3}) None.
Set the ball centroid location from an array.
- itasca.ballarray.set_radius(data: array float{ball}) None.
Set the ball radii from an array.
- itasca.ballarray.set_spin(data: array float{ball, 3}) None.
Set the ball angular velocity from an array.
- itasca.ballarray.set_vel(data: array float{ball, 3}) None.
Set the ball velocity from an array.
- itasca.ballarray.spin() array float{ball,3}.
Get a numpy array of the ball angular velocity.
- itasca.ballarray.vel() array float{ball,3}.
Get a numpy array of the ball velocity.
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Dec 19, 2024 |