chrono::ChLinkSpringCB::ODE Class Referenceabstract

Description

Class to be used as a callback interface for specifying the ODE, y' = f(t,y); y(0) = y0.

#include <ChLinkSpringCB.h>

Public Member Functions

virtual int GetNumStates () const =0
 Specify number of states (dimension of y).
 
virtual void SetInitialConditions (ChVectorDynamic<> &states, ChLinkSpringCB *link)=0
 Set initial conditions. More...
 
virtual void CalculateRHS (double time, const ChVectorDynamic<> &states, ChVectorDynamic<> &rhs, ChLinkSpringCB *link)=0
 Calculate and return the ODE right-hand side at the provided time and states. More...
 

Member Function Documentation

◆ CalculateRHS()

virtual void chrono::ChLinkSpringCB::ODE::CalculateRHS ( double  time,
const ChVectorDynamic<> &  states,
ChVectorDynamic<> &  rhs,
ChLinkSpringCB link 
)
pure virtual

Calculate and return the ODE right-hand side at the provided time and states.

Must load f(t,y).

Parameters
timecurrent time
statescurrent states
rhsoutput ODE right-hand side vector
linkback-pointer to associated link

◆ SetInitialConditions()

virtual void chrono::ChLinkSpringCB::ODE::SetInitialConditions ( ChVectorDynamic<> &  states,
ChLinkSpringCB link 
)
pure virtual

Set initial conditions.

Must load y0 = y(0).

Parameters
statesoutput initial conditions vector
linkback-pointer to associated link

The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/physics/ChLinkSpringCB.h