# siconos.kernel.NewtonEulerR (Python class)¶

class siconos.kernel.NewtonEulerR(*args)[source]

Bases: siconos.kernel.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.

Generated class (swig), based on C++ header Program listing for file kernel/src/modelingTools/NewtonEulerR.hpp.

Constructors

NewtonEulerR()
Attributes: _plugindotjacqh (PluggedObject) – 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 _secondOrderTimeDerivativeTerms (array_like (np.float64, 1D)) – 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$$
B() -> array_like (np.float64, 2D)[source]

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.

Returns: SP::SimpleMatrix
C() -> array_like (np.float64, 2D)[source]

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.

Returns: SP::SimpleMatrix
D() -> array_like (np.float64, 2D)[source]

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.

Returns: SP::SimpleMatrix
checkSize(Interaction inter) → None[source]

check sizes of the relation specific operators.

Parameters: inter – an Interaction using this relation
computeDotJachq(double time, BlockVector workQ, BlockVector workZ, BlockVector workQdot) → None[source]
computeInput(double time, Interaction inter, int level=0) → None[source]

to compute the input

Parameters: time – current time inter – the interaction using this relation level – number of the derivative to compute, optional, default = 0.
computeJacg(double time, Interaction inter) → None[source]

compute all the jacobian of g

Parameters: time – current time inter – the interaction using this relation
computeJacglambda(double time, Interaction inter) → None[source]

compute the jacobian of h w.r.t.

$$\dot{q}$$

Parameters: time – current time inter – the interaction using this relation
computeJacgq(double time, Interaction inter) → None[source]

compute the jacobian of h w.r.t.

$$\dot{q}$$

Parameters: time – current time inter – the interaction using this relation
computeJacgqDot(double time, Interaction inter) → None[source]

compute the jacobian of h w.r.t.

$$\dot{q}$$

Parameters: time – current time inter – the interaction using this relation
computeJach(double time, Interaction inter) → None[source]

compute all the jacobian of h

Parameters: time – current time inter – the interaction using this relation
computeJachlambda(double time, Interaction inter) → None[source]

default function to compute jacobianH

Parameters: time – current time inter – the interaction using this relation
computeJachq(double time, Interaction inter, BlockVector q0) → None[source]

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
computeJachqDot(double time, Interaction inter) → None[source]

compute the jacobian of h w.r.t.

$$\dot{q}$$

Parameters: time – current time inter – the interaction using this relation
computeJachqT(Interaction inter, BlockVector q0) → None[source]
computeOutput(double time, Interaction inter, int derivativeNumber=0) → None[source]

to compute output

Parameters: time – current time inter – the interaction using this relation derivativeNumber – number of the derivative to compute, optional, default = 0.
computeSecondOrderTimeDerivativeTerms(double time, Interaction inter, VectorOfBlockVectors DSlink, DynamicalSystem ds1, DynamicalSystem ds2) → None[source]

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)
computeh(double time, BlockVector q0, array_like (np.float64, 1D) y) → None[source]

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

Parameters: time – current time q0 – the position y – the output
contactForce() -> array_like (np.float64, 1D)[source]

A buffer containing the forces due to this.

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

Returns: SP::SiconosVector
dotJachq() -> array_like (np.float64, 2D)[source]
initialize(Interaction inter) → None[source]

initialize components specific to derived classes.

Parameters: inter – Interaction associated with the Relation
jacglambda() -> array_like (np.float64, 2D)[source]
jachlambda() -> array_like (np.float64, 2D)[source]
jachq() -> array_like (np.float64, 2D)[source]

get a pointer on matrix Jach[index]

Returns: a pointer on a SimpleMatrix
jachqDot() -> array_like (np.float64, 2D)[source]
jachqT() -> array_like (np.float64, 2D)[source]
secondOrderTimeDerivativeTerms() -> array_like (np.float64, 1D)[source]
setE(array_like (np.float64, 1D) newE) → None[source]
setJachq(array_like (np.float64, 2D) newJachq) → None[source]
setJachqPtr(array_like (np.float64, 2D) newPtr) → None[source]

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

Parameters: newPtr – the new matrix
setJachqT(array_like (np.float64, 2D) newJachqT) → None[source]