DUECA/DUSIME
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
integrate_rungekutta.hxx File Reference

Here a template function for Runge-Kutta integration is defined. More...

Include dependency graph for integrate_rungekutta.hxx:

Classes

class  RungeKuttaWorkspace
 This defines a "data-pack", with room for workspace for the Runge-Kutta integration. More...
 

Typedefs

typedef Eigen::Map< Eigen::VectorXd > VectorE
 a vector that takes external storage
 

Functions

template<class MOD >
void integrate_rungekutta (MOD &model, RungeKuttaWorkspace &ws, double dt)
 This function applies one Runge Kutta integration step to the state given in the kinematics argument.
 

Detailed Description

Here a template function for Runge-Kutta integration is defined.

Function Documentation

◆ integrate_rungekutta()

template<class MOD >
void integrate_rungekutta ( MOD & model,
RungeKuttaWorkspace & ws,
double dt )

This function applies one Runge Kutta integration step to the state given in the kinematics argument.

The forces, moments and gravitation applied by the forcer are taken into account.

The template parameter needs to stick to the following signature:

class MOD {
// calculate derivative for current time + dt
void derivative(VectorE& xd, double dt);
// return state
const VectorE& X() const;
// set state
void setState(const VectorE& newx);
};
Eigen::Map< Eigen::VectorXd > VectorE
a vector that takes external storage
Definition integrate_euler.hxx:29
Parameters
modelState-carrying object, one that can calculate its derivative.
wsworkspace for the integration.
dtTime step of the integration.
Examples
PulsedBody.cxx.