siconos.mechanics.collision.bodies

Module documentation

class siconos.mechanics.collision.bodies.nullDeleter(*args, **kwargs)[source]

Bases: object

Using a shared_ptr to hold a pointer to a statically allocated

object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/

class siconos.mechanics.collision.bodies.CircularDS(*args)[source]

Bases: siconos.kernel.LagrangianDS

Definition of a 2D circular shape - Inherits from LagrangianDS

Overload 1:

Default constructor


Overload 2:

constructor from initial state only, \(dv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters

velocity – SiconosVector : initial velocity of this DynamicalSystem


Overload 3:

constructor from initial state and mass, \(Mdv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters
  • velocity – SiconosVector : initial velocity of this DynamicalSystem :type mass: SiconosMatrix

  • mass – SiconosMatrix : mass matrix


Overload 4:

constructor from initial state and mass (plugin) \(Mdv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters
  • velocity – SiconosVector : initial velocity of this DynamicalSystem :type plugin: string

  • plugin – std::string: plugin path to compute mass matrix

class siconos.mechanics.collision.bodies.CircularR(r1, r2)[source]

Bases: siconos.kernel.LagrangianScleronomousR

Two circle relation - Inherits from LagrangianScleronomousR

Constructor

Parameters
  • disk1 – radius

  • disk2 – radius

class siconos.mechanics.collision.bodies.Disk(radius, mass, position, velocity)[source]

Bases: siconos.mechanics.collision.bodies.CircularDS

Definition of a 2D disk - Inherits from LagrangianDS

Constructor

Parameters
  • radius (float) –

  • mass (float) –

  • position (SiconosVector) – vector

  • velocity (SiconosVector) – vector

class siconos.mechanics.collision.bodies.Circle(*args)[source]

Bases: siconos.mechanics.collision.bodies.CircularDS

Definition of a 2D Circle - Inherits from CircularDS

Constructor

Parameters
  • radius (float) –

  • mass (float) –

  • position (SiconosVector) – vector

  • velocity (SiconosVector) – vector

class siconos.mechanics.collision.bodies.DiskDiskR(disk1, disk2)[source]

Bases: siconos.mechanics.collision.bodies.CircularR

Two disks relation - Inherits from LagrangianScleronomousR

Constructor

Parameters
  • disk1 (float) – radius

  • disk2 (float) – radius

computeh(q, z, y)[source]

to compute the output y = h(q,z) of the Relation

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

  • y (SiconosVector) – the resulting vector

computeJachq(q, z)[source]

to compute the jacobian of h(…). Set attribute _jachq (access: jacqhq())

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

class siconos.mechanics.collision.bodies.DiskPlanR(*args)[source]

Bases: siconos.kernel.LagrangianScleronomousR

disk - plan relation - Inherits from LagrangianScleronomousR

Overload 1: Infinite Plan

Parameters
  • r (float) – disk radius

  • A (float) – component of line equation Ax + By + C = 0

  • B (float) – component of line equation Ax + By + C = 0

  • C (float) – component of line equation Ax + By + C = 0


Overload 2: Finite or infinite Plan (segment)

Parameters

Overload 3: Finite Plan

computeh(q, z, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

  • y (SiconosVector) – the resulting vector

computeJachq(q, z)[source]

to compute the jacobian of h(…). Set attribute _jachq (access: jacqhq())

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

class siconos.mechanics.collision.bodies.DiskMovingPlanR(arg2, arg3, arg4, arg5, arg6, arg7, arg8)[source]

Bases: siconos.kernel.LagrangianRheonomousR

Overload 1: default constructor


Overload 2: constructor from a set of data

Parameters
  • pluginh (string) – name of the plugin to compute h. Its signature must be “void userPluginH(unsigned int, double*, double, unsigned int, double*, unsigned int, double*)”

  • pluginJacobianhq (string) – name of the plugin to compute jacobian h according to q. Its signature must be “void userPluginG0(unsigned int, double*, double, unsigned int, double*, unsigned int, double*)”

  • pluginDoth (string) – name of the plugin to compute hDot. Its signature must be “void userPluginHDot(unsigned int, double*,double, unsigned int, double*, unsigned int, double*)

computeh(time, q, z, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • time (float) – current time value

  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

  • y (SiconosVector) – the resulting vector

computeJachq(time, q, z)[source]

to compute the jacobian of h(…). Set attribute _jachq (access: jacqhq())

Parameters
  • time (float) – current time value

  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

computehDot(time, q, z)[source]

to compute the time-derivative of the output y = h(t,q,z), saved in attribute _hDot (access: hDot())

Parameters
  • time (float) – current time value

  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

computeA(t)[source]

compute A

Parameters

t (float) – the time

computeB(t)[source]

compute B

Parameters

t (float) – the time

computeC(t)[source]

compute C

Parameters

t (float) – the time

computeADot(t)[source]

compute ADot

Parameters

t (float) – the time

computeBDot(t)[source]

compute BDot

Parameters

t (float) – the time

computeCDot(t)[source]

compute CDot

Parameters

t (float) – the time

class siconos.mechanics.collision.bodies.SphereLDS(*args)[source]

Bases: siconos.kernel.LagrangianDS

Overload 1:

Default constructor


Overload 2:

constructor from initial state only, \(dv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters

velocity – SiconosVector : initial velocity of this DynamicalSystem


Overload 3:

constructor from initial state and mass, \(Mdv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters
  • velocity – SiconosVector : initial velocity of this DynamicalSystem :type mass: SiconosMatrix

  • mass – SiconosMatrix : mass matrix


Overload 4:

constructor from initial state and mass (plugin) \(Mdv = p\)

type position

SiconosVector

param position

SiconosVector : initial coordinates of this DynamicalSystem :type velocity: SiconosVector

Parameters
  • velocity – SiconosVector : initial velocity of this DynamicalSystem :type plugin: string

  • plugin – std::string: plugin path to compute mass matrix

computeMass(*args)[source]

Overload 1: default function to compute the mass


Overload 2: function to compute the mass

Parameters

position (SiconosVector) – value used to evaluate the mass matrix

computeFGyr(*args)[source]

Overload 1: default function to compute the inertia


Overload 2: function to compute the inertia with some specific values for q and velocity (ie not those of the current state).

Parameters
  • position (SiconosVector) – value used to evaluate the inertia forces

  • velocity (SiconosVector) – value used to evaluate the inertia forces

computeJacobianFGyrq(*args)[source]

Overload 1: function to compute the jacobian w.r.t. q of the inertia forces


Overload 2: function to compute the jacobian w.r.t. q of the inertia forces

Parameters
  • position (SiconosVector) – value used to evaluate the jacobian

  • velocity (SiconosVector) – value used to evaluate the jacobian

computeJacobianFGyrqDot(*args)[source]

Overload 1: function to compute the jacobian w.r.t. qDot of the inertia forces


Overload 2: function to compute the jacobian w.r.t. qDot of the inertia forces

Parameters
  • position (SiconosVector) – value used to evaluate the jacobian

  • velocity (SiconosVector) – value used to evaluate the jacobian

class siconos.mechanics.collision.bodies.SphereNEDS(*args)[source]

Bases: siconos.kernel.NewtonEulerDS

Overload 1: Default constructor


Overload 2: constructor from a minimum set of data

Parameters
  • position (SiconosVector) – initial coordinates of this DynamicalSystem

  • twist (SiconosVector) – initial twist of this DynamicalSystem

  • mass (float) – the mass

  • inertia (SiconosMatrix) – the inertia matrix

class siconos.mechanics.collision.bodies.SphereLDSPlanR(r, A, B, C, D)[source]

Bases: siconos.kernel.LagrangianScleronomousR

Constructor

Parameters
computeh(q, z, y)[source]

to compute the output y = h(q,z) of the Relation

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

  • y (SiconosVector) – the resulting vector

computeJachq(q, z)[source]

to compute the jacobian of h(…). Set attribute _jachq (access: jacqhq())

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

class siconos.mechanics.collision.bodies.SphereNEDSPlanR(r, A, B, C, D)[source]

Bases: siconos.kernel.NewtonEuler3DR

Constructor

Parameters
distance(arg2, arg3, arg4, arg5)[source]

Return the distance between pc1 and pc, with sign according to normal

computeh(time, q0, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • time (float) – current time value

  • q – coordinates of the dynamical systems involved in the relation

  • y (SiconosVector) – the resulting vector

class siconos.mechanics.collision.bodies.SphereLDSSphereLDSR(r1, r2)[source]

Bases: siconos.kernel.LagrangianScleronomousR

Constructor

Parameters
  • r1 (float) – disk1 radius

  • r2 (float) – disk2 radius

computeh(q, z, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

  • y (SiconosVector) – the resulting vector

computeJachq(q, z)[source]

to compute the jacobian of h(…). Set attribute _jachq (access: jacqhq())

Parameters
  • q (BlockVector) – coordinates of the dynamical systems involved in the relation

  • z (BlockVector) – user defined parameters (optional)

class siconos.mechanics.collision.bodies.SphereNEDSSphereNEDSR(r1, r2)[source]

Bases: siconos.kernel.NewtonEuler3DR

Constructor

Parameters
  • r1 (float) – disk1 radius

  • r2 (float) – disk2 radius

distance(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)[source]

Return the distance between pc1 and pc, with sign according to normal

computeh(time, q0, y)[source]

to compute the output y = h(t,q,z) of the Relation

Parameters
  • time (float) – current time value

  • q – coordinates of the dynamical systems involved in the relation

  • y (SiconosVector) – the resulting vector