|
Robotran C Documentation
|
Go to the documentation of this file.
15 #ifndef MBS_EULEREX_H_INCLUDED
16 #define MBS_EULEREX_H_INCLUDED
26 #define P_INF_VALUE 0.143 // value tat was best for haptic piano, see ST
111 #endif // MBS_EULEREX_H_INCLUDED
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
void initialize_eulerEx(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Euler Explicit integrator.
Definition: mbs_euler_explicit.c:19
void alpha_method(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for a simplified alpha-method We call it AlphaM.
Definition: mbs_euler_explicit.c:167
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
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
void euler_explicit(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for the Euler Explicit integration.
Definition: mbs_euler_explicit.c:143
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
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 alpha_f
Definition: mbs_euler_explicit.h:41
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:160
void error_eulerEx(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_eu...
Definition: mbs_euler_explicit.c:133
int mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1067
@ Eulaire
Definition: integrator.h:29
#define P_INF_VALUE
Definition: mbs_euler_explicit.h:26
void eulaire(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for unknown integrator but based partially on euler explicit We call it Eulaire.
Definition: mbs_euler_explicit.c:155
int loop_eulerEx(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_euler_explicit.c:55
double alpha_m
Definition: mbs_euler_explicit.h:41
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
double dt0
initial value of the integration step size, default = 0.001
Definition: mbs_dirdyn_struct.h:45
void finish_eulerEx(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Euler Explicit integrator.
Definition: mbs_euler_explicit.c:116
int loop_eulerEx(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_euler_explicit.c:55
void user_dirdyn_loop(MbsData *mbs_data, MbsDirdyn *mbs_dd)
user own loop functions
Definition: user_dirdyn.c:46
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:149
double beta
Definition: mbs_euler_explicit.h:41
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
Euler Explicit structure for dirdyn.
Definition: mbs_euler_explicit.h:36
double div_alpha_m
internal parameters of the alpha-method
Definition: mbs_euler_explicit.h:41
void euler_explicit(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for the Euler Explicit integration.
Definition: mbs_euler_explicit.c:143
double gamma
Definition: mbs_euler_explicit.h:41
void finish_eulerEx(MbsData *mbs_data, MbsDirdyn *dd)
Finalize and clear memory allocated for Euler Explicit integrator.
Definition: mbs_euler_explicit.c:116
void alpha_method(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for a simplified alpha-method We call it AlphaM.
Definition: mbs_euler_explicit.c:167
@ AlphaM
Definition: integrator.h:29
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1146
This header defines global functions for Euler Explicit integrator in C.
double * a_n_1
vector used for alpha-method to store current internal accelerations
Definition: mbs_euler_explicit.h:40
void error_eulerEx(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_eu...
Definition: mbs_euler_explicit.c:133
euler_integrator_implementation choice_of_euler
to choose between Eulaire, Alpah method and Euler explicit
Definition: mbs_euler_explicit.h:38
Definition: mbs_data.h:149
#define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max
Definition: mbs_dirdyn_struct.h:32
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
This header defines specific integrators functions in C.
int integrator
Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire,...
Definition: mbs_dirdyn_struct.h:108
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:906
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
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
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
double dt
current integration step size
Definition: mbs_dirdyn_struct.h:150
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
double * a_n
vector used for alpha-method to store previous internal accelerations
Definition: mbs_euler_explicit.h:39
void eulaire(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Source code for unknown integrator but based partially on euler explicit We call it Eulaire.
Definition: mbs_euler_explicit.c:155
void initialize_eulerEx(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Euler Explicit integrator.
Definition: mbs_euler_explicit.c:19
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
void(* euler_integrator_implementation)(double h, MbsData *mbs_data, MbsDirdyn *mbs_dd)
This pointer is used to choose between the two implementations of euler.
Definition: mbs_euler_explicit.h:31