Class Lagrangian2d1DR#

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

class Lagrangian2d1DR : public LagrangianScleronomousR#

Lagrangian2d1DR.

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 Lagrangian2d1DR()#

constructorx

inline virtual ~Lagrangian2d1DR() 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 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

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