siconos.kernel.FirstOrderLinearDS (Python class)

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

Bases: siconos.kernel.FirstOrderNonLinearDS

First Order Linear Systems - \(M(t) \dot x = A(t)x(t)+ b(t) + r, \quad x(t_0)=x_0\).

This class represents first order linear systems of the form:

\[M(t) \dot x = A(t)x(t)+ b(t) + r, x(t_0)=x_0\]

where

  • \(x \in R^{n}\) is the state,
  • \(r \in R^{n}\) the input due to the Non Smooth Interaction.
  • \(M \in R^{n\times n}\) is an invertible matrix
  • \(A \in R^{n\times n}\)
  • \(b \in R^{n}\)

The following operators can be plugged, in the usual way (see User Guide)

  • \(A(t)\)
  • \(b(t)\)
  • \(M(t)\)

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

Constructors

FirstOrderLinearDS(array_like (np.float64, 1D) newX0, str APlugin, str bPlugin)

constructor from initial state and plugins

Parameters:
  • newX0 – the initial state of this DynamicalSystem
  • APlugin – plugin for A
  • bPlugin – plugin for b
FirstOrderLinearDS(array_like (np.float64, 1D) newX0, array_like (np.float64, 2D) newA)

constructor from initial state and plugin for A

Parameters:
  • newX0 – the initial state of this DynamicalSystem
  • newA – matrix A
FirstOrderLinearDS(array_like (np.float64, 1D) newX0)

constructor from initial state

Parameters:newX0 – the initial state of this DynamicalSystem
FirstOrderLinearDS(array_like (np.float64, 1D) newX0, array_like (np.float64, 2D) newA, array_like (np.float64, 1D) newB)

constructor from a initial state and constant matrices

Parameters:
  • newX0 – the initial state of this DynamicalSystem
  • newA – matrix A
  • newB – b
FirstOrderLinearDS(FirstOrderLinearDS FOLDS)

Copy constructor.

Parameters:FOLDS – the original FirstOrderLinearDS we want to copy
A() -> array_like (np.float64, 2D)[source]

get the matrix \(A\)

Returns:pointer (SP) on a matrix
b() -> array_like (np.float64, 1D)[source]

get b vector (pointer link)

Returns:a SP::SiconosVector
clearComputebFunction() → None[source]
computeA(double time) → None[source]

default function to compute matrix A => same action as computeJacobianfx

Parameters:time – time instant used to compute A
computeJacobianRhsx(double time) → None[source]

update \(\nabla_x rhs\) for the current state

Parameters:time – of interest
computeRhs(double time) → None[source]

update right-hand side for the current state

Parameters:time – of interest
computeb(double time) → None[source]

default function to compute vector b

Parameters:time – time instant used to compute b
display() → None[source]

data display on screen

getPluginA() → PluggedObject[source]

Get _pluginA.

Returns:the plugin for A
getPluginB() → PluggedObject[source]

Get _pluginb.

Returns:the plugin for b
hasConstantA() → bool[source]
hasConstantB() → bool[source]
initRhs(double time) → None[source]

Initialization function for the rhs and its jacobian.

Parameters:time – time of initialization.
isLinear() → bool[source]

True if the system is linear.

Returns:a boolean
jacobianfx() -> array_like (np.float64, 2D)[source]

get jacobian of f(x,t,z) with respect to x (pointer link)

Returns:SP::SiconosMatrix
setA(array_like (np.float64, 2D) newA) → None[source]

set A to a new matrix

Parameters:newA – the new A matrix
setAPtr(array_like (np.float64, 2D) newA) → None[source]

set A to pointer newPtr

Parameters:newA – the new A matrix
setComputeAFunction(*args)[source]

Warning - Overloaded function : multiple signatures available, check prototypes below.

setComputeAFunction(str pluginPath, str functionName) → None[source]

set a specified function to compute the matrix A => same action as setComputeJacobianfxFunction

Parameters:
  • pluginPath – the complete path to the plugin
  • functionName – the function name to use in this plugin
  • Exceptions
  • ----------
  • SiconosSharedLibraryException
setComputeAFunction(LDSPtrFunction fct) → None[source]

set a specified function to compute the matrix A

Parameters:fct – a pointer on a function
setComputebFunction(*args)[source]

Warning - Overloaded function : multiple signatures available, check prototypes below.

setComputebFunction(str pluginPath, str functionName) → None[source]

set a specified function to compute the vector b

Parameters:
  • pluginPath – the complete path to the plugin file
  • functionName – the function name to use in this plugin
  • Exceptions
  • ----------
  • SiconosSharedLibraryException
setComputebFunction(LDSPtrFunction fct) → None[source]

set a specified function to compute the vector b

Parameters:fct – a pointer on a function
setPluginA(PluggedObject newPluginA) → None[source]

Set _pluginA.

Parameters:newPluginA – the new plugin
setPluginB(PluggedObject newPluginB) → None[source]

Set _pluginb.

Parameters:newPluginB – the new plugin
setb(array_like (np.float64, 1D) b) → None[source]

set b vector (copy)

Parameters:b – a SiconosVector
setbPtr(array_like (np.float64, 1D) b) → None[source]

set b vector (pointer link)

Parameters:b – a SiconosVector
updatePlugins(double time) → None[source]

Call all plugged-function to initialize plugged-object values.

Parameters:time – value