Class JointStopR#

Defined in Program listing for file mechanics/src/joints/JointStopR.hpp

class JointStopR : public NewtonEulerR#

This class implements a stop on a DoF for any NewtonEulerJointR.

Public Functions

JointStopR(SP::NewtonEulerJointR joint, double pos, bool dir, unsigned int axis = 0)#

Initialize a joint stop for a common case: a single axis with a single stop, either positive or negative.

For use with NewtonImpactNSL.

JointStopR(SP::NewtonEulerJointR joint, SP::SiconosVector pos, SP::SiconosVector dir, SP::UnsignedIntVector axes)#

Initialize a multidimensional joint stop, e.g.

the cone stop on a ball joint. For use with NewtonImpactFrictionNSL size 2 or 3.

virtual void computeh(double time, const BlockVector &q0, SiconosVector &y)#

to compute the output y = h(t,q,z) of the Relation

Parameters:
  • time – current time value

  • q – coordinates of the dynamical systems involved in the relation

  • y – the resulting vector

inline unsigned int axis(unsigned int _index)#

Return the joint axis number assigned to a stop index.

inline double position(unsigned int _index)#

Return the joint position assigned to a stop index.

inline double direction(unsigned int _index)#

Return the direction (1 or -1) assigned to a stop index.

inline SP::NewtonEulerJointR joint()#

Return the joint assigned to this joint stop relation.

inline unsigned int numberOfAxes()#

Return the number of joint axes indexed by this relation.

inline virtual ~JointStopR()#

destructor