This file implements the functions of the dopri5 integrator in C. More...
#include "dopri5.h"#include "mbs_dopri5.h"#include "mbs_1D_array.h"#include "mbs_dirdyn_struct.h"Functions | |
| void | initialize_dopri5 (MbsData *mbs_data, MbsDirdyn *mbs_dd, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), void(*loop_fct)(MbsData *, MbsDirdyn *), int(*save_realtime_update)(MbsDirdyn *dd, MbsData *mbs_data)) |
| Initialize all needed fields in MbsDirdyn for Dopri5 integrator. More... | |
| int | loop_dopri5 (double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd) |
| Integrate the motion from t0 to tf. More... | |
| void | finish_dopri5 (MbsData *mbs_data, MbsDirdyn *mbs_dd) |
| Finalize and clear memory allocated for dopri5 integrator. More... | |
| int | fcn_dopri5 (unsigned int n, long nr, double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *mbs_dd) |
| dopri5 derivative function More... | |
| int | solout_dopri5 (long nr, double tsim_old, double tsim, double y[], unsigned n, int *irtrn, int init_flag, MbsData *s, MbsDirdyn *mbs_dd) |
| dopri5 simulation own gestion at each succesful step More... | |
| void | error_dopri5 (MbsData *mbs_data, MbsDirdyn *dd, int err) |
| If an error occurs during time integration, this function prints the error message and call finish_dopri5. More... | |
This file implements the functions of the dopri5 integrator in C.
Creation date: September 2015
Modification date: April 2018 \modified by Sebastien Timmermans
(c) Universite catholique de Louvain
If an error occurs during time integration, this function prints the error message and call finish_dopri5.
| mbs_data | The computed MBS structure |
| mbs_dd | The associated MbsDirdyn structure |
| err | The error number |
| int fcn_dopri5 | ( | unsigned int | n, |
| long | nr, | ||
| double | tsim, | ||
| double | y[], | ||
| double | dydt[], | ||
| MbsData * | s, | ||
| MbsDirdyn * | mbs_dd | ||
| ) |
dopri5 derivative function
| [in] | n | dimension of the system [-] |
| [in] | nr | solour iteration [-] |
| [in] | tsim | current simulation time [s] |
| [in] | y | state vector of size n |
| [out] | dydt | derivative of state vector y |
| [in,out] | s | Robotran main structure |
| [in,out] | mbs_dd | direct dynamic main module structure |
Finalize and clear memory allocated for dopri5 integrator.
| mbs_data | The computed MBS structure |
| mbs_dd | The associated MbsDirdyn structure |
Integrate the motion from t0 to tf.
| t0 | The initial time |
| tf | The final time |
| mbs_data | The computed MBS structure |
| mbs_dd | The associated MbsDirdyn structure |
| int solout_dopri5 | ( | long | nr, |
| double | tsim_old, | ||
| double | tsim, | ||
| double | y[], | ||
| unsigned | n, | ||
| int * | irtrn, | ||
| int | init_flag, | ||
| MbsData * | s, | ||
| MbsDirdyn * | mbs_dd | ||
| ) |
dopri5 simulation own gestion at each succesful step
| [in] | nr | solour iteration [-] |
| [in] | tsim_old | last time solout was called [s] |
| [in] | tsim | current simulation time [s] |
| [in] | y | state vector of size n |
| [in] | n | dimension of the system [-] |
| [out] | irtrn | set a negative value to stop the simulation |
| [in] | init_flag | 1 if initial call to solout, 0 otherwise |
| [in,out] | s | Robotran main structure |
| [in,out] | mbs_dd | direct dynamic main module structure |
1.8.17