Class TimeStepping

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

class TimeStepping : public Simulation

Subclassed by TimeSteppingCombinedProjection, TimeSteppingDirectProjection

Public Functions

TimeStepping(SP::NonSmoothDynamicalSystem nsds, SP::TimeDiscretisation td, SP::OneStepIntegrator osi, SP::OneStepNSProblem osnspb)

Standard constructor.

Parameters
  • nsds: NonSmoothDynamicalSystem to be simulated
  • td: pointer to a timeDiscretisation used in the integration
  • osi: one step integrator (default none)
  • osnspb: one step non smooth problem (default none)

TimeStepping(SP::NonSmoothDynamicalSystem nsds, SP::TimeDiscretisation td, int nb = 0)

Constructor with the time-discretisation.

Parameters
  • nsds: NonSmoothDynamicalSystem to be simulated
  • td: pointer to a timeDiscretisation used in the integration
  • nb: number of non smooth problem

virtual ~TimeStepping()

Destructor.

ACCEPT_STD_VISITORS()

visitors hook

void advanceToEvent()

step from current event to next event of EventsManager

void computeFreeState()

integrates all the DynamicalSystems taking not into account nslaw, reactions (ie non-smooth part) …

void computeOneStep()

run one timestep of the simulation

virtual bool computeResiduR()

To known if the input interaction residu must be computed.

Return
bool _computeResiduR

virtual bool computeResiduY()

To know if the output interaction residu must be computed.

Return
bool _computeResiduY

void DefaultCheckSolverOutput(int info)

check returning value from computeOneStepNSProblem and process

Parameters
  • info: solver-specific error code return by the nonsmooth solver

unsigned int getNewtonCumulativeNbIterations()

To known the number of steps performed by the Newton algorithm.

Return
the cumulative number of steps performed by the Newton algorithm

unsigned int getNewtonNbIterations()

To known the number of steps performed by the Newton algorithm.

Return
the number of steps performed by the Newton algorithm

void initializeNewtonLoop()

initialize the Newton It computes the initial residu and set the, if needed to Newton variable to start the newton algorithm.

virtual void initOSNS()

initialisation specific to TimeStepping for OneStepNSProblem.

bool newtonCheckConvergence(double criterion)

check the convergence of Newton algorithm according to criterion

Return
bool = true if Newton method has converged
Parameters
  • criterion: convergence criterion

double newtonMaxIteration()

get the maximum number of Newton iteration

Return
maximum number of Newton solver iterations

unsigned int newtonOptions()

get the NewtonOptions

Return
Newton solver options - SICONOS_TS_LINEAR 1, SICONOS_TS_LINEAR_IMPLICIT 2, SICONOS_TS_NONLINEAR 3

double newtonResiduDSMax()

accessor to _newtonResiduDSMax

Return
_newtonResiduDSMax

double newtonResiduRMax()

accessor to _newtonResiduRMax

Return
_newtonResiduRMax

double newtonResiduYMax()

accessor to _newtonResiduYMax

Return
_newtonResiduYMax

double newtonTolerance()

get the Newton tolerance

Return
default Newton solver tolerance

virtual void nextStep()

Used by the updateIndexSet function in order to deactivate SP::Interaction.

Used by the updateIndexSet function in order to activate SP::Interaction.increment model current time according to User TimeDiscretisation and call SaveInMemory.

void resetLambdas()

Reset all lambdas of all interactions.

void run()

run the simulation, from t0 to T with default parameters if any setting has been done

void setCheckSolverFunction(CheckSolverFPtr newF)

Set CheckSolverOutput function.

Parameters
  • newF: pointer to function steering the behavior of simulation when nonsmooth solver failed

void setComputeResiduR(bool v)

To specify if the input interaction residu must be computed.

Parameters
  • v: set to true when the input interaction residu must be computed

void setComputeResiduY(bool v)

To specify if the output interaction residu must be computed.

Parameters
  • v: set to true when the output interaction residu must be computed

void setNewtonMaxIteration(unsigned int maxStep)

set the maximum number of Newton iteration

Parameters
  • maxStep: maximum number of Newton solver iterations

void setNewtonOptions(unsigned int v)

set the NewtonOptions

Parameters
  • v: Newton solver options

void setNewtonTolerance(double tol)

set the Default Newton tolerance

Parameters
  • tol: Newton solver tolerance

virtual void updateIndexSet(unsigned int i)

update indexSets[i] of the topology, using current y and lambda values of Interactions.

Parameters
  • i: the number of the set to be updated