|
Robotran C Documentation
|
Go to the documentation of this file.
15 #ifndef MBS_ROSENBROCK_H_INCLUDED
16 #define MBS_ROSENBROCK_H_INCLUDED
80 #endif // MBS_ROSENBROCK_H_INCLUDED
double solout_last_t
last time solout was called (0.0 by default)
Definition: mbs_rosenbrock.h:33
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
int * indx
Definition: mbs_rosenbrock.h:37
double * ysav
Definition: mbs_rosenbrock.h:39
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 * dydt_save
save dydt of the last time step
Definition: mbs_rosenbrock.h:35
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
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
int flag_save
1 if first dydt save done, 0 otherwise
Definition: mbs_rosenbrock.h:31
double dt_max
maximal time step [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:130
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:160
double * Freeze_dydx
Definition: mbs_rosenbrock.h:41
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
int nmax
maximal number of steps [-], default = 1e9
Definition: mbs_dirdyn_struct.h:126
double * Freeze_dfdx
Definition: mbs_rosenbrock.h:41
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
int mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1067
This header defines global functions for rosenbrock integrator in C.
int loop_rosenbrock(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_rosenbrock.c:63
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
double dt0
initial value of the integration step size, default = 0.001
Definition: mbs_dirdyn_struct.h:45
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
Rosenbrock integration structure for dirdyn.
Definition: mbs_rosenbrock.h:29
double ** a
Definition: mbs_rosenbrock.h:38
void error_rosenbrock(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_ro...
Definition: mbs_rosenbrock.c:183
void initialize_rosenbrock(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Rosenbrock integrator.
Definition: mbs_rosenbrock.c:26
void error_rosenbrock(MbsData *mbs_data, MbsDirdyn *dd, int err)
If an error occurs during time integration, this function prints the error message and call finish_ro...
Definition: mbs_rosenbrock.c:183
double * g3
Definition: mbs_rosenbrock.h:39
double ** Freeze_dfdy
Definition: mbs_rosenbrock.h:41
void initialize_rosenbrock(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Initialize all needed fields in MbsDirdyn for Rosenbrock integrator.
Definition: mbs_rosenbrock.c:26
double * g4
Definition: mbs_rosenbrock.h:39
double toler
mixed error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:127
void finish_rosenbrock(MbsData *mbs_data, MbsDirdyn *dd)
Finalize and clear memory allocated for Rosenbrock integrator.
Definition: mbs_rosenbrock.c:143
double ** dfdy
Definition: mbs_rosenbrock.h:38
double * dfdx
Definition: mbs_rosenbrock.h:38
double * err
Definition: mbs_rosenbrock.h:38
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1146
int Freeze_jacobian_index
Definition: mbs_rosenbrock.h:42
double * g2
Definition: mbs_rosenbrock.h:39
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
void finish_rosenbrock(MbsData *mbs_data, MbsDirdyn *mbs_dd)
Finalize and clear memory allocated for Rosenbrock integrator.
Definition: mbs_rosenbrock.c:143
This header defines specific integrators functions in C.
int loop_rosenbrock(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
Integrate the motion from t0 to tf.
Definition: mbs_rosenbrock.c:63
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 * dysav
Definition: mbs_rosenbrock.h:38
double * g1
Definition: mbs_rosenbrock.h:39
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
int rosenbrock(int n, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), double *x, double y[], double eps, double hmax, double htry, long nmax, double dydx[], double yscal[], double *hnext, MbsData *s, MbsDirdyn *dd, double *hdid)
Fourth-order Rosenbrock step for integrating stiff problems, with monitoring of local truncation erro...
Definition: rosenbrock.c:103