siconos.kernel.FirstOrderLinearR (Python class)

class siconos.kernel.FirstOrderLinearR(*args)[source]

Bases: siconos.kernel.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)\)

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

Constructors

FirstOrderLinearR()

default constructor, protected

FirstOrderLinearR(str Cname, str 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(str Cname, str Dname, str Fname, str Ename, str 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(array_like (np.float64, 2D) C, array_like (np.float64, 2D) B)

create the Relation from a set of data

Parameters:
  • C – the C matrix
  • B – the B matrix
FirstOrderLinearR(array_like (np.float64, 2D) C, array_like (np.float64, 2D) D, array_like (np.float64, 2D) F, array_like (np.float64, 1D) e, array_like (np.float64, 2D) 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
checkSize(Interaction inter) → None[source]

check sizes of the relation specific operators.

Parameters:inter – an Interaction using this relation
computeB(double time, array_like (np.float64, 1D) z, array_like (np.float64, 2D) B) → None[source]

Function to compute the matrix B.

Parameters:
  • time – the current time
  • z – the auxiliary input vector
  • B – the B matrix
computeC(double time, array_like (np.float64, 1D) z, array_like (np.float64, 2D) C) → None[source]

Function to compute the matrix C.

Parameters:
  • time – the current time
  • z – the auxiliary input vector
  • C – the C matrix
computeD(double time, array_like (np.float64, 1D) z, array_like (np.float64, 2D) D) → None[source]

Function to compute the matrix D.

Parameters:
  • time – the current time
  • z – the auxiliary input vector
  • D – the D matrix
computeF(double time, array_like (np.float64, 1D) z, array_like (np.float64, 2D) F) → None[source]

Function to compute the matrix F.

Parameters:
  • time – the current time
  • z – the auxiliary input vector
  • F – the F matrix
computeInput(double time, Interaction inter, int level=0) → None[source]

default function to compute r

Parameters:
  • time – current time
  • inter – Interaction using this Relation
  • level – not used
computeJacg(double time, Interaction inter) → None[source]
computeJach(double time, Interaction inter) → None[source]

compute all the H Jacobian

Parameters:
  • time – the current time
  • inter – the interaction using this relation
computeOutput(double time, Interaction inter, int level=0) → None[source]

default function to compute y

Parameters:
  • time – current time
  • inter – Interaction using this Relation
  • level – not used
computee(double time, array_like (np.float64, 1D) z, array_like (np.float64, 1D) e) → None[source]

Function to compute the vector e.

Parameters:
  • time – the current time
  • z – the auxiliary input vector
  • e – the e vector
computeg(double time, array_like (np.float64, 1D) lambda, array_like (np.float64, 1D) z, BlockVector r) → None[source]

default function to compute g

Parameters:
  • time – current time
  • lambda – XXX
  • z – XXX
  • r – non-smooth input
computeh(double time, BlockVector x, array_like (np.float64, 1D) lambda, array_like (np.float64, 1D) z, array_like (np.float64, 1D) y) → None[source]

default function to compute h

Parameters:
  • time – current time
  • x – XXX
  • lambda
  • z – XXX
  • y – value of h
display() → None[source]

print the data to the screen

e() -> array_like (np.float64, 1D)[source]

get e

Returns:e matrix
initialize(Interaction inter) → None[source]

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

Parameters:inter – Interaction using this Relation
isLinear() → bool[source]

determine if the Relation is linear

Returns:true if the relation is linear.
setComputeBFunction(str pluginPath, str functionName) → None[source]

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
setComputeCFunction(str pluginPath, str functionName) → None[source]

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
setComputeDFunction(str pluginPath, str functionName) → None[source]

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
setePtr(array_like (np.float64, 1D) newe) → None[source]

set e

Parameters:newe – the new value of e