Go to the source code of this file.
Enumerations | |
enum | { COMPUTE_ALL_QC, COMPUTE_NO_QC, COMPUTE_CUSTOM_QC } |
Enumeration of the possible computation of Qc in dirdyn. More... | |
Functions | |
MbsDirdyn * | mbs_new_dirdyn (MbsData *mbs_data) |
Create a new direct dynamic structure. More... | |
MbsDirdyn * | mbs_new_dirdyn_aux (MbsData *mbs_data, MbsAux *mbs_aux) |
Create MbsDirdyn strucure and fill it with auxiliary structure. More... | |
int | mbs_run_dirdyn (MbsDirdyn *dirdyn, MbsData *mbs_data) |
Run the direct dynamic simulation. More... | |
int | mbs_dirdyn_init (MbsDirdyn *dirdyn, MbsData *mbs_data) |
Run the startup operations of the run_dirdyn function. More... | |
int | mbs_dirdyn_loop (MbsDirdyn *dirdyn, MbsData *mbs_data) |
Time loop of the run_dirdyn function: More... | |
int | mbs_dirdyn_finish (MbsDirdyn *dirdyn, MbsData *mbs_data) |
Run the finalization operations of the run_dirdyn function. More... | |
void | mbs_delete_dirdyn (MbsDirdyn *dirdyn, MbsData *mbs_data) |
Free memory of the direct dynamic structure The options (MbsDirdynOptions) and MbsAux structures are also freed. More... | |
int | mbs_dirdyn_write_buffers (MbsDirdyn *dd) |
Compute the derivatives of the system (1st derivatives to be given to the ODE integrator) More... | |
int | check_user_dirdyn_options (MbsDirdyn *dd, MbsData *mbs_data) |
check that the dirdyn options performed by the user are correct More... | |
int | mbs_dirdyn_save (MbsDirdyn *dd, MbsData *mbs_data, double t) |
save the dirdyn results through the buffer More... | |
This header defines functions of the dirdyn module in C.
Creation date: 19/11/2014
(c) Universite catholique de Louvain
anonymous enum |
Enumeration of the possible computation of Qc in dirdyn.
Set the choice in main, for example if Qc(2) is wanted :
The following value of MbsDirdynOptions::flag_compute_Qc produce:
check that the dirdyn options performed by the user are correct
[in] | dd | direct dynamics module |
[in] | mbs_data | Robotran main structure |
Free memory of the direct dynamic structure The options (MbsDirdynOptions) and MbsAux structures are also freed.
Run the finalization operations of the run_dirdyn function.
Run the startup operations of the run_dirdyn function.
Time loop of the run_dirdyn function:
The sequence of one iteration is:
[in,out] | dirdyn | the MbsDirdyn to be run |
[in,out] | mbs_data | the MbsData structure of the model for which the direct dynamic is computed |
save the dirdyn results through the buffer
[in] | dd | direct dynamics module |
[in] | mbs_data | Robotran main structure |
[in] | t | the time at which to save the dirdyn results |
int mbs_dirdyn_write_buffers | ( | MbsDirdyn * | dd | ) |
Compute the derivatives of the system (1st derivatives to be given to the ODE integrator)
t
the integration variable (time in the case of MBS time integration) y
the state vector for which the derivative must be computed dydt
the state derivative vector in which the derivative must be returned s
the MbsData of the system mbs_aux
the local data structure Write the content of buffer associated to the given MbsDirdyn to disk. This is usefull for writing simulation results at the end of the simulation. This sepcific function is written to be able to ask for writing buffer from python.
dd
the MbsDirdyn struct for which the buffers must be written
Create a new direct dynamic structure.
This function also initialize the options structures and the MbsAux for storing computational info during simulation.
Fields are allocated to default value.
mbs_data | the data structure of the model for which the time integration will be computed. |
Create MbsDirdyn strucure and fill it with auxiliary structure.
This function also initialize the options structures. A pointer to the given MbsAux structure is kept by the returned structure.
The field of MbsDirdyn are set to default values.
mbs_data
the data structure of the model for which the time integration will be computed mbs_aux
the MbsAux structure related to the model for which the time integration will be computed.