Robotran C Documentation
mbs_linalg.h
Go to the documentation of this file.
1 
12 #ifndef mbs_lingalg_h
13 #define mbs_lingalg_h
14 /*--------------------*/
15 
16 
29 int mbs_eig_0(double **A, int n, double *eval_a, double *eval_b, double **evec_a, double **evec_b);
30 
43 int mbs_schur_0(double **A, int n, double **T, double **Z, double *WR, double *WI, int reorder);
44 
51 int mbs_rank_0(double** A, int m, int n);
52 
65 int mbs_choldc_0(double **A, int n);
66 
81 int mbs_cholsl_0(double **A, int n, double **B, int nb);
82 
92 int mbs_invLU_0(double **A, double **Am1, int n);
93 
107 int mbs_svdDcmp_0(double **A, int x, int y, double **U, double **S, double **VT);
108 
109 
136 int mbs_over_under_determined(double **A, double *b, int x, int y);
137 
138 #endif
w_methods
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
GAM
#define GAM
Definition: rosenbrock.c:45
SAFETY
#define SAFETY
Definition: rosenbrock.c:36
mbs_estim_jac_acc
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:30
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
E4
#define E4
Definition: rosenbrock.c:62
mbs_cholsl_0
int mbs_cholsl_0(double **A, int n, double **B, int nb)
Solves a symmetric positive definite system of linear equations AX=B (B being the right hand side wit...
Definition: cholesky.c:40
useful_functions.h
C3X
#define C3X
Definition: rosenbrock.c:65
mbs_w_methods.h
This header defines global functions for W methods integrator in C.
lubksb_0
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
B1
#define B1
Definition: rosenbrock.c:55
mbs_dirdyn.h
MbsData::tsim
double tsim
The time value.
Definition: mbs_data.h:208
MbsDirdyn::y
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:153
GROW
#define GROW
Definition: rosenbrock.c:37
W_S
#define W_S
Definition: mbs_w_methods.h:27
MbsDirdyn::nState
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:152
C32
#define C32
Definition: rosenbrock.c:51
mbs_dirdyn_struct.h
ERRCON
#define ERRCON
Definition: rosenbrock.c:41
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
C43
#define C43
Definition: rosenbrock.c:54
A32
#define A32
Definition: rosenbrock.c:48
E1
#define E1
Definition: rosenbrock.c:59
E2
#define E2
Definition: rosenbrock.c:60
A21
#define A21
Definition: rosenbrock.c:46
PSHRNK
#define PSHRNK
Definition: rosenbrock.c:40
mbs_rosenbrock.h
This header defines global functions for rosenbrock integrator in C.
mbs_invLU_0
int mbs_invLU_0(double **A, double **Am1, int n)
Inverse the square matrix A using a LU decomposition.
Definition: inverse_lapack.c:28
mbs_freeze_jac
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:107
MBSfun.h
mbs_close_kin
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:140
MbsDirdyn::integrator_struct
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:183
A3X
#define A3X
Definition: rosenbrock.c:68
C31
#define C31
Definition: rosenbrock.c:50
C1X
#define C1X
Definition: rosenbrock.c:63
mbs_svdDcmp_0
int mbs_svdDcmp_0(double **A, int x, int y, double **U, double **S, double **VT)
Realize the singular value decomposition.
Definition: svdcmp_lapack.c:78
ludcmp_0
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
MbsDirdyn::tsim
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:149
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
MbsDirdynRK4
Runge-Kutta 4 structure for dirdyn.
Definition: mbs_rk4.h:31
MbsDirdynRosenbrock
Rosenbrock integration structure for dirdyn.
Definition: mbs_rosenbrock.h:29
MbsData::qu
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
B2
#define B2
Definition: rosenbrock.c:56
C4X
#define C4X
Definition: rosenbrock.c:66
MbsDirdynOptions::n_freeze
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:134
mbs_eig_0
int mbs_eig_0(double **A, int n, double *eval_a, double *eval_b, double **evec_a, double **evec_b)
Compute the eigen values and vector of a matrix with index starting a 0.
Definition: eig_lapack.c:32
B3
#define B3
Definition: rosenbrock.c:57
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
rosenbrock
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
E3
#define E3
Definition: rosenbrock.c:61
nrfct.h
rk4
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:21
mbs_message.h
MbsDirdynWMethods
W Methods structure for dirdyn.
Definition: mbs_w_methods.h:52
_MBS_ERR_MOD_SPEC_14
#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:180
mbs_close_geo
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
dmaxarg2
static double dmaxarg2
Definition: rosenbrock.c:100
_MBS_ERR_MOD_SPEC_18
#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:204
MbsData
Definition: mbs_data.h:149
MbsDirdyn::mbs_aux
MbsAux * mbs_aux
Definition: mbs_dirdyn_struct.h:147
mbs_choldc_0
int mbs_choldc_0(double **A, int n)
Compute the Cholesky decomposition of A, i.e.
Definition: cholesky.c:25
A31
#define A31
Definition: rosenbrock.c:47
dirdynared
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_dirdynared.c:25
ThetaSC
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:26
dmaxarg1
static double dmaxarg1
Definition: rosenbrock.c:100
C2X
#define C2X
Definition: rosenbrock.c:64
integrator.h
This header defines specific integrators functions in C.
dminarg1
static double dminarg1
Definition: rosenbrock.c:101
mbs_over_under_determined
int mbs_over_under_determined(double **A, double *b, int x, int y)
Solve a linear system of equations, A*x=b, using dgelss lapack function.
Definition: svdcmp_lapack.c:18
A2X
#define A2X
Definition: rosenbrock.c:67
SHRNK
#define SHRNK
Definition: rosenbrock.c:39
mbs_schur_0
int mbs_schur_0(double **A, int n, double **T, double **Z, double *WR, double *WI, int reorder)
A : matrix for the Eigenvalue problem in row major n : size of the matrix WR : Result of the Eigenval...
Definition: schur_lapack.c:45
C41
#define C41
Definition: rosenbrock.c:52
copy_dvec_0
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:906
C42
#define C42
Definition: rosenbrock.c:53
MbsDirdyn
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
mbs_rk4.h
This header defines global functions for Runge Kutta 4 integrator in C.
MbsData::qdd
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
C21
#define C21
Definition: rosenbrock.c:49
mbs_rank_0
int mbs_rank_0(double **A, int m, int n)
Compute the rank of matrix_in.
Definition: rank_lapack.c:38
B4
#define B4
Definition: rosenbrock.c:58
MbsDirdyn::options
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:146
dminarg2
static double dminarg2
Definition: rosenbrock.c:101
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
mbs_errors_names.h
PGROW
#define PGROW
Definition: rosenbrock.c:38