|
Robotran C Documentation
|
Go to the documentation of this file.
13 #ifndef MBS_CUSTOM_H_INCLUDED
14 #define MBS_CUSTOM_H_INCLUDED
72 #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:132
void(* loop_fct)(MbsData *, MbsDirdyn *)
The function to be called at the end of each time step, or waypoints.
Definition: mbs_custom.h:27
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
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
double tsim
The time value.
Definition: mbs_data.h:305
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:175
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:174
int(* derivs)(double, double[], double[], MbsData *, MbsDirdyn *)
The function computing the derivative of the system.
Definition: mbs_custom.h:25
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:45
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:955
void finish_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Custom integrator.
Definition: mbs_custom.c:122
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:182
Declaration of functions that are project dependent.
double * yout
Allocation of a vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:177
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:205
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:45
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:171
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1252
void initialize_custom(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))
Initialize all needed fields in MbsDirdyn for Custom integrator.
Definition: mbs_custom.c:24
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:25
Definition: mbs_data.h:246
#define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max
Definition: mbs_dirdyn_struct.h:32
double * yt2
allocated state vector
Definition: mbs_custom.h:23
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:132
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:397
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:128
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:166
int(* save_realtime_update)(MbsDirdyn *dd, MbsData *mbs_data)
Definition: mbs_custom.h:29
void initialize_custom(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))
Initialize all needed fields in MbsDirdyn for Custom integrator.
Definition: mbs_custom.c:24
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:168
void finish_custom(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Custom integrator.
Definition: mbs_custom.c:122
Custom integrator structure for dirdyn.
Definition: mbs_custom.h:21