Class FirstOrderR

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

class FirstOrderR : public 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.

Subclassed by FirstOrderLinearR, FirstOrderLinearTIR, FirstOrderNonLinearR, FirstOrderType1R, FirstOrderType2R

Public Functions

virtual ~FirstOrderR()


SP::SimpleMatrix B() const

get B

B matrix

SP::SimpleMatrix C() const

get C

C matrix

virtual void checkSize(Interaction &inter) = 0

check sizes of the relation specific operators.


SP::SimpleMatrix D() const

get D

D matrix

SP::SimpleMatrix F() const

get F

F matrix

virtual void initialize(Interaction &inter)

initialize the relation (check sizes, memory allocation …)

  • inter: the interaction using this relation

SP::SimpleMatrix K() const

get K

K matrix

void setBPtr(SP::SimpleMatrix newB)

set B to pointer newB

  • newB: the B matrix

void setCPtr(SP::SimpleMatrix newC)

set C to pointer newC

  • newC: the C matrix

void setDPtr(SP::SimpleMatrix newD)

set D to pointer newPtr

  • newD: the D matrix

void setFPtr(SP::SimpleMatrix newF)

set F to pointer newPtr

  • newF: the F matrix