File kernel/src/simulationTools/SimulationGraphs.hpp

Go to the source code of this file

class _DynamicalSystemsGraph : public SiconosGraph<std11::shared_ptr<DynamicalSystem>, std11::shared_ptr<Interaction>, DynamicalSystemProperties, InteractionProperties, GraphProperties>

Subclassed by DynamicalSystemsGraph

Private Functions

ACCEPT_SERIALIZATION(_DynamicalSystemsGraph)
class _InteractionsGraph : public SiconosGraph<std11::shared_ptr<Interaction>, std11::shared_ptr<DynamicalSystem>, InteractionProperties, DynamicalSystemProperties, GraphProperties>

Subclassed by InteractionsGraph

Private Functions

ACCEPT_SERIALIZATION(_InteractionsGraph)
struct DynamicalSystemProperties

for a DynamicalSystems

Public Functions

ACCEPT_SERIALIZATION(DynamicalSystemProperties)

Public Members

unsigned int absolute_position

Absolute position of the ds variables in the unknown vector in osnsp.

SP::SiconosMatrix lower_block

i,j block i>j

SP::OneStepIntegrator osi

Integrator used for the given DynamicalSystem.

SP::SiconosMatrix upper_block

i,j block i<j

SP::SimpleMatrix W

Matrix for integration.

SP::SimpleMatrix WBoundaryConditions

Matrix for integration of boundary conditions.

SP::VectorOfMatrices workMatrices

Mostly for Lagrangian system.

SP::VectorOfVectors workVectors

Used for instance in Newton iteration.

struct DynamicalSystemsGraph : public _DynamicalSystemsGraph

Public Functions

ACCEPT_SERIALIZATION(DynamicalSystemsGraph)

serialization hooks

void eraseProperties(_DynamicalSystemsGraph::VDescriptor vd)
DynamicalSystemsGraph::INSTALL_GRAPH_PROPERTIES(DynamicalSystems, ((VertexSP, MatrixIntegrator, Ad))((VertexSP, MatrixIntegrator, AdInt))((VertexSP, MatrixIntegrator, Ld))((VertexSP, MatrixIntegrator, Bd))((VertexSP, SiconosMatrix, B))((VertexSP, SiconosMatrix, L))((VertexSP, PluggedObject , pluginB))((VertexSP, PluggedObject , pluginL))((VertexSP, SiconosVector , e))((VertexSP, SiconosVector , u))((VertexSP, PluggedObject , pluginU))((VertexSP, PluggedObject , pluginJacgx))((VertexSP, SiconosVector , tmpXdot))((VertexSP, SimpleMatrix , jacgx))((Vertex, std::string, name))((Vertex, unsigned int, groupId)))

optional properties : memory is allocated only on first access

struct GraphProperties

Public Functions

ACCEPT_SERIALIZATION(GraphProperties)

Public Members

bool symmetric
struct InteractionProperties

the graph structure :

InteractionsGraph = L(DynamicalSystemsGraph)

where L is the line graph transformation

Properties on graph :

The properties on the graph enable to store the data that are specific to a simulation strategy. It avoids to burden the modeling classes that should be as independent as possible from the simulation choices.

There are mainly two types of properties

  • Mandatory properties DynamicalSystemProperties and InteractionProperties . These properties are always instanciated for any kind of simulation. The accessors to the property are illustrated in the following example : For a given SP::DynamicalSystem ds and a given graph SP::DynamicalSystemsGraph DSG

    DynamicalSystemsGraph::VDescriptor dsv = DSG->descriptor(ds); SP::OneStepintegrator osi = DSG->properties(dsv).osi;

  • Optional Properties They are installed thanks to the macro INSTALL_GRAPH_PROPERTIES.

    The accessors to the property are illustrated in the following example : For a given SP::DynamicalSystem ds and a given graph SP::DynamicalSystemsGraph DSG

    DynamicalSystemsGraph::VDescriptor dsv = DSG->descriptor(ds); DSG->name.insert(dsv, name); // insert the name in the property const std::string& name = DSG[*dsv]->name;

for an

Interaction

Public Functions

ACCEPT_SERIALIZATION(InteractionProperties)

Public Members

unsigned int absolute_position

Absolute position of the interaction variables in the unknown vector in osnsp.

unsigned int absolute_position_proj

Absolute position of the interaction variables in the unknown vector in osnsp for projection.

SP::SiconosMatrix block

diagonal block

bool forControl

true if the relation is used to add a control input to a DS

SP::DynamicalSystem source
unsigned int source_pos
SP::DynamicalSystem target
unsigned int target_pos
SP::VectorOfBlockVectors workBlockVectors

set of BlockVector, used as buffers in OneStepIntegrator classes.

SP::VectorOfSMatrices workMatrices

Internal buffers used on simulation size, to store jacobians or other temporary matrices.

SP::VectorOfVectors workVectors

set of SiconosVector, useful to ensure contiguous memory vectors, used as buffers in OneStepIntegrator classes.

struct InteractionsGraph : public _InteractionsGraph

Public Functions

ACCEPT_SERIALIZATION(InteractionsGraph)

serialization hooks

void eraseProperties(_InteractionsGraph::VDescriptor vd)
void eraseProperties(_InteractionsGraph::EDescriptor ed)
InteractionsGraph::INSTALL_GRAPH_PROPERTIES(Interactions, ((Vertex, SP::SimpleMatrix, blockProj))((Edge, SP::SimpleMatrix, upper_blockProj))((Edge, SP::SimpleMatrix, lower_blockProj))((Vertex, std::string, name)))

optional properties : memory is allocated only on first access