Class NewtonEulerR#

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

class NewtonEulerR : public Relation#

NewtonEuler (Non Linear) Relation (generic interface)

Relations for NewtonEuler Dynamical Systems. This class is only an interface for specific (Linear, Scleronomous …) NewtonEuler Relations (see derived classes).

Class name = type+subType.

If y = h(…), all the gradients of are handled by G object. For example, G[0] = \( \nabla_q h(q,...) \).

In corresponding derived classes, h and Gi are connected to plug-in functions (user-defined). For more details, see the DevNotes.pdf, chapter NewtonEuler.

Subclassed by NewtonEuler1DR

Public Functions

inline NewtonEulerR()#

Default constructor.

inline virtual ~NewtonEulerR()#

destructor

inline SP::SimpleMatrix jachq() const#

get a pointer on matrix Jach[index]

Returns:

a pointer on a SimpleMatrix

void setJachqPtr(SP::SimpleMatrix newPtr)#

set Jach[index] to pointer newPtr (pointer link)

Parameters:

newPtr – the new matrix

virtual void initialize(Interaction &inter) override#

initialize components specific to derived classes.

Parameters:

interInteraction associated with the Relation

virtual void checkSize(Interaction &inter) override#

check sizes of the relation specific operators.

Parameters:

inter – an Interaction using this relation

virtual void computeh(double time, const BlockVector &q0, SiconosVector &y)#

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

Parameters:
  • time – current time value

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

  • y – the resulting vector

inline virtual void computeJachlambda(double time, Interaction &inter)#

default function to compute jacobianH

Parameters:
  • time – current time

  • inter – the interaction using this relation

inline virtual void computeJachq(double time, Interaction &inter, SP::BlockVector q0)#

compute the jacobian of h w.r.t.

q

Parameters:
  • time – current time

  • inter – the interaction using this relation

  • q0 – the container of the block vector to the dynamical system

inline virtual void computeJachqDot(double time, Interaction &inter)#

compute the jacobian of h w.r.t.

\( \dot{q} \)

Parameters:
  • time – current time

  • inter – the interaction using this relation

inline virtual void computeJacglambda(double time, Interaction &inter)#

compute the jacobian of h w.r.t.

\( \dot{q} \)

Parameters:
  • time – current time

  • inter – the interaction using this relation

inline virtual void computeJacgq(double time, Interaction &inter)#

compute the jacobian of h w.r.t.

\( \dot{q} \)

Parameters:
  • time – current time

  • inter – the interaction using this relation

inline virtual void computeJacgqDot(double time, Interaction &inter)#

compute the jacobian of h w.r.t.

\( \dot{q} \)

Parameters:
  • time – current time

  • inter – the interaction using this relation

virtual void computeJachqT(Interaction &inter, SP::BlockVector q0)#

default implementation consists in multiplying jachq and T in this implementation we use _T which is consitent which directly computed with computeT(q) when q is given this one in more consistent with the notion of function of q

Parameters:
  • inter – interaction that owns the relation

  • q0 – the block vector to the dynamical system position

virtual void computeJach(double time, Interaction &inter) override#

compute all the jacobian of h

Parameters:
  • time – current time

  • inter – the interaction using this relation

inline virtual void computeJacg(double time, Interaction &inter) override#

compute all the jacobian of g

Parameters:
  • time – current time

  • inter – the interaction using this relation

void computeSecondOrderTimeDerivativeTerms(double time, Interaction &inter, VectorOfBlockVectors &DSlink, SP::DynamicalSystem ds1, SP::DynamicalSystem ds2)#

To compute the terms of the second order time derivative of y \( \nabla_q h(q) \dot T v + \frac{d}{dt}(\nabla_q h(q) ) T v \).

Parameters:
  • time – current time

  • inter – interaction that owns the relation

  • DSlink – the container of the link to DynamicalSystem attributes

  • ds1 – dynamical system linked to this interaction (source)

  • ds2 – second ds linked to this interaction (target). If there is only one ds in the inter, call this function with …, ds, ds)

virtual void computeOutput(double time, Interaction &inter, unsigned int derivativeNumber = 0) override#

to compute output

Parameters:
  • time – current time

  • inter – the interaction using this relation

  • derivativeNumber – 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 – current time

  • inter – the interaction using this relation

  • level – number of the derivative to compute, optional, default = 0.

inline virtual SP::SimpleMatrix C() const override#

return a SP on the C matrix.

The matrix C in the linear case, else it returns Jacobian of the output with respect to x.

inline virtual SP::SimpleMatrix D() const#

return a SP on the D matrix.

The matrix D in the linear case, else it returns Jacobian of the output with respect to lambda.

inline virtual SP::SimpleMatrix B() const#

return a SP on the B matrix.

The matrix B in the linear case, else it returns Jacobian of the input with respect to lambda.

inline SP::SiconosVector contactForce() const#

A buffer containing the forces due to this.

It is an output unused for the computation. Fix : is it usefull ?

Returns:

SP::SiconosVector

inline virtual void display() const override#

main relation members display

Public Members

SP::PluggedObject _plugindotjacqh#

Plugin object for the time—derivative of Jacobian i.e.

\( \frac{d}{dt} \nabla^T_{q} h(t,q,\dot q,\ldots) \) stored in _dotjachq

SP::SiconosVector _secondOrderTimeDerivativeTerms#

the additional terms of the second order time derivative of y

\( \nabla_q h(q) \dot T v + \frac{d}{dt}(\nabla_q h(q) ) T v \)