|
Robotran C Documentation
|
Go to the documentation of this file.
13 #ifndef MBS_DOPRI5_H_INCLUDED
14 #define MBS_DOPRI5_H_INCLUDED
108 #endif // MBS_DOPRI5_H_INCLUDED
int fcn_dopri5(unsigned int n, long nr, double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *mbs_dd)
dopri5 derivative function
Definition: mbs_dopri5.c:89
double dt0
Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set fro...
Definition: mbs_data.h:212
Dopri5 structure for dirdyn.
Definition: mbs_dopri5.h:30
double tsim
The time value.
Definition: mbs_data.h:208
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:153
#define DOPRI5_NB_ALLOC_VEC
number of vectors to allocate for dopri5
Definition: mbs_dirdyn_struct.h:22
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_do...
Definition: mbs_dopri5.c:161
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:880
double dt_max
maximal time step [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:130
int nmax
maximal number of steps [-], default = 1e9
Definition: mbs_dirdyn_struct.h:126
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
Definition: mbs_dopri5.c:128
int mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1067
void initialize_dopri5(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Dopri5 integrator.
Definition: mbs_dopri5.c:20
int loop_dopri5(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_dopri5.c:43
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
This header defines function for dopri5 in C. based on an external source (see below)
double dt0
initial value of the integration step size, default = 0.001
Definition: mbs_dirdyn_struct.h:45
void user_dirdyn_loop(MbsData *mbs_data, MbsDirdyn *mbs_dd)
user own loop functions
Definition: user_dirdyn.c:46
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
void finish_dopri5(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for dopri5 integrator.
Definition: mbs_dopri5.c:64
void initialize_dopri5(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Dopri5 integrator.
Definition: mbs_dopri5.c:20
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_do...
Definition: mbs_dopri5.c:161
static double hout
Definition: dopri5.c:30
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1146
int dopri5(unsigned n, FcnEqDiff fcn, double x, double *y, double xend, double *rtoler, double *atoler, int itoler, SolTrait solout, int iout, double uround, double safe, double fac1, double fac2, double beta, double hmax, double h, long nmax, int meth, long nstiff, unsigned nrdens, unsigned *icont, unsigned licont, double **dopri5_alloc_tab, MbsData *s, MbsDirdyn *dd, double *last_h)
See the source file for more informations.
Definition: dopri5.c:530
void finish_dopri5(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for dopri5 integrator.
Definition: mbs_dopri5.c:64
double * dydt_save
save dydt of the last time step
Definition: mbs_dopri5.h:36
int flag_save
1 if first dydt save done, 0 otherwise
Definition: mbs_dopri5.h:32
Definition: mbs_data.h:149
double rtoler
relative error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:128
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
double t0
Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/inv...
Definition: mbs_data.h:210
This header defines specific integrators functions in C.
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
double solout_last_t
last time solout was called
Definition: mbs_dopri5.h:34
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
Definition: mbs_dopri5.c:128
int fcn_dopri5(unsigned int n, long nr, double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *mbs_dd)
dopri5 derivative function
Definition: mbs_dopri5.c:89
int flag_solout_wp
1 to call solout only at required waypoints (only if flag_waypoint activated), default = 0
Definition: mbs_dirdyn_struct.h:122
double ** alloc_tab
allocated state vectors
Definition: mbs_dopri5.h:38
double atoler
absolute error tolerances [-], default = 1.0e-6
Definition: mbs_dirdyn_struct.h:129
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
int flag_waypoint
1 to use waypoints, 0 otherwise, default =0
Definition: mbs_dirdyn_struct.h:121
int loop_dopri5(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_dopri5.c:43
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146