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:

halfexplicit_acceleration_level
halfexplicit_acceleration_level_full
explicit_velocity_level
halfexplicit_velocity_level
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

virtual ~D1MinusLinearOSI()

destructor

ACCEPT_STD_VISITORS()

visitors hook

virtual bool addInteractionInIndexSet(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.

Return
a boolean if it needs to be added or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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.

Return
a boolean if it needs to be added or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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.

Return
a boolean if it needs to be added or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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

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

Parameters

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

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

Parameters

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

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

Parameters

virtual void computeFreeState()

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

Post
{ds->velocity contains predicted velocity}

virtual double computeResidu()

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}
Return
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}
Return
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}
Return
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}
Return
double

virtual void display()

displays the data of the D1MinusLinearOSI’s integrator

virtual void initialize_nonsmooth_problems()

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

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

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

virtual void integrate(double &ti, double &tf, double &t, int &flag)

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

Parameters
  • ti: initial time
  • tf: end time
  • t: real end time
  • flag: useless flag (for D1MinusLinearOSI, used in LsodarOSI)

unsigned int numberOfIndexSets() const

get the number of index sets required for the simulation

Return
unsigned int

virtual void prepareNewtonIteration(double time)

preparations for Newton iteration

Parameters
  • time: time

virtual bool removeInteractionFromIndexSet(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.

Return
a boolean if it needs to be removed or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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.

Return
a boolean if it needs to be removed or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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.

Return
a boolean if it needs to be removed or not
Parameters
  • inter: the involved interaction
  • i: the index set level

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

unsigned int typeOfD1MinusLinearOSI()

get the type of the D1MinusLinear

Return
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 void updateState(const unsigned int level)

updates the state of the Dynamical Systems

Post
{ds->velocity contains new velocity}
Parameters
  • level: level of interest for the dynamics: not used at the time