Class GenericMechanical

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

class GenericMechanical : public LinearOSNS

Formalization and Resolution of a generic mechanical problem: It mixes bilateral equality, complementarity, impact and friction problems.

This class is devoted to contains of a set of Non-Smooth Problem.

Main functions:

  • formalization of the problem: computes M,q using the set of “active” Interactions from the simulation and

    the interactionBlock-matrices saved in the field interactionBlocks.


    initialize(), computeInteractionBlock(), preCompute()

  • solving of the GenericMechanical problem: function compute(), used to call solvers from Numerics through

    the gmp_driver() interface of Numerics.

  • post-treatment of data: set values of y/lambda variables of the active Interaction (ie Interactions) using

    ouput results from the solver (velocity,reaction); function


Public Functions

GenericMechanical(int FC3D_Solver_Id = SICONOS_FRICTION_3D_ONECONTACT_NSN)

constructor from solver id

  • numericsSolverId: id of the internal friction solver of the generic problem default = SICONOS_FRICTION_3D_ONECONTACT_NSN

GenericMechanical(SP::SolverOptions options)

constructor from a pre-defined solver options set.





visitors hook

int compute(double time)

Compute the unknown reaction and velocity and update the Interaction (y and lambda )


int information about the solver convergence (0: ok, >0 problem, see Numerics documentation)

  • time: double current time

virtual void computeDiagonalInteractionBlock(const InteractionsGraph::VDescriptor &vd)

compute diagonal Interaction block

  • vd: a vertex descriptor

virtual void computeInteractionBlock(const InteractionsGraph::EDescriptor &ed)

compute extra-diagonal interactionBlock-matrix

  • ed: an edge descriptor

void display() const

print the data to the screen

void initialize(SP::Simulation sim)

initialize the GenericMechanical problem(compute topology …)

  • sim: the simulation, owner of this OSNSPB

void updateInteractionBlocks()

compute interactionBlocks if necessary (this depends on the type of OSNS, on the indexSets …)