Class D1MinusLinearOSI

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

class D1MinusLinearOSI : public OneStepIntegrator

Public Types

enum ListOfTypeOfD1MinusLinearOSI

Switching variable for various versions of D1MinusLinear.

Values:

enumerator halfexplicit_acceleration_level
enumerator halfexplicit_acceleration_level_full
enumerator explicit_velocity_level
enumerator halfexplicit_velocity_level
enumerator numberOfTypeOfD1MinusLinearOSI

Public Functions

D1MinusLinearOSI()

basic constructor

D1MinusLinearOSI(unsigned int type)

Constructor with type of D1MinusLinear.

Parameters

type – unsigned int that specifies the type of D1MinusLinear D1MinusLinearOSI::halfexplicit_acceleration_level, D1MinusLinearOSI::halfexplicit_acceleration_level_full, D1MinusLinearOSI::explicit_velocity_level, D1MinusLinearOSI::halfexplicit_velocity_level, D1MinusLinearOSI::numberOfTypeOfD1MinusLinearOSI

inline virtual ~D1MinusLinearOSI()

destructor

void setTypeOfD1MinusLinearOSI(unsigned int type)

Set the type of the D1MinusLinear.

Parameters

type – the type to set D1MinusLinearOSI::halfexplicit_acceleration_level, D1MinusLinearOSI::halfexplicit_acceleration_level_full, D1MinusLinearOSI::explicit_velocity_level, D1MinusLinearOSI::halfexplicit_velocity_level, D1MinusLinearOSI::numberOfTypeOfD1MinusLinearOSI

inline unsigned int typeOfD1MinusLinearOSI()

get the type of the D1MinusLinear

Returns

unsigned int type the type to set D1MinusLinearOSI::halfexplicit_acceleration_level, D1MinusLinearOSI::halfexplicit_acceleration_level_full, D1MinusLinearOSI::explicit_velocity_level, D1MinusLinearOSI::halfexplicit_velocity_level, D1MinusLinearOSI::numberOfTypeOfD1MinusLinearOSI

virtual unsigned int numberOfIndexSets() const override

get the number of index sets required for the simulation

Returns

unsigned int

virtual void initialize_nonsmooth_problems() override

initialization of the D1MinusLinearOSI integrator; for linear time invariant systems, we compute time invariant operator

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

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

virtual double computeResidu() override

return the maximum of all norms for the residus of DS

Post

{ds->residuFree will be calculated, ds->q() contains new position, ds->velocity contains predicted velocity}

Returns

double

virtual double computeResiduHalfExplicitAccelerationLevel()

return the maximum of all norms for the residus of DS for the type explicit_acceleration_level

Post

{ds->residuFree will be calculated, ds->q() contains new position, ds->velocity contains predicted velocity}

Returns

double

virtual double computeResiduHalfExplicitAccelerationLevelFull()

return the maximum of all norms for the residus of DS for the type explicit_acceleration_level_full

Post

{ds->residuFree will be calculated, ds->q() contains new position, ds->velocity contains predicted velocity}

Returns

double

virtual double computeResiduHalfExplicitVelocityLevel()

return the maximum of all norms for the residus of DS for the type explicit_acceleration_level_full

Post

{ds->residuFree will be calculated, ds->q() contains new position, ds->velocity contains predicted velocity}

Returns

double

virtual void computeFreeState() override

integrates the Dynamical System linked to this integrator without taking non-smooth effects into account

Post

{ds->velocity contains predicted velocity}

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

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

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

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

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 void integrate(double &ti, double &tf, double &t, int &flag) override

integrate the system, between tinit and tend (->iout=true), with possible stop at tout (->iout=false)

Parameters
virtual void updateState(const unsigned int level) override

updates the state of the Dynamical Systems

Parameters

level – level of interest for the dynamics: not used at the time

Post

{ds->velocity contains new velocity}

virtual bool addInteractionInIndexSet(SP::Interaction inter, unsigned int i) override

Apply the rule to one Interaction to known if is it should be included in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be added or not

virtual bool removeInteractionFromIndexSet(SP::Interaction inter, unsigned int i) override

Apply the rule to one Interaction to known if is it should be removed in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be removed or not

virtual bool addInteractionInIndexSetHalfExplicitAccelerationLevel(SP::Interaction inter, unsigned int i)

Apply the rule to one Interaction to known if is it should be included in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be added or not

virtual bool removeInteractionFromIndexSetHalfExplicitAccelerationLevel(SP::Interaction inter, unsigned int i)

Apply the rule to one Interaction to known if is it should be removed in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be removed or not

virtual bool addInteractionInIndexSetHalfExplicitVelocityLevel(SP::Interaction inter, unsigned int i)

Apply the rule to one Interaction to known if is it should be included in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be added or not

virtual bool removeInteractionFromIndexSetHalfExplicitVelocityLevel(SP::Interaction inter, unsigned int i)

Apply the rule to one Interaction to known if is it should be removed in the IndexSet of level i.

Parameters
  • inter – the involved interaction

  • i – the index set level

Returns

a boolean if it needs to be removed or not

inline virtual void display() override

displays the data of the D1MinusLinearOSI’s integrator

inline virtual void prepareNewtonIteration(double time) override

preparations for Newton iteration

Parameters

time – time