DUECA/DUSIME
|
Here a template function for Euler integration is defined. More...
Classes | |
class | EulerWorkspace |
This defines a "data-pack", with room for workspace for the Euler integration below. More... | |
Typedefs | |
typedef Eigen::Map< Eigen::VectorXd > | VectorE |
a vector that takes external storage | |
Functions | |
template<class MOD > | |
void | integrate_euler (MOD &model, EulerWorkspace &ws, double dt) |
This function applies one Euler integration step to the state given in the kinematics argument. | |
Here a template function for Euler integration is defined.
void integrate_euler | ( | MOD & | model, |
EulerWorkspace & | ws, | ||
double | dt ) |
This function applies one Euler integration step to the state given in the kinematics argument.
The forces, moments and gravitation applied by the forcer are taken into account. Note that Euler integration steps are really simple, and in practice rather coarse. This function is meant to be a reference implementation, normally you would want a more sophisticated integration method like Runge Kutta.
The template parameter needs to stick to the following signature:
model | State-carrying object, that can calculate its derivative. |
ws | Workspace. |
dt | Time step of the integration. |