|
Robotran C Documentation
|
Go to the documentation of this file.
13 #ifndef MBS_CUSTOM_H_INCLUDED
14 #define MBS_CUSTOM_H_INCLUDED
68 #endif // MBS_CUSTOM_H_INCLUDED
void error_custom(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_cu...
Definition: mbs_custom.c:125
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
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
int loop_custom(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf with a custom integrator implemented by the user.
Definition: mbs_custom.c:39
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
void finish_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Custom integrator.
Definition: mbs_custom.c:115
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:160
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 initialize_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Custom integrator.
Definition: mbs_custom.c:22
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
int loop_custom(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf with a custom integrator implemented by the user.
Definition: mbs_custom.c:39
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
void initialize_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Custom integrator.
Definition: mbs_custom.c:22
This header defines function for bader integrators in C. based on an external source.
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.
int ThetaSC(double y[], double dydx[], int n, double x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Unknown integrator.
Definition: thetaSC.c:26
Definition: mbs_data.h:149
#define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max
Definition: mbs_dirdyn_struct.h:32
double * yt2
allocated state vector
Definition: mbs_custom.h:29
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
void error_custom(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_cu...
Definition: mbs_custom.c:125
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
This header defines global functions for custom integrator in C. Advanced user can modify this file.
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
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
void finish_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Custom integrator.
Definition: mbs_custom.c:115
Custom integrator structure for dirdyn.
Definition: mbs_custom.h:27