siconos.kernel.FirstOrderR (Python class)

class siconos.kernel.FirstOrderR(newType: RELATION::SUBTYPES)[source]

Bases: siconos.kernel.Relation

FirstOrder Non Linear Relation.

Relation for First Order Dynamical Systems, with:

\[\begin{split}y &=& h(X,t,\lambda,Z)\\ R &=& g(X,t,\lambda,Z)\end{split}\]
X, Z, R corresponds to DynamicalSystem variables. If DS1 and DS2 are

involved in the linked Interaction, then X =[x1 x2], Z=[z1 z2] …

\(y \ and \ \lambda\) are specific variables of the interaction (see this class for more details). h and g are plugged on external functions, via plug-in mechanism (see SiconosSharedLibrary).

h <=> output

g <=> input

Operators (and their corresponding plug-in):

  • h: saved in Interaction as y (plug-in: output[0])
  • \(\nabla_x h\): jacobianH[0] ( output[1] )
  • \(\nabla_\lambda h\): jacobianH[1] ( output[2] )
  • g: saved in DS as r ( input[0])
  • \(\nabla_\lambda g\): jacobianG[0] ( input[1] )

Note: we use a vector for jacobianG while there is only one jacobian. Just for future changes and to allow easy new implementations if some other variables are required in g.

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

B() -> array_like (np.float64, 2D)[source]

get B

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

get C

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

get D

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

get F

Returns:F matrix
K() -> array_like (np.float64, 2D)[source]

get K

Returns:K matrix
checkSize(inter: Interaction) → void[source]

checkSize(Interaction inter)=0 -> None

check sizes of the relation specific operators.

Parameters:inter – an Interaction using this relation
initialize(Interaction inter) → None[source]

initialize the relation (check sizes, memory allocation …)

Parameters:inter – the interaction using this relation
setBPtr(array_like (np.float64, 2D) newB) → None[source]

set B to pointer newB

Parameters:newB – the B matrix
setCPtr(array_like (np.float64, 2D) newC) → None[source]

set C to pointer newC

Parameters:newC – the C matrix
setDPtr(array_like (np.float64, 2D) newD) → None[source]

set D to pointer newPtr

Parameters:newD – the D matrix
setFPtr(array_like (np.float64, 2D) newF) → None[source]

set F to pointer newPtr

Parameters:newF – the F matrix