File kernel/src/modelingTools/NewtonEulerFrom1DLocalFrameR.hpp

Go to the source code of this file

class NewtonEulerFrom1DLocalFrameR : public NewtonEulerR
#include <NewtonEulerFrom1DLocalFrameR.hpp>

NewtonEulerFrom1DLocalFrameR.

This class is an interface for a relation with impact. It implements the computation of the jacoboian of h from the points of contacts and the normal. Use this class consists in overloading the method computeh, by setting the member pc1, pc2, nc and y. The matrix jachq is used both for the building of the OSNSP (with T) and for the predictor of activation of deactivation of the Interaction.

Subclassed by NewtonEulerFrom3DLocalFrameR

Public Functions

NewtonEulerFrom1DLocalFrameR()

constructorx

virtual ~NewtonEulerFrom1DLocalFrameR()

destructor

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

to compute y = h(q,v,t) using plug-in mechanism

Parameters
  • time: current time
  • q0: the position
  • y: the output

virtual void computeJachq(double time, Interaction &inter, SP::BlockVector q0)

compute the jacobian of h w.r.t.

q

Parameters
  • time: current time
  • inter: the interaction using this relation
  • q0: the container of the block vector to the dynamical system

virtual void computeJachqT(Interaction &inter, SP::BlockVector q0)
double distance() const

Return the distance between pc1 and pc, with sign according to normal.

virtual void initialize(Interaction &inter)

initialize components specific to derived classes.

Parameters

SP::SiconosVector nc() const
SP::SiconosVector pc1() const
SP::SiconosVector pc2() const
SP::SiconosVector relNc() const
SP::SiconosVector relPc1() const
SP::SiconosVector relPc2() const
void setRelNc(SP::SiconosVector nnc)

Set the coordinates of inside normal vector at the contact point in ds2 frame.

It will be used to compute _Nc during computeh().

Parameters
  • nnc: new coordinates

void setRelPc1(SP::SiconosVector npc)

Set the coordinates of first contact point in ds1 frame.

It will be used to compute _Pc1 during computeh().

Parameters
  • npc: new coordinates

void setRelPc2(SP::SiconosVector npc)

Set the coordinates of second contact point in ds2 frame It will be used to compute _Pc2 during computeh().

Parameters
  • npc: new coordinates

Public Members

bool _isOnContact

V.A.

boolean _isOnCOntact ?? Why is it public members ? seems parametrize the projection algorithm the projection is done on the surface \(y=0\) or on \(y \geq 0\)

Protected Functions

ACCEPT_SERIALIZATION(NewtonEulerFrom1DLocalFrameR)

serialization hooks

void setnc(SP::SiconosVector nnc)

Set the coordinates of inside normal vector at the contact point.

Must only be done in a computeh() override.

Parameters
  • nnc: new coordinates

void setpc1(SP::SiconosVector npc)

Set the coordinates of first contact point.

Must only be done in a computeh() override.

Parameters
  • npc: new coordinates

void setpc2(SP::SiconosVector npc)

Set the coordinates of second contact point.

Must only be done in a computeh() override.

Parameters
  • npc: new coordinates

Protected Attributes

SP::SimpleMatrix _AUX1
SP::SimpleMatrix _AUX2
SP::SiconosVector _Nc
SP::SimpleMatrix _NPG1
SP::SimpleMatrix _NPG2
SP::SiconosVector _Pc1
SP::SiconosVector _Pc2
SP::SiconosVector _relNc
SP::SiconosVector _relPc1
SP::SiconosVector _relPc2
SP::SimpleMatrix _RotationAbsToContactFrame
SP::SimpleMatrix _rotationMatrixAbsToBody

Private Functions

void NIcomputeJachqTFromContacts(SP::SiconosVector q1)
void NIcomputeJachqTFromContacts(SP::SiconosVector q1, SP::SiconosVector q2)