|
Robotran C Documentation
|
Go to the documentation of this file.
15 #ifndef MBS_DIRDYN_STRUCT_h
16 #define MBS_DIRDYN_STRUCT_h
22 #define DOPRI5_NB_ALLOC_VEC 8
27 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_nmax (int) 1e9
28 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_toler 1.0e-3
29 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_rtoler 1.0e-3
30 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_atoler 1.0e-6
31 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_dt_max 1.0e-3
32 #define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max 1.0e-10
int flag_precise_dynamics
= 1 to call the direct dynamics at the beginning of each time step of integration.
Definition: mbs_dirdyn_struct.h:118
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_dirdyn_struct.h:198
char * buffer_format
if NULL, "%e" is used. Can be for instance XXX->options->buffer_format = "%4.7f";....
Definition: mbs_dirdyn_struct.h:86
int accelred
1 to use accelred, 0 otherwise, default = 0
Definition: mbs_dirdyn_struct.h:90
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:175
double baumgarte_beta
beta parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:124
buffer used to store the user variables to output
Definition: mbs_buffer.h:92
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:174
void(* finish_integrator_ptr)(MbsData *mbs_data, MbsDirdyn *mbs_dd)
end of the integration, free the memory
Definition: mbs_dirdyn_struct.h:161
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1252
double dt_max
maximal time step [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:136
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:182
int nmax
maximal number of steps [-], default = 1e9
Definition: mbs_dirdyn_struct.h:132
double * yout
Allocation of a vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:177
int * compute_Qc
If options-flag_compute_Qc is set to 0, the vector allows to compute only the needed Qc.
Definition: mbs_dirdyn_struct.h:102
int bufferNb
Number of buffer required to save the current system topology (ie. coordinates, links....
Definition: mbs_dirdyn_struct.h:193
int save2file
Determine whether results are written to files on disk (in resultsR folder): 1: results are saved 0: ...
Definition: mbs_dirdyn_struct.h:51
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:205
int saveperiod
The number of time steps between two buffer records default: 1 (every time step are recorded)
Definition: mbs_dirdyn_struct.h:74
finish_integrator_ptr finish_integrator
pointer to integrator closing function
Definition: mbs_dirdyn_struct.h:211
double dt0
initial value of the integration step size, default = 0.001
Definition: mbs_dirdyn_struct.h:45
char * resfilename
The keyword used for determining the name of result files Default: 'dirdyn', or 'oneshot' in case the...
Definition: mbs_dirdyn_struct.h:54
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:171
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_dirdyn_struct.h:191
Definition: mbs_buffer.h:46
char * respath
Path in which result file are saved.
Definition: mbs_dirdyn_struct.h:58
int flag_compute_Qc
choose to compute (or not) the Qc for driven variables.
Definition: mbs_dirdyn_struct.h:97
double tf
final time of the simulation, default = 5.0
Definition: mbs_dirdyn_struct.h:43
int save_visu
1 to save the visualizazion file (as it appears in 'user_realtime_visu.c'), 0 otherwise (only valid i...
Definition: mbs_dirdyn_struct.h:67
int flag_symbolic_jacobian
1 to use symbolic computation of the jacobian. Only used with implicit integrators....
Definition: mbs_dirdyn_struct.h:141
int show_failed_closure
1 to generate animation of the failed Newton-Raphson procedure, default = 0.
Definition: mbs_dirdyn_struct.h:144
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_dirdyn_struct.h:85
int compute_all_uxd
choose to compute (or not) the user derivative during dirdyn time integration. For dirdyn only....
Definition: mbs_dirdyn_struct.h:100
double baumgarte_alpha
alpha parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:123
int n_freeze
number of time step when the jacobian is freezed (computed once at the start of the n_freeze time ste...
Definition: mbs_dirdyn_struct.h:140
int framerate
number of frame per second for the .anim file, default = 1000
Definition: mbs_dirdyn_struct.h:69
int mbs_fct_dirdyn(double t, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1169
double toler
mixed error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:133
int flag_oneshot
1 to compute the derivative function only once (no time integration !), default = 0 The time is the v...
Definition: mbs_dirdyn_struct.h:92
MbsBuffer ** buffer_visu
buffer used to save the visualization as it appears in 'user_realtime_visu.c'
Definition: mbs_dirdyn_struct.h:188
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1), default = 1
Definition: mbs_dirdyn_struct.h:65
int max_save_user
The maximal number of user variables saved default: 12.
Definition: mbs_dirdyn_struct.h:79
Definition: mbs_data.h:246
double rtoler
relative error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:134
MbsAux * mbs_aux
Definition: mbs_dirdyn_struct.h:169
int flag_baumgarte_stabilization
1 if user wants baumgarte stabilization of the independant accelerations
Definition: mbs_dirdyn_struct.h:122
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
double t0
initial time of the simulation, default = 0.0
Definition: mbs_dirdyn_struct.h:41
initialize_integrator_ptr initialize_integrator
pointer to integrator initialize function
Definition: mbs_dirdyn_struct.h:207
int integrator
Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire,...
Definition: mbs_dirdyn_struct.h:109
int verbose
Verbosity level propagated to other compatible module:
Definition: mbs_dirdyn_struct.h:111
double delta_t_wp
time interval between two waypoints [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:129
int realtime
1 to activate to real-time features, 0 to deactivate them, default = 0
Definition: mbs_dirdyn_struct.h:88
void(* initialize_integrator_ptr)(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))
These three pointers of functions should be defined for each integrator separately,...
Definition: mbs_dirdyn_struct.h:153
int flag_solout_wp
1 to call solout only at required waypoints (only if flag_waypoint activated), default = 0
Definition: mbs_dirdyn_struct.h:128
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_dirdyn_struct.h:185
double atoler
absolute error tolerances [-], default = 1.0e-6
Definition: mbs_dirdyn_struct.h:135
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:166
int flag_waypoint
1 to use waypoints, 0 otherwise, default =0
Definition: mbs_dirdyn_struct.h:127
double dt
current integration step size
Definition: mbs_dirdyn_struct.h:172
int(* loop_integrator_ptr)(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
main loop of integration, in which the integrator is called
Definition: mbs_dirdyn_struct.h:159
loop_integrator_ptr loop_integrator
pointer to integrator looping function
Definition: mbs_dirdyn_struct.h:209
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:168
int flag_stop_stiff
1 to stop integration if it become stiff, 0 (default value) otherwise, default = 0
Definition: mbs_dirdyn_struct.h:117
char * animpath
Path in which anim file is saved.
Definition: mbs_dirdyn_struct.h:63
int flag_ongoing_jac_computation
flag is ON (=1) when the implicit integrator is currently computing the jacobian, default is 0.
Definition: mbs_dirdyn_struct.h:201
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_dirdyn_struct.h:195