File kernel/src/modelingTools/Lagrangian2d2DR.hpp¶
Go to the source code of this file
-
class Lagrangian2d2DR : public LagrangianScleronomousR
- #include <>
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 Lagrangian2d2DR()
constructorx
-
virtual ~Lagrangian2d2DR() noexcept = default
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.
-
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(Lagrangian2d2DR)¶
-
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
-
inline Lagrangian2d2DR()