|
Robotran C Documentation
|
Go to the documentation of this file.
29 void transpose(
double M[4][4],
double Mt[4][4]);
87 void doublematrix_product_0(
double **M1,
int nb_row_M1,
int nb_col_M1,
double **M2,
int nb_col_M2,
double **M);
101 void doublematrix_product_1(
double **M1,
int nb_row_M1,
int nb_col_M1,
double **M2,
int nb_col_M2,
double **M);
144 void copy_imat_0(
int** tab_src,
int** tab_dest,
int nb_r,
int nb_c);
195 void copy_dmat_0(
double** tab_src,
double** tab_dest,
int nb_r,
int nb_c);
204 void copy_dmat_1(
double** src,
double** dest,
int x,
int y);
220 double **
re_copy_dmat_0(
double **src,
int s_nx,
int s_ny,
double **dest,
int d_nx,
int d_ny);
237 double **
re_copy_dmat_1(
double **src,
int s_nx,
int s_ny,
double **dest,
int d_nx,
int d_ny);
246 void transpose_dmat_0(
double** tab_src,
double** tab_dest,
int nb_r,
int nb_c);
285 int read_dmat_0(
double** mat,
int nb_r,
int nb_c,
const char* name);
293 double**
load_dmat_0(
int nb_r,
int nb_c,
char* name);
305 void save_dmat_0(
double** mat,
int nb_r,
int nb_c,
char* name);
329 int code_dmat_0(FILE *file_out,
double **values,
const char *name,
int n_row,
int n_col);
342 int code_dmat_1(FILE *file_out,
double **values,
const char *name,
int n_row,
int n_col);
355 int slct_dmat_0(
double** tab_src,
int nb_r,
int nb_c,
double** tab_out,
int l_vec,
int* vec);
368 int slctr_dmat_0(
double** tab_src,
int nb_r,
int nb_c,
double** tab_dest,
int l_vec,
int* vec);
388 void mult_dmat_0(
double** A,
double** B,
double** C,
int n1,
int n2,
int n3);
398 void sum_dmat_0(
double** A,
double** B,
double** C,
int n1,
int n2);
408 void diff_dmat_0(
double** A,
double** B,
double** C,
int n1,
int n2);
460 void scale_matrix(
double** matrix,
int* n,
int* initzeros);
483 int same_dmat_0(
double **a,
double **b,
int x,
int y);
int * qrot
Array with the indices of the rotational articulations (incremental values)
Definition: mbs_data.h:184
void update_initzeros(int *initzeros, double **matrix, int *n)
function to update the initzeros array (obsolete?)
Definition: mbs_matrix.c:903
int ** get_imat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 0
Definition: mbs_matrix.c:198
double * re_copy_dvec_0(double *src, int s_nx, double *dest, int d_nx)
Copy an array of double into another, reallocate the destination if required.
Definition: mbs_1D_array.c:969
void arrange_matrix(double **matrix, int *n, int *initzeros)
function to arrange matrix (obsolete?)
Definition: mbs_matrix.c:920
int * xfidpt
Array of the points defined as force application points.
Definition: mbs_data.h:264
void print_dvec_0(double *vec, int l_v)
print a (x sized) vector of doubles in console, starting with index 0
Definition: mbs_1D_array.c:1018
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
int * qa
Array with the indices of actuated articulations (only for inverse dynamic).
Definition: mbs_data.h:180
double dt0
Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set fro...
Definition: mbs_data.h:212
double * m
Array containing the mass of each body.
Definition: mbs_data.h:155
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:293
UserIO * user_IO
Definition: mbs_data.h:279
double tsim
The time value.
Definition: mbs_data.h:208
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:172
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:238
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:310
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
void mbs_compute_sin_cos_q_all(MbsData *s)
Compute the sine and cosine of the q_sin and q_cos, for all the rotational joints.
Definition: mbs_trigo.c:94
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
mbs_new_user_model_ptr mbs_new_user_model
Definition: mbs_data.h:112
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:294
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
void matrix_product_0(double **M, double *v, double *Mv, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 0.
Definition: mbs_matrix.c:43
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:287
void scale_matrix(double **matrix, int *n, int *initzeros)
function to scale matrix (obsolete?)
Definition: mbs_matrix.c:965
void doublematrix_product_0(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 0.
Definition: mbs_matrix.c:83
void mbs_copy_data(MbsData *s, MbsData *s_copy)
Copy all fields between two MBSdata structures.
Definition: mbs_data.c:88
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
void rotation_matrix(int type, double angle, double R[4][4])
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1.
Definition: mbs_matrix.c:117
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:147
int ** get_imat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 1
Definition: mbs_matrix.c:215
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
void copy_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:363
double tf
Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn...
Definition: mbs_data.h:211
int npt
Number of anchor points.
Definition: mbs_data.h:152
void arrange_matrix(double **matrix, int *n, int *initzeros)
function to arrange matrix (obsolete?)
Definition: mbs_matrix.c:920
void save_format_dmat_0(double **mat, int nb_r, int nb_c, char *name, char *format)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0 The file is open...
Definition: mbs_matrix.c:556
void print_ivec_1(int *vec)
print a vector (of size specified in vec[0]) of integers in console, starting with index 1
Definition: mbs_1D_array.c:515
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:467
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
void sum_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A + B = C
Definition: mbs_matrix.c:784
mbs_save_um_ptr mbs_save_um
Definition: mbs_data.h:121
int slct_dmat_0(double **tab_src, int nb_r, int nb_c, double **tab_out, int l_vec, int *vec)
fill the second [nb_r times l_vec] matrix by selecting the columns of the first [nb_r times nb_c] mat...
Definition: mbs_matrix.c:710
void matrix_product_0(double **M, double *v, double *Mv, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 0.
Definition: mbs_matrix.c:43
int mbs_compare_data(MbsData *s1, MbsData *s2, int accelred)
Compare two MbsData.
Definition: mbs_data.c:533
void transpose(double M[4][4], double Mt[4][4])
Compute the transpose of a matrix with first index is 1.
Definition: mbs_matrix.c:22
int slctr_dmat_0(double **tab_src, int nb_r, int nb_c, double **tab_dest, int l_vec, int *vec)
fill the second [l_vec times nb_c] matrix by selecting the rows of the first [nb_r times nb_c] matrix...
Definition: mbs_matrix.c:732
int get_dmatfiles_size(const char *fileName, int *n_row, int *n_col)
Function to load a file and calculate the number of rows and columns.
Definition: mbs_matrix.c:858
double ** re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:389
void zeros_dmat_0(double **mat, int nb_r, int nb_c)
set all the element of a [nb_r times nb_c] matrix of doubles to zero, starting with index 0
Definition: mbs_matrix.c:754
int Nux
Number of user variable.
Definition: mbs_data.h:288
void copy_dvec_1(double *vec_src, double *vec_dest)
Copy the content of a vector (of size specified in vec_src[0]) of doubles to a second vector,...
Definition: mbs_1D_array.c:916
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:299
double ** jac_user
Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:229
double zero_division_thrs
Value from which a warning is raised if a division by zero (or close to) occurs. Default=1....
Definition: mbs_data.h:308
int DoneModal
Flag that indicates if the modal module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:295
int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:654
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:198
int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:654
double ** SWr
Array of Swr vector for each external forces.
Definition: mbs_data.h:265
void readmatrix(double **mat, int *n)
function to read a matrix (obsolete?)
Definition: mbs_matrix.c:826
void scale_matrix(double **matrix, int *n, int *initzeros)
function to scale matrix (obsolete?)
Definition: mbs_matrix.c:965
double * q_cos
Array with the cosine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:197
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.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
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:263
#define mbs_print_user_model(um)
Definition: mbs_data.c:14
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:467
void matrix_product(double M[4][4], double v[4], double Mv[4])
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:35
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:192
int same_ivec_0(int *v1, int *v2, int size)
Compare if two vector are the same.
Definition: mbs_1D_array.c:847
void mbs_reset_data(MbsData *s)
Reset all fields of a MbsData structure to initial values.
Definition: mbs_data.c:208
double ** load_dmat_0(int nb_r, int nb_c, char *name)
load a [nb_r times nb_c] matrix of doubles from a file starting with index 0. The matrix is created (...
Definition: mbs_matrix.c:544
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:237
void copy_dmat_1(double **src, double **dest, int x, int y)
Copy the content of a [x times y] matrix of doubles to a second matrix, starting with index 1.
Definition: mbs_matrix.c:376
#define mbs_save_um(file, um)
Definition: mbs_data.c:15
void doublematrix_product_1(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 1.
Definition: mbs_matrix.c:100
void update_initzeros(int *initzeros, double **matrix, int *n)
function to update the initzeros array (obsolete?)
Definition: mbs_matrix.c:903
int code_dmat_0(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:588
int slct_dmat_0(double **tab_src, int nb_r1, int nb_c1, double **tab_out, int l2, int *vec)
fill the second [nb_r times l_vec] matrix by selecting the columns of the first [nb_r times nb_c] mat...
Definition: mbs_matrix.c:710
int flag_safety_checks
Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0...
Definition: mbs_data.h:307
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
void print_format_dmat_0(double **mat, int nb_r, int nb_c, char *format)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:472
int code_dvec_1(FILE *file_out, double *values, const char *name, int size)
Write C-code to allocate and fill an array of double.
Definition: mbs_1D_array.c:1115
int MAX_NR_ITER
Maximal number of iterations for NR procedure, default 100.
Definition: mbs_data.h:221
int Nuserc
Number of user constraints.
Definition: mbs_data.h:219
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:241
void free_imat_1(int **mat)
release memory for a matrix of integers, starting with index 1
Definition: mbs_matrix.c:317
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
double ** re_copy_dmat_1(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:421
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:440
double NRerr
Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9.
Definition: mbs_data.h:220
void free_imat_0(int **mat)
release memory for a matrix of integers, starting with index 0
Definition: mbs_matrix.c:309
double ** trq
Matrix with the components of the resultant external torques (pure torque and couple produced by forc...
Definition: mbs_data.h:203
void print_dvec_1(double *vec)
print a vector (of size specified in vec[0]) of doubles in console, starting with index 1
Definition: mbs_1D_array.c:1175
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
void sum_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A + B = C
Definition: mbs_matrix.c:784
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:233
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:217
void diff_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A - B = C
Definition: mbs_matrix.c:797
void save_dmat_0(double **mat, int nb_r, int nb_c, char *name)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0 The file is open...
Definition: mbs_matrix.c:551
double * Zd
Array with the current values of the speed (spreading) between of the points of a link (see: user_Lin...
Definition: mbs_data.h:240
int get_dmatfiles_size(const char *fileName, int *n_row, int *n_col)
Function to load a file and calculate the number of rows and columns.
Definition: mbs_matrix.c:858
void matrix_product_1(double **M, double *v, double *v_out, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:55
int code_ivec_1(FILE *file_out, int *values, const char *name, int size)
Write C-code to allocate and fill an array of integers.
Definition: mbs_1D_array.c:581
void matrix_product_1(double **M, double *v, double *v_out, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:55
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
int read_dmat_0(double **mat, int nb_r, int nb_c, const char *name)
read a [nb_r times nb_c] matrix of doubles from a file starting with index 0 and store the values in ...
Definition: mbs_matrix.c:495
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:156
void copy_dmat_1(double **src, double **dest, int x, int y)
Copy the content of a [x times y] matrix of doubles to a second matrix, starting with index 1.
Definition: mbs_matrix.c:376
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:260
void free_imat_1(int **mat)
release memory for a matrix of integers, starting with index 1
Definition: mbs_matrix.c:317
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:312
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:255
int same_dmat_0(double **a, double **b, int x, int y)
Compare if two 2D arrays of floats are the same.
Definition: mbs_matrix.c:990
char * mbs_basename(const char *path)
mbs_basename return sthe trailing part of the path (UNIX and MAC).
Definition: mbs_path.c:95
int ** get_imat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 0
Definition: mbs_matrix.c:198
double ** re_copy_dmat_1(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:421
void print_format_dmat_0(double **mat, int nb_r, int nb_c, char *format)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:472
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:168
void zeros_dmat_0(double **mat, int nb_r, int nb_c)
set all the element of a [nb_r times nb_c] matrix of doubles to zero, starting with index 0
Definition: mbs_matrix.c:754
This header defines the functions for trigonometric handling in MBsysC integrator in C.
void readmatrix(double **matrix, int *n)
function to read a matrix (obsolete?)
Definition: mbs_matrix.c:826
void copy_imat_0(int **tab_src, int **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of integers to a second matrix, starting with index 0.
Definition: mbs_matrix.c:325
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
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:316
void mult_dmat_0(double **A, double **B, double **C, int n1, int n2, int n3)
function to multiply two matrices: A * B = C [n1 n2] [n2 n3] = [n1 n3]
Definition: mbs_matrix.c:767
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
void opposite_dmat_0(double **A, int n1, int n2)
function to take the opposite of a given matrix (minus in front of each entry)
Definition: mbs_matrix.c:810
double ** frc
Matrix with the components of the resultant external forces (in the body fixed frame) applied to the ...
Definition: mbs_data.h:202
int code_dmat_0(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:588
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:440
void print_imat_0(int **mat, int x, int y)
print a [nb_r times nb_c] matrix of integers in console, starting with index 0
Definition: mbs_matrix.c:338
void diff_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A - B = C
Definition: mbs_matrix.c:797
void free_imat_0(int **mat)
release memory for a matrix of integers, starting with index 0
Definition: mbs_matrix.c:309
int ** get_imat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 1
Definition: mbs_matrix.c:215
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
double ** l3DWr
Definition: mbs_data.h:243
void doublematrix_product(double M1[4][4], double M2[4][4], double M[4][4])
Compute the product of two matrices. The first index is 1.
Definition: mbs_matrix.c:68
UserModel * user_model
Structure containing all user model, this structure is specific for each project.
Definition: mbs_data.h:276
int * re_copy_ivec_0(int *src, int s_nx, int *dest, int d_nx)
Copy an array of int into another, reallocate the destination if required.
Definition: mbs_1D_array.c:445
int same_dvec_0(double *v1, double *v2, int size)
Compare if two vector of floats are the same.
Definition: mbs_1D_array.c:1373
mbs_print_user_model_ptr mbs_print_user_model
Definition: mbs_data.h:118
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:153
void rotation_matrix(int type, double angle, double R[4][4])
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1.
Definition: mbs_matrix.c:117
int slctr_dmat_0(double **tab_src, int nb_r1, int nb_c1, double **tab_out, int l2, int *vec)
fill the second [l_vec times nb_c] matrix by selecting the rows of the first [nb_r times nb_c] matrix...
Definition: mbs_matrix.c:732
void print_imat_0(int **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of integers in console, starting with index 0
Definition: mbs_matrix.c:338
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:313
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:191
void mbs_print_data(MbsData *s)
Definition: mbs_data.c:21
Definition: mbs_data.h:149
void copy_array_dmat_1(double src[4][4], double **dest)
Copy the content of an array of doubles to a pointer of matrix, starting with index 1.
Definition: mbs_matrix.c:980
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:215
void transpose_dmat_1(double **tab_src, double **tab_dest, int x, int y)
Transpose a [x times y] matrix of doubles and store the results in a [y times x] matrix,...
Definition: mbs_matrix.c:454
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:176
double * Qa
Array of active joint forces (in case of simulink,invdyna,equil,linearization,...)
Definition: mbs_data.h:205
double ** re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:389
struct Functions::@8 user
int Nuser_model
Number of declared user models in MBsysPad.
Definition: mbs_data.h:275
char * build_path
Path to the build folder.
Definition: mbs_data.h:311
void zeros_dvec_1(double *vec)
set all the element of a vector of doubles to zero, starting with index 1
Definition: mbs_1D_array.c:1353
void save_dmat_0(double **mat, int nb_r, int nb_c, char *name)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0 The file is open...
Definition: mbs_matrix.c:551
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:297
void doublematrix_product_1(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 1.
Definition: mbs_matrix.c:100
int nbody
Number of bodies in the system.
Definition: mbs_data.h:160
void matrix_product(double M[4][4], double v[4], double Mv[4])
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:35
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:154
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:301
int mbs_write_data(MbsData *s, char *filename, char *function_name)
Write a source with a function allocating and setting a MbsData copy of the provided.
Definition: mbs_data.c:231
void mult_dmat_0(double **A, double **B, double **C, int n1, int n2, int n3)
function to multiply two matrices: A * B = C [n1 n2] [n2 n3] = [n1 n3]
Definition: mbs_matrix.c:767
double t0
Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/inv...
Definition: mbs_data.h:210
void doublematrix_product_0(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 0.
Definition: mbs_matrix.c:83
double * Z
Array with the current values of the distances between of the points of a link (see: user_LinkForces(...
Definition: mbs_data.h:239
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:158
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
void doublematrix_product(double M1[4][4], double M2[4][4], double M[4][4])
Compute the product of two matrices. The first index is 1.
Definition: mbs_matrix.c:68
void opposite_dmat_0(double **A, int n1, int n2)
function to take the opposite of a given matrix (minus in front of each entry)
Definition: mbs_matrix.c:810
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:301
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
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:178
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:222
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:255
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:286
double * q_sin
Array with the sine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:196
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:193
#define mbs_save_user_IO(file, um)
Definition: mbs_data.c:16
void save_format_dmat_0(double **mat, int nb_r, int nb_c, char *name, char *format)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0 The file is open...
Definition: mbs_matrix.c:556
int nqa
Number of actuated articulations.
Definition: mbs_data.h:169
int same_dmat_0(double **a, double **b, int x, int y)
Compare if two 2D arrays of floats are the same.
Definition: mbs_matrix.c:990
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:167
void transpose(double M[4][4], double Mt[4][4])
Compute the transpose of a matrix with first index is 1.
Definition: mbs_matrix.c:22
mbs_save_user_IO_ptr mbs_save_user_IO
Definition: mbs_data.h:123
double ** get_contdmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1....
Definition: mbs_matrix.c:275
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
void copy_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:363
double * jdqd_user
Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:230
double ** load_dmat_0(int nb_r, int nb_c, char *name)
load a [nb_r times nb_c] matrix of doubles from a file starting with index 0. The matrix is created (...
Definition: mbs_matrix.c:544
void rotation_matrix_0(int type, double angle, double R[3][3])
Definition: mbs_matrix.c:158
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:291
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:285
int read_dmat_0(double **mat, int nb_r, int nb_c, const char *name)
read a [nb_r times nb_c] matrix of doubles from a file starting with index 0 and store the values in ...
Definition: mbs_matrix.c:495
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
double ** get_contdmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1....
Definition: mbs_matrix.c:275
void transpose_dmat_1(double **tab_src, double **tab_dest, int x, int y)
Transpose a [x times y] matrix of doubles and store the results in a [y times x] matrix,...
Definition: mbs_matrix.c:454
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:216
int n_user_IO
Definition: mbs_data.h:278
void copy_array_dmat_1(double src[4][4], double **dest)
Copy the content of an array of doubles to a pointer of matrix, starting with index 1.
Definition: mbs_matrix.c:980
void copy_imat_0(int **tab1, int **tab2, int x, int y)
Copy the content of a [nb_r times nb_c] matrix of integers to a second matrix, starting with index 0.
Definition: mbs_matrix.c:325