File io/src/mechanics/MechanicsIO.hpp

Go to the source code of this file

class MechanicsIO

Public Functions

MechanicsIO()

default constructor

SP::SimpleMatrix contactPoints(const NonSmoothDynamicalSystem &nsds, unsigned int index_set = 1) const

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

Return
a matrix where the columns are mu x y z, nx, ny, nz, rx, ry, rz, vx, vy, vz, ox, oy, oz, id
Parameters
  • nsds: current nonsmooth dynamical system
  • index_set: the index set number.

SP::SimpleMatrix domains(const NonSmoothDynamicalSystem &nsds) const

get the domain of each contact point

Return
a matrix where the columns are domain, id
Parameters
  • nsds: current nonsmooth dynamical system

SP::SimpleMatrix positions(const NonSmoothDynamicalSystem &nsds) const

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

Return
a SP::SimpleMatrix where the columns are id, x, y, z, qw, qx, qy, qz id is the DynamicalSystem number + 1
Parameters
  • nsds: current nonsmooth dynamical system

SP::SimpleMatrix velocities(const NonSmoothDynamicalSystem &nsds) const

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

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

Protected Functions

template <typename T, typename G>
SP::SiconosVector visitAllVerticesForDouble(const G &graph) const
template <typename T, typename G>
SP::SimpleMatrix visitAllVerticesForVector(const G &graph) const