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()

destructor

SP::SimpleMatrix B() const

get B

Return
B matrix

SP::SimpleMatrix C() const

get C

Return
C matrix

virtual void checkSize(Interaction &inter) = 0

check sizes of the relation specific operators.

Parameters

SP::SimpleMatrix D() const

get D

Return
D matrix

SP::SimpleMatrix F() const

get F

Return
F matrix

virtual void initialize(Interaction &inter)

initialize the relation (check sizes, memory allocation …)

Parameters
  • inter: the interaction using this relation

SP::SimpleMatrix K() const

get K

Return
K matrix

void setBPtr(SP::SimpleMatrix newB)

set B to pointer newB

Parameters
  • newB: the B matrix

void setCPtr(SP::SimpleMatrix newC)

set C to pointer newC

Parameters
  • newC: the C matrix

void setDPtr(SP::SimpleMatrix newD)

set D to pointer newPtr

Parameters
  • newD: the D matrix

void setFPtr(SP::SimpleMatrix newF)

set F to pointer newPtr

Parameters
  • newF: the F matrix