siconos.io.io_base.MechanicsIO (Python class)

class siconos.io.io_base.MechanicsIO[source]

Bases: object

Constructors

MechanicsIO()

default constructor

contactPoints(NonSmoothDynamicalSystem nsds, int index_set=1) -> array_like (np.float64, 2D)[source]

get the coordinates of all contact points, normals, reactions and velocities

Parameters:
  • nsds – current nonsmooth dynamical system
  • index_set – the index set number.
Returns:

  • a matrix where the columns are mu x y z, nx, ny, nz, rx, ry, rz, vx, vy, vz, ox,
  • oy, oz, id

domains(NonSmoothDynamicalSystem nsds) -> array_like (np.float64, 2D)[source]

get the domain of each contact point

Parameters:nsds – current nonsmooth dynamical system
Returns:a matrix where the columns are domain, id
positions(NonSmoothDynamicalSystem nsds) -> array_like (np.float64, 2D)[source]

get all positions: translation (x,y,z) + orientation quaternion (qw, qx, qy, qz)

Parameters:nsds – current nonsmooth dynamical system
Returns:
  • a SP::SimpleMatrix where the columns are id, x, y, z, qw, qx, qy, qz id is the
  • DynamicalSystem number + 1
velocities(NonSmoothDynamicalSystem nsds) -> array_like (np.float64, 2D)[source]

get all velocities: translation (xdot, ydot, zdot) + orientation velocities ox, oy, oz

Parameters:nsds – current nonsmooth dynamical system
Returns:
  • a matrix where the columns are id, xdot, ydot, zdot, ox, oy, oz id is the
  • DynamicalSystem number + 1