File kernel/src/modelingTools/Lagrangian2d3DR.hpp#

Go to the source code of this file

class Lagrangian2d3DR : public LagrangianScleronomousR
#include <Lagrangian2d3DR.hpp>

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

inline Lagrangian2d3DR()

constructor

inline virtual ~Lagrangian2d3DR() noexcept

destructor

virtual void initialize(Interaction &inter) override

initialize the relation (check sizes, memory allocation …)

Parameters:

inter – the interaction using this relation

virtual void computeh(const BlockVector &q, BlockVector &z, SiconosVector &y) override

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

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

  • z – user defined parameters (optional)

  • y – the resulting vector

virtual void computeJachq(const BlockVector &q, BlockVector &z) override

to compute the jacobian of h(…).

Set attribute _jachq (access: jacqhq())

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

  • z – user defined parameters (optional)

double distance() const

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

inline SP::SiconosVector pc1() const#
inline SP::SiconosVector pc2() const#
inline SP::SiconosVector nc() const#
inline SP::SiconosVector relNc() const#
inline 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

virtual void display() const override

main relation members display

ACCEPT_STD_VISITORS()#

Public Members

bool _isOnContact = false

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(Lagrangian2d3DR)#
inline void setpc1(SP::SiconosVector npc)#

Set the coordinates of first contact point.

Must only be done in a computeh() override.

Parameters:

npc – new coordinates

inline void setpc2(SP::SiconosVector npc)#

Set the coordinates of second contact point.

Must only be done in a computeh() override.

Parameters:

npc – new coordinates

inline 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

Protected Attributes

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