|
Robotran C Documentation
|
Go to the documentation of this file.
16 #ifndef MBS_EULERIM_H_INCLUDED
17 #define MBS_EULERIM_H_INCLUDED
87 #endif // MBS_EULERIM_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
This header defines global functions for Euler Implicit integrator in C.
void initialize_euler_implicit(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Euler Implicit integrator.
Definition: mbs_euler_implicit.c:21
double ** Freeze_dfdy
Definition: mbs_euler_implicit.h:48
double * jpxv
Definition: mbs_euler_implicit.h:43
void finish_euler_implicit(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Euler Implicit integrator.
Definition: mbs_euler_implicit.c:128
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
double * B
Definition: mbs_euler_implicit.h:42
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
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 * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:160
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
double * delta_v
Definition: mbs_euler_implicit.h:39
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
void initialize_euler_implicit(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Euler Implicit integrator.
Definition: mbs_euler_implicit.c:21
double * yout
Allocation of a vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:155
int mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1067
void error_euler_implicit(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_implicit.c:165
void error_euler_implicit(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_implicit.c:165
int loop_euler_implicit(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_euler_implicit.c:56
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:238
void finish_euler_implicit(MbsData *mbs_data, MbsDirdyn *dd)
Finalize and clear memory allocated for Euler Implicit integrator.
Definition: mbs_euler_implicit.c:128
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
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
double ** A
Definition: mbs_euler_implicit.h:41
int Freeze_jacobian_index
Definition: mbs_euler_implicit.h:49
double * delta_p
Definition: mbs_euler_implicit.h:38
double * ysav
Definition: mbs_euler_implicit.h:35
int loop_euler_implicit(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_euler_implicit.c:56
double * Freeze_dfdx
Definition: mbs_euler_implicit.h:48
double * dfdx
Definition: mbs_euler_implicit.h:34
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1146
double * dysav
Definition: mbs_euler_implicit.h:36
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:399
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
int * indx
Definition: mbs_euler_implicit.h:45
double * Freeze_dydx
Definition: mbs_euler_implicit.h:48
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
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
int euler_implicit(double y[], double dydx[], int n, double *x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
Euler Implicit integrator implementation.
Definition: euler_implicit.c:27
Euler Implicit structure for dirdyn.
Definition: mbs_euler_implicit.h:31
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
double ** dfdy
Definition: mbs_euler_implicit.h:33
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89