Class NewMarkAlphaOSI

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

class NewMarkAlphaOSI : public OneStepIntegrator

NewMarkAlpha Scheme Time-Integrator for Dynamical Systems.

NewMarkAlphaOSI is used to solve constrained dynamical systems represented by index-3 DAE

NewMarkAlphaOSI is instantiated with values of beta, gamma, alpha_m, alpha_f 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.

Public Functions

NewMarkAlphaOSI(double beta, double gamma, double alpha_m, double alpha_f, bool flag)

constructor with only parameters beta, gamma, alpha_m, alpha_f

Parameters
  • beta: double
  • gamma: double
  • alpha_m: double
  • alpha_f: double
  • flag: true of working at velocity level

NewMarkAlphaOSI(double rho_infty, bool flag)

constructor with only the parameter rho_infty

Parameters
  • rho_infty: double
  • flag: true of working at velocity level

virtual ~NewMarkAlphaOSI()

destructor

void computeCoefsDenseOutput(SP::DynamicalSystem ds)

Compute coefficients of the polynomial of the dense output for a given DS.

Parameters
  • ds: SP::DynamicalSystem, ds concerned

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

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

Parameters

void computeFreeState()

compute the free state of the discretized dynamical system

double computeResidu()

compute the residual of dynamical equation

Return
double: maximum residu over all DSs

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

compute W matrix

Parameters

void correction()

correct state of all levels of Dynamical Systems after each Newton iteration

void DenseOutputallDSs(double time)

Generate dense output for all Dynamical Systems belonging to OSI.

Parameters
  • time: at which we want to generate the dense output

void display()

Displays the data of the NewMarkAlpha’s integrator.

double getAlpha_f()

get value of alpha_f

Return
double

double getAlpha_m()

get value of alpha_m

Return
double

double getBeta()

get value of beta

Return
double

bool getFlagVelocityLevel()

get the flag _IsVelocityLevel

Return
bool

double getGamma()

get value of gamma

Return
double

unsigned int getOrderDenseOutput()

get the order of the polynomial for dense output

Return
unsigned int

const SimpleMatrix getW(SP::DynamicalSystem ds)

get matrix W

Return
SimpleMatrix
Parameters

void initializeIterationMatrixW(SP::DynamicalSystem ds)

initialize W matrix

Parameters

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

initialize

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 &flag)

integrate the system, between tinit and tend with possible stop at tout

Parameters
  • tinit: double: tinit, initial time
  • tend: double: tend, end time
  • tout: double: tout, real end time
  • flag: useless for NewMarkAlphaOSI

unsigned int numberOfIndexSets() const

get the number of index sets required for the simulation

Return
unsigned int

void prediction()

predict first values for the Newton iteration

void prepareEventLocalization()

prepare for Event localization

void prepareNewtonIteration(double time)

prepare for Newton Iteration

Parameters
  • time:

void setAlpha_f(double value_alpha_f)

set value to the parameter alpha_f

Parameters
  • value_alpha_f: double : value of alpha_f

void setAlpha_m(double value_alpha_m)

set value to the parameter alpha_m

Parameters
  • value_alpha_m: double : value of alpha_m

void setBeta(double beta)

set value to the parameter beta

Parameters
  • beta: value of beta

void setFlagVelocityLevel(bool flag)

set the flag _IsVelocityLevel

Parameters
  • flag: bool

void setGamma(double value_gamma)

set value to the parameter gamma

Parameters
  • value_gamma: double : value of gamma

void setParametersFromRho_infty(double rho_infty)

set values to the parameters beta, gamma, alpha_f, alpha_m from the value of rho_infty

Parameters
  • rho_infty: double : value of rho_infty

void updateState(const unsigned int level)

updates the state of the Dynamical Systems

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

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

get pointer to the maxtrix W

Return
SP::SimpleMatrix
Parameters