|
Robotran C Documentation
|
Go to the documentation of this file.
16 #ifndef MBS_W_METHODS_H_INCLUDED
17 #define MBS_W_METHODS_H_INCLUDED
27 #define W_S 2 // order of the method, 2 per default
40 #define W_A21 0.66666666666667
42 #define W_C2 0.66666666666667
45 #define W_GAMMA11 0.788675134594813 //(0.5 + (sqrt(3.0)/6.0))
46 #define W_GAMMA22 0.788675134594813 // (0.5 + (sqrt(3.0)/6.0))
47 #define W_GAMMA21 -1.051566846126417 //(-2.0 * W_A21 * W_GAMMA22)
118 #endif // MBS_W_METHODS_H_INCLUDED
double * Freeze_dfdx
Definition: mbs_w_methods.h:64
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 * jpxv
Definition: mbs_w_methods.h:72
void error_w_methods(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_w_...
Definition: mbs_w_methods.c:206
This header defines global functions for W methods integrator in C.
double ** Freeze_dfdy
Definition: mbs_w_methods.h:64
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
#define W_S
Definition: mbs_w_methods.h:27
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
int loop_w_methods(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_w_methods.c:77
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
double * dysav
Definition: mbs_w_methods.h:57
double ** dfdy
Definition: mbs_w_methods.h:55
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
double * B_param
Definition: mbs_w_methods.h:78
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
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
double ** A
Definition: mbs_w_methods.h:68
void error_w_methods(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_w_...
Definition: mbs_w_methods.c:206
void finish_w_methods(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for W Methods integrator.
Definition: mbs_w_methods.c:151
double * partial_right_hand_term
Definition: mbs_w_methods.h:71
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
double * B
Definition: mbs_w_methods.h:69
double * C_param
Definition: mbs_w_methods.h:79
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 initialize_w_methods(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for W Methods integrator.
Definition: mbs_w_methods.c:22
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
#define W_GAMMA11
Definition: mbs_w_methods.h:45
double * sum_alpha_gamma
Definition: mbs_w_methods.h:70
#define W_C1
Definition: mbs_w_methods.h:41
double ** GAM_param
Definition: mbs_w_methods.h:80
double * dfdx
Definition: mbs_w_methods.h:56
#define W_B2
Definition: mbs_w_methods.h:44
#define W_GAMMA21
Definition: mbs_w_methods.h:47
double * Freeze_dydx
Definition: mbs_w_methods.h:64
#define W_GAMMA22
Definition: mbs_w_methods.h:46
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1146
double * ysav
Definition: mbs_w_methods.h:58
W Methods structure for dirdyn.
Definition: mbs_w_methods.h:52
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
int Freeze_jacobian_index
Definition: mbs_w_methods.h:65
Definition: mbs_data.h:149
#define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max
Definition: mbs_dirdyn_struct.h:32
double * A_param
Definition: mbs_w_methods.h:77
#define W_B1
Definition: mbs_w_methods.h:43
double * intermediate_y
Definition: mbs_w_methods.h:75
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
int loop_w_methods(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_w_methods.c:77
This header defines specific integrators functions in C.
int w_methods(double y[], double dydx[], int n, double x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
W Methods integrator implementation.
Definition: w_methods.c:27
double * f
Definition: mbs_w_methods.h:60
void initialize_w_methods(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for W Methods integrator.
Definition: mbs_w_methods.c:22
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
#define W_A21
first order parameters
Definition: mbs_w_methods.h:40
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 ** delta_p
Definition: mbs_w_methods.h:73
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
double ** delta_v
Definition: mbs_w_methods.h:74
void finish_w_methods(MbsData *mbs_data, MbsDirdyn *dd)
Finalize and clear memory allocated for W Methods integrator.
Definition: mbs_w_methods.c:151
#define W_C2
Definition: mbs_w_methods.h:42
int * indx
Definition: mbs_w_methods.h:61