chrono::ChLinkTSDA::ODE Class Referenceabstract

Description

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

#include <ChLinkTSDA.h>

Inherited by chrono::vehicle::feda::FEDA_ShockODE.

Public Member Functions

virtual int GetNumStates () const =0
 Specify number of states (dimension of y).
 
virtual void SetInitialConditions (ChVectorDynamic<> &states, const ChLinkTSDA &link)=0
 Set initial conditions. More...
 
virtual void CalculateRHS (double time, const ChVectorDynamic<> &states, ChVectorDynamic<> &rhs, const ChLinkTSDA &link)=0
 Calculate and return the ODE right-hand side at the provided time and states. More...
 
virtual bool CalculateJac (double time, const ChVectorDynamic<> &states, const ChVectorDynamic<> &rhs, ChMatrixDynamic<> &jac, const ChLinkTSDA &link)
 Calculate the Jacobian of the ODE right-hand side with rerspect to the ODE states. More...
 

Member Function Documentation

◆ CalculateJac()

virtual bool chrono::ChLinkTSDA::ODE::CalculateJac ( double  time,
const ChVectorDynamic<> &  states,
const ChVectorDynamic<> &  rhs,
ChMatrixDynamic<> &  jac,
const ChLinkTSDA link 
)
inlinevirtual

Calculate the Jacobian of the ODE right-hand side with rerspect to the ODE states.

Only used if the link force is declared as stiff. If provided, load df/dy into the provided matrix 'jac' (already set to zero before the call) and return 'true'. In that case, the user-provided Jacobian will overwrite the default finite-difference approximation.

Parameters
timecurrent time
statescurrent ODE states
rhscurrent ODE right-hand side vector
jacoutput Jacobian matrix
linkassociated TSDA link

◆ CalculateRHS()

virtual void chrono::ChLinkTSDA::ODE::CalculateRHS ( double  time,
const ChVectorDynamic<> &  states,
ChVectorDynamic<> &  rhs,
const ChLinkTSDA 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 ODE states
rhsoutput ODE right-hand side vector
linkassociated TSDA link

◆ SetInitialConditions()

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

Set initial conditions.

Must load y0 = y(0).

Parameters
statesoutput initial conditions vector
linkassociated TSDA link

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