Class FirstOrderLinearR

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

class FirstOrderLinearR : public FirstOrderR

First Order Linear Relation.

Linear Relation for First Order Dynamical Systems:

\[\begin{split}y &=& C(t,z)x(t) + F(t,z)z + D(t,z)\lambda + e(t,z) \\ R &=& B(t,z) \lambda\end{split}\]

The following operators can be plugged: \( B(t,z), C(t,z), D(t,z), e(t,z), F(t,z)\)

Public Functions

FirstOrderLinearR()

default constructor, protected

FirstOrderLinearR(const std::string &Cname, const std::string &Bname)

Constructor with C and B plugin names.

Parameters
  • Cname: the plugin name for computing the C matrix
  • Bname: the plugin name for computing the B matrix

FirstOrderLinearR(const std::string &Cname, const std::string &Dname, const std::string &Fname, const std::string &Ename, const std::string &Bname)

Constructor with all plugin names.

Parameters
  • Cname: the plugin name for computing the C matrix
  • Dname: the plugin name for computing the D matrix
  • Fname: the plugin name for computing the F matrix
  • Ename: the plugin name for computing the e vector
  • Bname: the plugin name for computing the B matrix

FirstOrderLinearR(SP::SimpleMatrix C, SP::SimpleMatrix B)

create the Relation from a set of data

Parameters
  • C: the C matrix
  • B: the B matrix

FirstOrderLinearR(SP::SimpleMatrix C, SP::SimpleMatrix D, SP::SimpleMatrix F, SP::SiconosVector e, SP::SimpleMatrix B)

create the Relation from a set of data

Parameters
  • C: the C matrix
  • D: the D matrix
  • F: the F matrix
  • e: the e matrix
  • B: the B matrix

~FirstOrderLinearR()

destructor

virtual void checkSize(Interaction &inter)

check sizes of the relation specific operators.

Parameters

void computeB(double time, SiconosVector &z, SimpleMatrix &B)

Function to compute the matrix B.

Parameters
  • time: the current time
  • z: the auxiliary input vector
  • B: the B matrix

void computeC(double time, SiconosVector &z, SimpleMatrix &C)

Function to compute the matrix C.

Parameters
  • time: the current time
  • z: the auxiliary input vector
  • C: the C matrix

void computeD(double time, SiconosVector &z, SimpleMatrix &D)

Function to compute the matrix D.

Parameters
  • time: the current time
  • z: the auxiliary input vector
  • D: the D matrix

void computee(double time, SiconosVector &z, SiconosVector &e)

Function to compute the vector e.

Parameters
  • time: the current time
  • z: the auxiliary input vector
  • e: the e vector

void computeF(double time, SiconosVector &z, SimpleMatrix &F)

Function to compute the matrix F.

Parameters
  • time: the current time
  • z: the auxiliary input vector
  • F: the F matrix

void computeg(double time, SiconosVector &lambda, SiconosVector &z, BlockVector &r)

default function to compute g

Parameters
  • time: current time
  • lambda: XXX
  • z: XXX
  • r: non-smooth input

void computeh(double time, BlockVector &x, SiconosVector &lambda, SiconosVector &z, SiconosVector &y)

default function to compute h

Parameters
  • time: current time
  • x: XXX
  • lambda:
  • z: XXX
  • y: value of h

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

default function to compute r

Parameters

virtual void computeJach(double time, Interaction &inter)

compute all the H Jacobian

Parameters
  • time: the current time
  • inter: the interaction using this relation

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

default function to compute y

Parameters

void display() const

print the data to the screen

SP::SiconosVector e() const

get e

Return
e matrix

virtual void initialize(Interaction &inter)

initialize the relation (check sizes, memory allocation in workV and workM …)

Parameters

virtual bool isLinear()

determine if the Relation is linear

Return
true if the relation is linear.

void setComputeBFunction(const std::string &pluginPath, const std::string &functionName)

set a specified function to compute the matrix B

Parameters
  • pluginPath: the complete path to the plugin
  • functionName: the function name to use in this plugin

void setComputeCFunction(const std::string &pluginPath, const std::string &functionName)

set a specified function to compute the matrix C

Parameters
  • pluginPath: the complete path to the plugin
  • functionName: the function name to use in this plugin

void setComputeDFunction(const std::string &pluginPath, const std::string &functionName)

set a specified function to compute the matrix D

Parameters
  • pluginPath: the complete path to the plugin
  • functionName: the function name to use in this plugin

void setePtr(SP::SiconosVector newe)

set e

Parameters
  • newe: the new value of e