Class Lagrangian2d3DR

Defined in Program listing for file kernel/src/modelingTools/Lagrangian2d3DR.hpp

class Lagrangian2d3DR : public LagrangianScleronomousR

Lagrangian2d3DR.

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.

Public Functions

Lagrangian2d3DR()

constructorx

virtual ~Lagrangian2d3DR()

destructor

virtual void computeh(SiconosVector &q, SiconosVector &z, SiconosVector &y)

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

Parameters

virtual void computeJachq(SiconosVector &q, SiconosVector &z)

to compute the jacobian of h using plug-in mechanism.

Index shows which jacobian is computed

Parameters

void display() const

main relation members display

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
  • inter: the interaction using this relation

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\)