|
Robotran C Documentation
|
Go to the documentation of this file.
25 #if __STDC_VERSION__ < 1999901L
28 #define lapack_complex_float struct complex_float
29 #define lapack_complex_double struct complex_double
36 #define LPK_ERR ">> LAPACK>> "
37 #define LPK_PRE " >> "
40 #define lapack_int int
41 #define lapack_logical int
43 #define LAPACKE_malloc( size ) malloc( size )
44 #define LAPACKE_free( p ) free( p )
51 double* wr,
double* wi,
double* vs,
lapack_int* ldvs,
57 LPK_PRE"Code compiled without LAPACK libraries.\n"
58 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
63 lapack_int* lda,
double* wr,
double* wi,
double* vl,
69 LPK_PRE"Code compiled without LAPACK libraries.\n"
70 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
81 LPK_PRE"Code compiled without LAPACK libraries.\n"
82 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
87 double* a,
lapack_int* lda,
double* s,
double* u,
93 LPK_PRE"Code compiled without LAPACK libraries.\n"
94 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
104 LPK_PRE"Code compiled without LAPACK libraries.\n"
105 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
115 LPK_PRE"Code compiled without LAPACK libraries.\n"
116 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
125 LPK_PRE"Code compiled without LAPACK libraries.\n"
126 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
136 LPK_PRE"Code compiled without LAPACK libraries.\n"
137 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
144 double* s,
double* sep,
double* work,
lapack_int* lwork,
149 LPK_PRE"Code compiled without LAPACK libraries.\n"
150 LPK_PRE"To use this module, compile MBsysC with LAPACK libraries.\n",
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:25
#define GAM
Definition: rosenbrock.c:47
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
#define SAFETY
Definition: rosenbrock.c:38
Implementation of eig function using lapackE.
Definition: eig_lapacke.c:21
static void LAPACK_dpotrs(char *uplo, lapack_int *n, lapack_int *nrhs, const double *a, lapack_int *lda, double *b, lapack_int *ldb, lapack_int *info)
Definition: mbs_lapack.h:130
int mbs_estim_jac_acc(double x, double htry, double y[], double dydx[], int compute_dfdx, double dfdx[], double **dfdy, int n, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Evaluate the Jacobian of a function accelerations using finite difference.
Definition: integrator.c:35
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:286
#define E4
Definition: rosenbrock.c:64
#define C3X
Definition: rosenbrock.c:67
This header defines global functions for W methods integrator in C.
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
#define B1
Definition: rosenbrock.c:57
double tsim
The time value.
Definition: mbs_data.h:306
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:219
#define GROW
Definition: rosenbrock.c:39
#define W_S
Definition: mbs_w_methods.h:21
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:218
#define C32
Definition: rosenbrock.c:53
#define ERRCON
Definition: rosenbrock.c:43
int nqu
Number of independent articulations.
Definition: mbs_data.h:263
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
static void LAPACK_dgeev(char *jobvl, char *jobvr, lapack_int *n, double *a, lapack_int *lda, double *wr, double *wi, double *vl, lapack_int *ldvl, double *vr, lapack_int *ldvr, double *work, lapack_int *lwork, lapack_int *info)
Definition: mbs_lapack.h:62
#define C43
Definition: rosenbrock.c:56
#define LPK_ERR
Definition: mbs_lapack.h:36
#define A32
Definition: rosenbrock.c:50
static void LAPACK_dgelss(lapack_int *m, lapack_int *n, lapack_int *nrhs, double *a, lapack_int *lda, double *b, lapack_int *ldb, double *s, double *rcond, lapack_int *rank, double *work, lapack_int *lwork, lapack_int *info)
Definition: mbs_lapack.h:74
#define E1
Definition: rosenbrock.c:61
#define E2
Definition: rosenbrock.c:62
#define A21
Definition: rosenbrock.c:48
#define PSHRNK
Definition: rosenbrock.c:42
This header defines global functions for rosenbrock integrator in C.
int mbs_freeze_jac(int freeze_index, int *next_freeze_index, double x, double h, double y[], double dydx[], int compute_dfdx, double dfdx[], double **dfdy, double dydx_freeze[], double dfdx_freeze[], double **dfdy_freeze, int n, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
Freeze the Jacobian of an integrator structure until mbs_dd->options->n_freeze.
Definition: integrator.c:129
Definition: eig_lapacke.c:22
float x
Definition: eig_lapacke.c:21
lapack_logical(* LAPACK_D_SELECT2)(const double *, const double *)
Definition: mbs_lapack.h:46
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:146
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:262
#define A3X
Definition: rosenbrock.c:70
#define C31
Definition: rosenbrock.c:52
#define C1X
Definition: rosenbrock.c:65
int ludcmp_0(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 0.
Definition: ludcmp.c:82
static void LAPACK_dgees(char *jobvs, char *sort, LAPACK_D_SELECT2 select, lapack_int *n, double *a, lapack_int *lda, lapack_int *sdim, double *wr, double *wi, double *vs, lapack_int *ldvs, double *work, lapack_int *lwork, lapack_logical *bwork, lapack_int *info)
Definition: mbs_lapack.h:49
static void LAPACK_dgetrf(lapack_int *m, lapack_int *n, double *a, lapack_int *lda, lapack_int *ipiv, lapack_int *info)
Definition: mbs_lapack.h:99
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:215
Runge-Kutta 4 structure for dirdyn.
Definition: mbs_rk4.h:25
Rosenbrock integration structure for dirdyn.
Definition: mbs_rosenbrock.h:23
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:272
#define B2
Definition: rosenbrock.c:58
#define C4X
Definition: rosenbrock.c:68
float y
Definition: eig_lapacke.c:21
int n_freeze
number of time step when the jacobian is freezed (computed once at the start of the n_freeze time ste...
Definition: mbs_dirdyn_struct.h:184
#define B3
Definition: rosenbrock.c:59
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:285
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:105
#define E3
Definition: rosenbrock.c:63
static void LAPACK_dpotrf(char *uplo, lapack_int *n, double *a, lapack_int *lda, lapack_int *info)
Definition: mbs_lapack.h:120
double y
Definition: eig_lapacke.c:22
#define lapack_logical
Definition: mbs_lapack.h:41
int rk4(double y[], double dydx[], int n, double x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *dd)
Runge Kutta 4 integrator implementation Given values for the variables y[1..n] and their derivatives ...
Definition: rk4.c:22
W Methods structure for dirdyn.
Definition: mbs_w_methods.h:46
#define _MBS_ERR_MOD_SPEC_14
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:190
int mbs_close_geo(MbsData *s, MbsAux *mbs_aux)
compute a position of the multibody system which solves the constraints
Definition: mbs_close_loops.c:43
#define LPK_PRE
Definition: mbs_lapack.h:37
static double dmaxarg2
Definition: rosenbrock.c:102
double x
Definition: eig_lapacke.c:22
#define _MBS_ERR_MOD_SPEC_18
Genericerror number Module specific errors range from -11 to -19 please read the error message an...
Definition: mbs_errors_names.h:214
Definition: mbs_data.h:247
MbsAux * mbs_aux
Definition: mbs_dirdyn_struct.h:213
static void LAPACK_dgesvd(char *jobu, char *jobvt, lapack_int *m, lapack_int *n, double *a, lapack_int *lda, double *s, double *u, lapack_int *ldu, double *vt, lapack_int *ldvt, double *work, lapack_int *lwork, lapack_int *info)
Definition: mbs_lapack.h:86
static void LAPACK_dgetri(lapack_int *n, double *a, lapack_int *lda, const lapack_int *ipiv, double *work, lapack_int *lwork, lapack_int *info)
Definition: mbs_lapack.h:109
#define A31
Definition: rosenbrock.c:49
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Compute the joint accelerations of the system in the current configuration.
Definition: mbs_dirdynared.c:26
int ThetaSC(double y[], double dydx[], int n, double x, double h, double yout[], int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), MbsData *s, MbsDirdyn *mbs_dd)
Unknown integrator.
Definition: thetaSC.c:25
static double dmaxarg1
Definition: rosenbrock.c:102
#define C2X
Definition: rosenbrock.c:66
This header defines specific integrators functions in C.
static double dminarg1
Definition: rosenbrock.c:103
#define A2X
Definition: rosenbrock.c:69
#define SHRNK
Definition: rosenbrock.c:41
static void LAPACK_dtrsen(char *job, char *compq, const lapack_logical *select, lapack_int *n, double *t, lapack_int *ldt, double *q, lapack_int *ldq, double *wr, double *wi, lapack_int *m, double *s, double *sep, double *work, lapack_int *lwork, lapack_int *iwork, lapack_int *liwork, lapack_int *info)
Definition: mbs_lapack.h:141
#define lapack_int
Definition: mbs_lapack.h:40
#define C41
Definition: rosenbrock.c:54
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:1100
#define C42
Definition: rosenbrock.c:55
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:210
This header defines global functions for Runge Kutta 4 integrator in C.
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:287
#define C21
Definition: rosenbrock.c:51
#define B4
Definition: rosenbrock.c:60
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:212
static double dminarg2
Definition: rosenbrock.c:103
int nhu
Number of independent constraints.
Definition: mbs_data.h:269
#define PGROW
Definition: rosenbrock.c:40