Class LagrangianCompliantR#
Defined in Program listing for file kernel/src/modelingTools/LagrangianCompliantR.hpp
-
class LagrangianCompliantR : public LagrangianR#
Lagrangian Compliant Relation: Scleronomous, Non-Holonomic (function of lambda)
\( Y[0] = y = h(q,\lambda(t),z) \)
\( Y[1] = \dot y = G0(q,\lambda(t),z)\dot q + G1((q,\lambda(t),z)\dot\lambda(t) \)
\( p = G0^t(q,\lambda(t),z)\lambda(t) \)
with \( G0(q,\lambda(t),z) = \nabla_q h(q,\lambda(t),z) \)
\( G1(q,\lambda(t),z) = \nabla_{\lambda}h(q,\lambda(t),z) \)
h, G0 and G1 are connected to user-defined functions.
Public Functions
-
LagrangianCompliantR(const std::string &pluginh, const std::string &pluginJacobianhq, const std::string &pluginJacobianhlambda)#
constructor from a set of data
- Parameters:
pluginh – the name of the plugin to compute h
pluginJacobianhq – the name of the plugin to compute the gradient of h w.r.t q
pluginJacobianhlambda – the name of the plugin to compute the gradient of h w.r.t \( \lambda \)
-
virtual ~LagrangianCompliantR() noexcept = default#
destructor
-
virtual void computeh(double time, const BlockVector &q, const SiconosVector &lambda, BlockVector &z, SiconosVector &y)#
to compute the output y = h(q,z) of the Relation
- Parameters:
time – current time value
q – coordinates of the dynamical systems involved in the relation
lambda – interaction \( \lambda \) vector
z – user defined parameters (optional)
y – the resulting vector
-
virtual void computeJachq(double time, const BlockVector &q, const SiconosVector &lambda, BlockVector &z)#
to compute the jacobian of h(…).
Set attribute _jachq (access: jacqhq())
- Parameters:
time – current time value
q – coordinates of the dynamical systems involved in the relation
lambda – interaction \( \lambda \) vector
z – user defined parameters (optional)
-
virtual void computeJachlambda(double time, const BlockVector &q0, const SiconosVector &lambda, BlockVector &z)#
compute the jacobian of h w.r.t.
\( \lambda \) . Set attribute _jachlambda (access: jacqhlambda())
- Parameters:
time – current time value
q – coordinates of the dynamical systems involved in the relation
lambda – interaction \( \lambda \) vector
z – user defined parameters
-
virtual void computeOutput(double time, Interaction &inter, unsigned int derivativeNumber = 0) override#
to compute output
- Parameters:
time – the current time
inter – the Interaction owning y
derivativeNumber – the number of the derivative to compute, optional, default = 0.
-
virtual void computeInput(double time, Interaction &inter, unsigned int level = 0) override#
to compute the input
- Parameters:
time – the current time
inter – the Interaction owning lambda
level – “derivative” order of lambda used to compute input
-
virtual void computeJach(double time, Interaction &inter) override#
compute all the H Jacobian
-
inline virtual void computeJacg(double time, Interaction &inter) override#
compute all the G Jacobian
-
LagrangianCompliantR(const std::string &pluginh, const std::string &pluginJacobianhq, const std::string &pluginJacobianhlambda)#