# Class LagrangianCompliantLinearTIR¶

class LagrangianCompliantLinearTIR : public LagrangianR

Lagrangian Linear Relation.

Lagrangian Relation with:

$$y= Cq + e + D\lambda + Fz$$

$$p = C^t \lambda$$

C is the only required input to built a LagrangianCompliantLinearTIR. D is mandatory and may represent a stiffness in the relation

Public Functions

LagrangianCompliantLinearTIR()

Default constructor.

LagrangianCompliantLinearTIR(SP::SimpleMatrix C, SP::SimpleMatrix D)

create the Relation from a set of data

Parameters
• C: the matrix C

• D: the matrix D

LagrangianCompliantLinearTIR(SP::SimpleMatrix C, SP::SimpleMatrix D, SP::SiconosVector e)

create the Relation from a set of data

Parameters
• C: the matrix C

• D: the matrix D

• e: the vector e

LagrangianCompliantLinearTIR(SP::SimpleMatrix C, SP::SimpleMatrix D, SP::SimpleMatrix F, SP::SiconosVector e)

create the Relation from a set of data

Parameters
• C: the matrix C

• D: the matrix D

• F: the matrix F

• e: the vector e

virtual ~LagrangianCompliantLinearTIR()

destructor

SP::SimpleMatrix C() const

get C

Return

pointer on a plugged matrix

void checkSize(Interaction &inter)

check sizes LagrangianCompliantLinearTIR specific operators.

Parameters
• inter: an Interaction using this relation

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

default function to compute r

Parameters
• time: not used

• inter: the Interaction we want to update

• level: the derivative of lambda we want to compute

void computeJach(double time, Interaction &inter)

compute all the H Jacobian

Parameters
• time: the current time

• inter: the interaction using this relation

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

default function to compute y

Parameters
• time: not used

• inter: the Interaction we want to update

• derivativeNumber: the derivative of y we want to compute

SP::SimpleMatrix D() const

get D

Return

pointer on a plugged matrix

void display() const

get a pointer on matrix Jach[index]

Return

a pointer on a SimpleMatrixprint the data to the screen

SP::SiconosVector e() const

get e

Return

pointer on a plugged vector

SP::SimpleMatrix F() const

get F

Return

pointer on a plugged matrix

void initialize(Interaction &inter)

initialize LagrangianCompliantLinearTIR specific operators.

Parameters
• inter: an Interaction using this relation

virtual bool isLinear()

Return

true if the relation is linear.

void setCPtr(SP::SimpleMatrix newPtr)

set C to pointer newPtr

Parameters
• newPtr: a SP to plugged matrix

void setDPtr(SP::SimpleMatrix newPtr)

set D to pointer newPtr

Parameters
• newPtr: a SP to plugged matrix

void setEPtr(SP::SiconosVector newPtr)

set e to pointer newPtr

Parameters
• newPtr: a SP to plugged vector

void setFPtr(SP::SimpleMatrix newPtr)

set F to pointer newPtr

Parameters
• newPtr: a SP to plugged matrix