|
Robotran C Documentation
|
Go to the documentation of this file.
15 #ifndef MBS_DIRDYN_STRUCT_h
16 #define MBS_DIRDYN_STRUCT_h
20 #include "../mbs_numerics/integrator.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:112
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_dirdyn_struct.h:176
char * buffer_format
Definition: mbs_dirdyn_struct.h:86
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: integrator.h:39
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:153
double baumgarte_beta
beta parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:118
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:152
double dt_max
maximal time step [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:130
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:160
int nmax
maximal number of steps [-], default = 1e9
Definition: mbs_dirdyn_struct.h:126
double * yout
Allocation of a vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:155
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:101
void(* initialize_integrator_ptr)(MbsData *mbs_data, MbsDirdyn *mbs_dd)
These three pointers of functions should be defined for each integrator separately,...
Definition: integrator.h:37
int bufferNb
Number of buffer required to save the current system topology (ie. coordinates, links....
Definition: mbs_dirdyn_struct.h:171
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:183
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:189
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:149
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_dirdyn_struct.h:169
Definition: mbs_buffer.h:46
int flag_compute_Qc
choose to compute (or not) the Qc for driven variables.
Definition: mbs_dirdyn_struct.h:96
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 show_failed_closure
1 to generate animation of the failed Newton-Raphson procedure, default = 0.
Definition: mbs_dirdyn_struct.h:137
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:99
double baumgarte_alpha
alpha parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:117
void(* finish_integrator_ptr)(MbsData *mbs_data, MbsDirdyn *mbs_dd)
end of the integration, free the memory
Definition: integrator.h:41
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:134
int framerate
number of frame per second for the .anim file, default = 1000
Definition: mbs_dirdyn_struct.h:69
double toler
mixed error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:127
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:166
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
double rtoler
relative error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:128
MbsAux * mbs_aux
Definition: mbs_dirdyn_struct.h:147
int flag_baumgarte_stabilization
1 if user wants baumgarte stabilization of the independant accelerations
Definition: mbs_dirdyn_struct.h:116
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
const char * respath
Path in which result file are saved.
Definition: mbs_dirdyn_struct.h:58
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:185
int integrator
Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire,...
Definition: mbs_dirdyn_struct.h:108
int verbose
1 to get print indications related to time adaptive integrator, 0 otherwise, default = 1
Definition: mbs_dirdyn_struct.h:110
const char * animpath
Path in which anim file is saved.
Definition: mbs_dirdyn_struct.h:63
double delta_t_wp
time interval between two waypoints [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:123
int realtime
1 to activate to real-time features, 0 to deactivate them, default = 0
Definition: mbs_dirdyn_struct.h:88
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
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_dirdyn_struct.h:163
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
double dt
current integration step size
Definition: mbs_dirdyn_struct.h:150
loop_integrator_ptr loop_integrator
pointer to integrator looping function
Definition: mbs_dirdyn_struct.h:187
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
int flag_stop_stiff
1 to stop integration if it become stiff, 0 (default value) otherwise, default = 0
Definition: mbs_dirdyn_struct.h:111
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:179
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_dirdyn_struct.h:173