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 NewtonEulerFrom1DLocalFrameR

Public Functions

virtual ~NewtonEulerR()

destructor

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.

Return
SP::SimpleMatrix

virtual SP::SimpleMatrix C() const

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.

Return
SP::SimpleMatrix

virtual void checkSize(Interaction &inter)

check sizes of the relation specific operators.

Parameters

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

to compute y = h(q,v,t) using plug-in mechanism

Parameters
  • time: current time
  • q0: the position
  • y: the output

virtual void computeInput(double time, Interaction &inter, unsigned int level = 0)

to compute the input

Parameters
  • time: current time
  • inter: the interaction using this relation
  • level: number of the derivative to compute, optional, default = 0.

virtual void computeJacg(double time, Interaction &inter)

compute all the jacobian of g

Parameters
  • time: current time
  • inter: the interaction using this relation

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

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

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 computeJach(double time, Interaction &inter)

compute all the jacobian of h

Parameters
  • time: current time
  • inter: the interaction using this relation

virtual void computeJachlambda(double time, Interaction &inter)

default function to compute jacobianH

Parameters
  • time: current time
  • inter: the interaction using this relation

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

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

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

to compute output

Parameters
  • time: current time
  • inter: the interaction using this relation
  • derivativeNumber: number of the derivative to compute, optional, default = 0.

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)

SP::SiconosVector contactForce() const

A buffer containing the forces due to this.

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

Return
SP::SiconosVector

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.

Return
SP::SimpleMatrix

virtual void initialize(Interaction &inter)

initialize components specific to derived classes.

Parameters

SP::SimpleMatrix jachq() const

get a pointer on matrix Jach[index]

Return
a pointer on a SimpleMatrix

void setJachqPtr(SP::SimpleMatrix newPtr)

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

Parameters
  • newPtr: the new matrix

Public Members

SP::PluggedObject _plugindotjacqh

Plugin object for the timederivative 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 \)