File io/src/mechanics/MechanicsIO.hpp#
Go to the source code of this file
-
class MechanicsIO
Public Functions
-
inline MechanicsIO()
default constructor
-
SP::SimpleMatrix positions(const NonSmoothDynamicalSystem &nsds) const
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
-
SP::SimpleMatrix velocities(const NonSmoothDynamicalSystem &nsds) const
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
-
SP::SimpleMatrix contactPoints(const NonSmoothDynamicalSystem &nsds, unsigned int index_set = 1) const
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
-
SP::SimpleMatrix contactInfo(const NonSmoothDynamicalSystem &nsds, unsigned int index_set = 1) const
get the contact information that is the ds linked by the interaction
- Parameters:
nsds – current nonsmooth dynamical system
index_set – the index set number.
- Returns:
a matrix where the columns are interaction id, ds1 number, ds2 number, static object number (if possible)
-
SP::SimpleMatrix contactContactWork(const NonSmoothDynamicalSystem &nsds, unsigned int index_set = 1, double omega = 0.5) const
get the dissipation values of all contact points
- Parameters:
nsds – current nonsmooth dynamical system
index_set – the index set number.
omega – the value of the weigth for the weight in the computaion of the contact work by default omega =1/2 and the contact work corresponds to the theoretical formula 1/2 (v^+ + v^-)^\top p otherwise it corresponds to v_{k+omega} p
tol – double for the computation of contact status
- Returns:
a matrix where the columns are id, normal contact work, tangent contact work, friction dissipation, contact status
-
SP::SimpleMatrix domains(const NonSmoothDynamicalSystem &nsds) const
get the domain of each contact point
- Parameters:
nsds – current nonsmooth dynamical system
- Returns:
a matrix where the columns are domain, id
-
inline MechanicsIO()