Class SchatzmanPaoliOSI

Defined in Program listing for file kernel/src/simulationTools/SchatzmanPaoliOSI.hpp

class SchatzmanPaoliOSI : public OneStepIntegrator

SchatzmanPaoliOSI Time-Integrator for Dynamical Systems.

SchatzmanPaoliOSI class is used to define some time-integrators methods for a list of dynamical systems.

A SchatzmanPaoliOSI instance is defined by the value of theta and the list of concerned dynamical systems. Each DynamicalSystem is associated to a SiconosMatrix, named “W”

W matrices are initialized and computed in initializeIterationMatrixW and computeW. Depending on the DS type, they may depend on time and DS state (x).

For Lagrangian systems, the implementation uses _p[0] for storing the discrete multiplier.

Main functions:

  • computeFreeState(): computes xfree (or vfree), dynamical systems state without taking non-smooth part into account
  • updateState(): computes x (q,v), the complete dynamical systems states.

Public Functions

SchatzmanPaoliOSI(double theta)

constructor from theta value only

Parameters
  • theta: value for all these DS.

SchatzmanPaoliOSI(double theta, double gamma)

constructor from theta value only

Parameters
  • theta: value for all these DS.
  • gamma: value for all these DS.

virtual ~SchatzmanPaoliOSI()

destructor

ACCEPT_STD_VISITORS()

visitors hook

virtual void computeFreeOutput(InteractionsGraph::VDescriptor &vertex_inter, OneStepNSProblem *osnsp)

integrates the Interaction linked to this integrator, without taking non-smooth effects into account

Parameters

virtual void computeFreeState()

integrates the Dynamical System linked to this integrator without boring the constraints

double computeResidu()

return the maximum of all norms for the “SchatzmanPaoliOSI-discretized” residus of DS

Return
a double

void computeW(double time, SP::DynamicalSystem ds, SiconosMatrix &W)

compute W SchatzmanPaoliOSI matrix at time t

Parameters
  • time: the time (double)
  • ds: a pointer to DynamicalSystem
  • W: the matrix to compute

void computeWBoundaryConditions(SP::DynamicalSystem ds, SiconosMatrix &WBoundaryConditions)

compute WBoundaryConditionsMap[ds] SchatzmanPaoliOSI matrix at time t

Parameters
  • ds: a pointer to DynamicalSystem
  • WBoundaryConditions: write the result in WBoundaryConditions

void display()

Displays the data of the SchatzmanPaoliOSI’s integrator.

double gamma()

get gamma

Return
a double

const SimpleMatrix getW(SP::DynamicalSystem ds = SP::DynamicalSystem())

get the value of W corresponding to DynamicalSystem ds

Return
SimpleMatrix
Parameters
  • ds: a pointer to DynamicalSystem, optional, default = NULL. get W[0] in that case

const SimpleMatrix getWBoundaryConditions(SP::DynamicalSystem ds = SP::DynamicalSystem())

get the value of WBoundaryConditions corresponding to DynamicalSystem ds

Return
SimpleMatrix
Parameters
  • ds: a pointer to DynamicalSystem, optional, default = NULL. get WBoundaryConditions[0] in that case

void initializeIterationMatrixW(double time, SP::DynamicalSystem ds)

initialize iteration matrix W SchatzmanPaoliOSI matrix at time t

Parameters

void initializeIterationMatrixWBoundaryConditions(SP::DynamicalSystem ds, const DynamicalSystemsGraph::VDescriptor &dsv)

initialize iteration matrix WBoundaryConditionsMap[ds] SchatzmanPaoliOSI

Parameters
  • ds: a pointer to DynamicalSystem
  • dsv: a descriptor of the ds on the graph (redundant to avoid invocation)

void initializeWorkVectorsForDS(double t, SP::DynamicalSystem ds)

initialization of the SchatzmanPaoliOSI integrator; for linear time invariant systems, we compute time invariant operator (example : W)

initialization of the work vectors and matrices (properties) related to one dynamical system on the graph and needed by the osi

Parameters
  • t: time of initialization
  • ds: the dynamical system

void initializeWorkVectorsForInteraction(Interaction &inter, InteractionProperties &interProp, DynamicalSystemsGraph &DSG)

initialization of the work vectors and matrices (properties) related to one interaction on the graph and needed by the osi

Parameters
  • inter: the interaction
  • interProp: the properties on the graph
  • DSG: the dynamical systems graph

void integrate(double &tinit, double &tend, double &tout, int &idid)

integrate the system, between tinit and tend (->iout=true), with possible stop at tout (->iout=false)

Parameters

unsigned int numberOfIndexSets() const

get the number of index sets required for the simulation

Return
unsigned int

void setGamma(double newGamma)

set the value of gamma

Parameters
  • newGamma: a double

void setTheta(double newTheta)

set the value of theta

Parameters
  • newTheta: a double

void setUseGamma(bool newUseGamma)

set the boolean to indicate that we use gamma

Parameters
  • newUseGamma: a bool

void setUseGammaForRelation(bool newUseGammaForRelation)

set the boolean to indicate that we use gamma for the relation

Parameters
  • newUseGammaForRelation: a bool

void setW(const SiconosMatrix &newValue, SP::DynamicalSystem ds)

set the value of W[ds] to newValue

Parameters

void setWPtr(SP::SimpleMatrix newPtr, SP::DynamicalSystem ds)

set W[ds] to pointer newPtr

Parameters

double theta()

get theta

Return
a double

virtual void updateState(const unsigned int level)

updates the state of the Dynamical Systems

Parameters
  • level: level of interest for the dynamics: not used at the time

bool useGamma()

get bool useGamma

Return
a bool

bool useGammaForRelation()

get bool gammaForRelation for the relation

Return
a

SP::SimpleMatrix W(SP::DynamicalSystem ds)

get W corresponding to DynamicalSystem ds

Return
pointer to a SiconosMatrix
Parameters
  • ds: a pointer to DynamicalSystem, optional, default = NULL. get W[0] in that case

SP::SiconosMatrix WBoundaryConditions(SP::DynamicalSystem ds)

get WBoundaryConditions corresponding to DynamicalSystem ds

Return
pointer to a SiconosMatrix
Parameters
  • ds: a pointer to DynamicalSystem, optional, default = NULL. get WBoundaryConditions[0] in that case