File kernel/src/simulationTools/NewMarkAlphaOSI.hpp#
Go to the source code of this file
NewMark Alpha Scheme Time-Integrator for Dynamical Systems
-
class NewMarkAlphaOSI : public OneStepIntegrator
- #include <NewMarkAlphaOSI.hpp>
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 Types
-
enum NewMarkAlphaOSI_ds_workVector_id#
Values:
-
enumerator RESIDU_FREE#
-
enumerator FREE#
-
enumerator ACCE_LIKE#
-
enumerator ACCE_MEMORY#
-
enumerator WORK_LENGTH#
-
enumerator RESIDU_FREE#
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
-
inline virtual ~NewMarkAlphaOSI()
destructor
-
inline void setBeta(double beta)
set value to the parameter beta
- Parameters:
beta – value of beta
-
inline void setGamma(double value_gamma)
set value to the parameter gamma
- Parameters:
value_gamma – double : value of gamma
-
inline void setAlpha_m(double value_alpha_m)
set value to the parameter alpha_m
- Parameters:
value_alpha_m – double : value of alpha_m
-
inline void setAlpha_f(double value_alpha_f)
set value to the parameter alpha_f
- Parameters:
value_alpha_f – double : value of alpha_f
-
inline 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
-
inline double getBeta()
get value of beta
- Returns:
double
-
inline double getGamma()
get value of gamma
- Returns:
double
-
inline double getAlpha_m()
get value of alpha_m
- Returns:
double
-
inline double getAlpha_f()
get value of alpha_f
- Returns:
double
-
inline unsigned int getOrderDenseOutput()
get the order of the polynomial for dense output
- Returns:
unsigned int
-
inline void setFlagVelocityLevel(bool flag)
set the flag _IsVelocityLevel
- Parameters:
flag – bool
-
inline bool getFlagVelocityLevel()
get the flag _IsVelocityLevel
- Returns:
bool
-
const SimpleMatrix getW(SP::DynamicalSystem ds)
get matrix W
- Parameters:
ds – SP::DynamicalSystem DynamicalSystem concerned
- Returns:
-
SP::SimpleMatrix W(SP::DynamicalSystem ds)
get pointer to the maxtrix W
- Parameters:
ds – SP::DynamicalSystem DynamicalSystem concerned
- Returns:
SP::SimpleMatrix
-
void initializeIterationMatrixW(SP::DynamicalSystem ds)
initialize W matrix
- Parameters:
ds – a pointer to DynamicalSystem
-
void computeW(SP::DynamicalSystem ds, SiconosMatrix &W)
compute W matrix
- Parameters:
ds – a pointer to DynamicalSystem
W – the result in W
-
virtual double computeResidu() override
compute the residual of dynamical equation
- Returns:
double: maximum residu over all DSs
-
virtual void computeFreeState() override
compute the free state of the discretized dynamical system
-
virtual void computeFreeOutput(InteractionsGraph::VDescriptor &vertex_inter, OneStepNSProblem *osnsp) override
integrates the Interaction linked to this integrator, without taking non-smooth effects into account
- Parameters:
vertex_inter – of the interaction graph
osnsp – pointer to OneStepNSProblem
-
inline virtual SiconosVector &osnsp_rhs(InteractionsGraph::VDescriptor &vertex_inter, InteractionsGraph &indexSet) override
return the workVector corresponding to the right hand side of the OneStepNonsmooth problem
-
virtual void initializeWorkVectorsForDS(double t, SP::DynamicalSystem ds) override
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
-
virtual void initializeWorkVectorsForInteraction(Interaction &inter, InteractionProperties &interProp, DynamicalSystemsGraph &DSG) override
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
-
inline virtual unsigned int numberOfIndexSets() const override
get the number of index sets required for the simulation
- Returns:
unsigned int
-
virtual void prepareNewtonIteration(double time) override
prepare for Newton Iteration
- Parameters:
time –
-
void prediction()
predict first values for the Newton iteration
-
void correction()
correct state of all levels of Dynamical Systems after each Newton iteration
-
virtual void integrate(double &tinit, double &tend, double &tout, int &flag) override
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
-
virtual void updateState(const unsigned int level) override
updates the state of the Dynamical Systems
- Parameters:
level – the level of interest for the dynamics: not used at the time
-
void computeCoefsDenseOutput(SP::DynamicalSystem ds)
Compute coefficients of the polynomial of the dense output for a given DS.
- Parameters:
ds – SP::DynamicalSystem, ds concerned
-
void prepareEventLocalization()
prepare for Event localization
-
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
-
virtual void display() override
Displays the data of the NewMarkAlpha’s integrator.
-
ACCEPT_STD_VISITORS()#
Protected Functions
-
ACCEPT_SERIALIZATION(NewMarkAlphaOSI)#
-
inline NewMarkAlphaOSI()#
Default constructor.
Protected Attributes
-
double _beta#
Parameters of the numerical scheme: beta, gamma, alpha_m, alpha_f.
-
double _gamma#
-
double _alpha_m#
-
double _alpha_f#
-
unsigned int _orderDenseOutput#
Order of the polynomial for dense output.
-
bool _IsVelocityLevel#
Indicator whether or not constraints at the velocity level are handled _IsVelocityLevel = true: constraints at the velocity level are handled _IsVelocityLevel = false: constraints at the position are handled.
-
enum NewMarkAlphaOSI_ds_workVector_id#