|
Robotran C Documentation
|
Go to the documentation of this file.
110 int id_exchanged,
int replaced_variable_id);
void pick_and_place_dvec_0(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1435
int mbs_Rred(MbsAux *mbs_aux, MbsData *s)
compute Rred, the reduced equations of motions on a residual form [nqu x 1] obtained after the 2 cons...
Definition: mbs_Rred.c:23
int mbs_equil_init(MbsEquil *mbs_equil, MbsData *mbs_data)
Initialize the Equilibrium structure variables.
Definition: mbs_equil.c:308
double * x
variables for the equilibrium
Definition: mbs_equil_struct.h:112
int slct_dvec_0(double *vec_src, int l_v1, int *vec_ind_src, int l_v2, double *vec_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of doubles at the indexes...
Definition: mbs_1D_array.c:1454
void mbs_equil_add_variable(MbsEquilOptions *options, double *address, int id_added)
set the given pointer to the additionnal variable table.
Definition: mbs_equil.c:997
@ BUFFER_X
Definition: mbs_buffer.h:23
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
int freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Free the structure and its content.
Definition: mbs_aux.c:178
int grad_lpk
options to compute the gradient through the lpk parabolic fitting method. If not activated,...
Definition: mbs_equil_struct.h:22
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:1212
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:318
void mbs_equil_exchange(MbsEquilOptions *options)
Allocate the memory for the changed equilibrium variables through a table of pointers.
Definition: mbs_equil.c:977
@ BUFFER_Q
Definition: mbs_buffer.h:21
int nxe
number of added variables for the equilibrium
Definition: mbs_equil_struct.h:120
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:286
int clearmbsglobal
Q? inout = 1, out = 2, none = 3, all = 4, default = 1 ???
Definition: mbs_equil_struct.h:70
int * xe
index of the added variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:121
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:403
double lpk_absincr_max
options for the lpk gradient [default = 0]
Definition: mbs_equil_struct.h:26
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
void user_call_equil_fxe(MbsData *mbs_data, double *f)
Module redirection for user own equilibrium equations function, see user_equil_fxe().
Definition: mbs_project_fct_ptr.c:572
#define _MBS_ERR_MID_DIRDYNARED
Mid Level error number Related to the reduced direct dynamics (dirdynared) computation.
Definition: mbs_errors_names.h:97
int mbs_equil_grad_lpk(MbsEquil *eq, MbsData *s)
Compute the gradient of f(x) for a given configuration based on the lpk parabolic fitting method.
Definition: mbs_equil.c:1778
double tsim
The time value.
Definition: mbs_data.h:306
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:270
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:338
int compute_uxd
no = 0, yes = 1, flag to compute the extra constitutive differential equations as equil equations [de...
Definition: mbs_equil_struct.h:20
int visualize
Q? no = 0, yes = 1, default = 0.
Definition: mbs_equil_struct.h:69
int nqv
Number of dependent articulations.
Definition: mbs_data.h:268
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:404
double * max_inc
Maximum absolute value of the increment of each variable between iterations.
Definition: mbs_equil_struct.h:92
char * buffer_format
if NULL, "%e" is used
Definition: mbs_equil_struct.h:57
double relincr
options for the lpk linearization [default = 1e-2]
Definition: mbs_linearipk_struct.h:50
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:273
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:397
double lpk_relincr
options for the lpk gradient [default = 1e-2]
Definition: mbs_equil_struct.h:24
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_equil_struct.h:142
MbsEquil * mbs_new_equil_aux(MbsData *mbs_data, MbsAux *mbs_aux)
Definition: mbs_equil.c:49
int nqu
Number of independent articulations.
Definition: mbs_data.h:263
double lpk_absincr
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:25
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
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:1055
double * qd_saved
initial generalized velocities as defined in the mbsysPad
Definition: mbs_equil_struct.h:108
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
@ BUFFER_LINK_ZD
Definition: mbs_buffer.h:22
void lubksb(double **a, int n, int *indx, double b[])
Definition: lubksb.c:10
int mbs_equil_init(MbsEquil *eq, MbsData *s)
Initialize the Equilibrium structure variables.
Definition: mbs_equil.c:308
int verbose
Verbosity level propagated to other compatible module:
Definition: mbs_equil_struct.h:13
int njoint
Number of joints in the system.
Definition: mbs_data.h:260
int * quch
index of changed independant variables
Definition: mbs_equil_struct.h:76
Declaration of functions that are project dependent.
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:590
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:466
int mbs_equil_fsolvepk(int(*fun_ptr)(double *, int, double *, MbsEquil *, MbsAux *, MbsData *), MbsEquil *eq, MbsAux *aux, MbsData *s)
Solve equation f(x)=0 based on given initial values.
Definition: mbs_equil.c:1076
void mbs_reset_joints_kine(MbsData *s)
Reset joints kinematics (q, qd, qdd) of a MbsData structure to initial values.
Definition: mbs_data.c:295
int method
fsolvepk = 1, other method to be added. [default = 1]
Definition: mbs_equil_struct.h:11
double ** x_ptr
vector of pointers pointing to the equilibrium variables
Definition: mbs_equil_struct.h:113
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:374
MbsLpk * mbs_new_lpk(MbsData *s, int nx, int nF)
create a new lpk structure that is used to compute the linearized matrices Gr and Kr.
Definition: mbs_linearipk.c:350
char * resfilename
Basename of the results files, suffixes and extension added automatically.
Definition: mbs_equil_struct.h:40
void free_set_output()
release memory of auto_output
Definition: set_output.c:118
double * F
Definition: mbs_equil_struct.h:137
int mbs_buffer_save(MbsBuffer *b, double t, double *x)
Save the given array to the specified buffer with the specified time.
Definition: mbs_buffer.c:331
int * xns
index of non sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:126
int nxns
number of non sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:125
void mbs_equil_add_variable(MbsEquilOptions *options, double *address, int id_added)
set the given pointer to the additionnal variable table.
Definition: mbs_equil.c:997
double devjac
deviate state for Gradient calculation [default = 1e-6]
Definition: mbs_equil_struct.h:66
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
double equitol
equilibrium acceptation tolerance [default = 1e-6]
Definition: mbs_equil_struct.h:12
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:914
@ BUFFER_LINK_F
Definition: mbs_buffer.h:22
int mbs_equil_grad_dev(MbsEquil *eq, MbsData *s)
Compute the gradient of f(x) for a given configuration based on a deviation computation.
Definition: mbs_equil.c:1862
int Nux
Number of user variable.
Definition: mbs_data.h:398
void mbs_print_equil(MbsEquil *eq)
Print the equilibrium structure and its options.
Definition: mbs_equil.c:1979
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:410
int mbs_equil_loop(MbsEquil *mbs_equil, MbsData *mbs_data)
Process the equibrium : find the equilibrium variables, x that satisfy f(x)= [Fruc ; fxe] = 0 Based o...
Definition: mbs_equil.c:833
int mbs_growing_buffer_write(MbsGrowingBuffer *b)
write the content of the growing buffer to disk
Definition: mbs_buffer.c:712
void mbs_equil_set_variable(MbsEquilOptions *options, double *address, int id_exchanged, int replaced_variable_id)
set the given pointer to the exchange variable table.
Definition: mbs_equil.c:991
int ludcmp(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 1.
Definition: ludcmp.c:19
int set_output_to_mbs(MbsData *mbs_data, int verbosity)
Set the address of this buffers in MbsData to expose memory + synchronize verbosity.
Definition: set_output.c:27
@ BUFFER_OTHER
Definition: mbs_buffer.h:23
void mbs_equil_exchange(MbsEquilOptions *options)
Allocate the memory for the changed equilibrium variables through a table of pointers.
Definition: mbs_equil.c:977
int mbs_equil_fct(double x[], int nx, double fx[], MbsEquil *eq, MbsAux *aux, MbsData *s)
Update the equilibrium variables (qu, xsub and xe) through the pointers eq->x_ptr Compute the equilib...
Definition: mbs_equil.c:1027
int framerate
number of frame per second for the .anim file
Definition: mbs_equil_struct.h:87
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:147
void user_call_equil_loop(MbsData *mbs_data, MbsEquil *mbs_equil)
Module redirection for user own equil loop function, see user_equil_loop().
Definition: mbs_project_fct_ptr.c:560
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:296
double ** x_ptr
vector of pointers pointing to the linearized variables
Definition: mbs_linearipk_struct.h:34
#define _MBS_ERR_INIT
Generic error number Check user options at initialization = -10.
Definition: mbs_errors_names.h:166
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:146
int mbs_equil_finish(MbsEquil *eq, MbsData *s)
Set equilibrum flag to done in MbsData structure Put the MBSysPAD initial velocities and acceleration...
Definition: mbs_equil.c:864
double norm_dvec_0(double *vec, int l_v)
compute the norm of a [l_v sized] vector of doubles, starting with index 0
Definition: norm.c:55
int mbs_check_nhu_nqv(MbsData *mbs_data)
Check the coherence between the number of (independant) constraints and the number of dependant varia...
Definition: mbs_check.c:20
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:281
char * mbs_dirname(const char *path, int verbose)
mbs_dirname returns the leading part of the path (UNIX and MAC).
Definition: mbs_path.c:407
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
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 The functi...
Definition: mbs_matrix.c:294
MbsEquilOptions * options
structure defining the option of a equilibrium
Definition: mbs_equil_struct.h:105
int mbs_equil_save(MbsEquil *eq, MbsData *s, int iter)
Q?? is that necessary.
Definition: mbs_equil.c:291
int mbs_linearipk(double **GK, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice)
compute the linearized damping matrix Gr or stiffness matrix Kr for a given configuration (q,...
Definition: mbs_linearipk.c:21
int nxs
number of sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:123
Definition: mbs_equil_struct.h:103
char ** joints_name
Array containing the name of each joints.
Definition: mbs_equil_struct.h:91
int itermax
maximum number of iteration for solvepk [default = 30]
Definition: mbs_equil_struct.h:67
char * respath
Path in which results file are saved.
Definition: mbs_equil_struct.h:48
char * animpath
Path in which animation file is saved.
Definition: mbs_equil_struct.h:56
int mbs_run_equil(MbsEquil *mbs_equil, MbsData *mbs_data)
Run the Equilibrium process.
Definition: mbs_equil.c:248
double ** grad
Linear Tangent matrix: delta Fx / delta x (obtained numerically)
Definition: mbs_equil_struct.h:131
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:337
double absincr
Minimum increment value of variables [default = 1e-3].
Definition: mbs_linearipk_struct.h:51
double * qdd_saved
initial generalized accelerations as defined in the mbsysPad
Definition: mbs_equil_struct.h:109
@ BUFFER_QC
Definition: mbs_buffer.h:22
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:418
Definition: mbs_buffer.h:46
int Nux_saved
copy of mbs_data Nux
Definition: mbs_equil_struct.h:115
int mbs_growing_buffer_save(MbsGrowingBuffer *b, double t)
Save the given values of auto_output to the specified buffer with the specified time.
Definition: mbs_buffer.c:372
@ BUFFER_QDD
Definition: mbs_buffer.h:21
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:283
int iter
current iteration in the equilibrium computation
Definition: mbs_equil_struct.h:139
MbsBuffer * mbs_new_buffer(char *filename, char *anim_name, int nx, int size, int id, char *buf_format, int save_anim, int save_visu, double anim_period, int saving_mode, int *indices_to_print, char **labels, int flag_custom_labels)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
void mbs_delete_growing_buffer(MbsGrowingBuffer *b)
release memory for growing buffer
Definition: mbs_buffer.c:307
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:341
int close_geo_sensitive
Definition: mbs_equil_struct.h:99
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:272
int mbs_equil_loop(MbsEquil *eq, MbsData *s)
Process the equibrium : find the equilibrium variables, x that satisfy f(x)= [Fruc ; fxe] = 0 Based o...
Definition: mbs_equil.c:833
void mbs_msg_v(int v_opt, int v_lvl, const char *msg,...)
Send a message only of the message level is lower than the verbosity option.
Definition: mbs_message.c:143
MbsLpk * lpk
working structure to compute the linearized matrices (one by one)
Definition: mbs_equil_struct.h:135
void mbs_equil_addition(MbsEquilOptions *options)
Allocate the memory for the addition equilibrium variables through a table of pointers.
Definition: mbs_equil.c:1002
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:280
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:333
int nxe
number of extra equilibrium variables
Definition: mbs_equil_struct.h:79
MbsEquil * mbs_new_equil(MbsData *mbs_data)
Allocate the memory for the Equilibrium Options (but not for all the Equilibrium structure) Initializ...
Definition: mbs_equil.c:39
void(* fxe_ptr)(MbsData *, double *)
pointer pointing on the .c function calculating the added equilibrum functions
Definition: mbs_equil_struct.h:90
double relaxcoeff
relaxation coefficient [default = 0.9]
Definition: mbs_equil_struct.h:62
void mbs_delete_equil(MbsEquil *eq, MbsData *s)
Free the Equilibrium structure (pointers table, Equibrium options, ...)
Definition: mbs_equil.c:157
void mbs_equil_ignorance(MbsEquilOptions *options)
Allocate the memory for the int table containing the index of the qu variables to ignore !
Definition: mbs_equil.c:1013
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:340
int itermax
options for the lpk linearization [default = 10]
Definition: mbs_linearipk_struct.h:49
void mbs_print_equil(MbsEquil *eq)
Print the equilibrium structure and its options.
Definition: mbs_equil.c:1979
void mbs_delete_equil(MbsEquil *eq, MbsData *mbs_data)
Free the Equilibrium structure (pointers table, Equibrium options, ...)
Definition: mbs_equil.c:157
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:302
#define _MBS_ERR_MOD_EQUIL
Module error number module: Equilibrium = 2-00.
Definition: mbs_errors_names.h:48
void mbs_equil_set_variable(MbsEquilOptions *options, double *address, int id_exchanged, int replaced_variable_id)
set the given pointer to the exchange variable table.
Definition: mbs_equil.c:991
double ** grad_Rr
mbs Linear Tangent matrix: delta Rr / delta x (obtained numerically)
Definition: mbs_equil_struct.h:132
int soft
softing in pk algorithm no = 0, yes = 1 [default = 0]
Definition: mbs_equil_struct.h:64
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:285
@ BUFFER_QQ
Definition: mbs_buffer.h:21
int mbs_equil_fct(double x[], int nx, double fx[], MbsEquil *eq, MbsAux *aux, MbsData *s)
Update the equilibrium variables (qu, xsub and xe) through the pointers eq->x_ptr Compute the equilib...
Definition: mbs_equil.c:1027
@ BUFFER_LAMBDA
Definition: mbs_buffer.h:23
@ BUFFER_QD
Definition: mbs_buffer.h:21
#define MBS_VERBOSE_DEBUG
Definition: mbs_define.h:48
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:423
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1)
Definition: mbs_equil_struct.h:86
#define _MBS_ERR_MOD_SPEC_12
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:178
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:45
int mbs_init_sin_cos_q_vecs(MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec, int *qrot_qv_indvec)
Initialize the three vectors of indices (they are usually contained in the mbs_aux structure)
Definition: mbs_trigo.c:23
int mbs_calc_jdqd(MbsData *s, MbsAux *mbs_aux)
compute the quadratic term of the constraints at acceleration level:
Definition: mbs_close_loops.c:236
int mbs_check_mbs_data_values(MbsAux *module_mbs_aux, MbsData *mbs_data)
Check the coherence between the mbs_data used before module initialization and module run.
Definition: mbs_check.c:88
This header defines the functions for trigonometric handling in MBsysC integrator in C.
int mbs_comp_LUdcmp_mJv(MbsData *s, MbsAux *mbs_aux)
compute and update (!) the mJv matrix, decomposing it to the LU format mbs_aux->mJv[i][j] = -mbs_aux-...
Definition: mbs_close_loops.c:25
@ BUFFER_LINK3D
Definition: mbs_buffer.h:23
MbsEquil * mbs_new_equil(MbsData *s)
Allocate the memory for the Equilibrium Options (but not for all the Equilibrium structure) Initializ...
Definition: mbs_equil.c:39
int mbs_calc_force(MbsData *s)
compute the force and torques applied on the multibody system.
Definition: mbs_calc_force.c:16
MbsGrowingBuffer * mbs_new_growing_buffer(int max_nx, int size, const char *respath, int saving_mode)
create a new growing buffer for the user inputs to save
Definition: mbs_buffer.c:205
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:264
double ** l3DWr
Definition: mbs_data.h:343
set_output function called by the user to output his own variables
#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
int relax
relaxation in pk algorithm no = 0, yes = 1 [default = 0]
Definition: mbs_equil_struct.h:61
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:22
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:555
int * xch
index of the exchange variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:118
void mbs_error_msg_v(int v_opt, int err, const char *msg,...)
Send an error message except if error message are disabled.
Definition: mbs_message.c:113
int bufferNb
Definition: mbs_equil_struct.h:141
void mbs_equil_addition(MbsEquilOptions *options)
Allocate the memory for the addition equilibrium variables through a table of pointers.
Definition: mbs_equil.c:1002
int saveperiod
The number of iteration between two buffer records [default = 1] (every iteration are recorded)
Definition: mbs_equil_struct.h:85
#define MSG_PRE
Definition: mbs_equil.c:37
int mbs_equil_grad_lpk(MbsEquil *eq, MbsData *s)
Compute the gradient of f(x) for a given configuration based on the lpk parabolic fitting method.
Definition: mbs_equil.c:1778
Definition: mbs_data.h:247
int user_call_Derivative(MbsData *s)
Module redirection for the time derivative of the user state variables, see user_Derivative() however...
Definition: mbs_project_fct_ptr.c:248
int success
1 if the equilibrium process were successful (0 if none -1 if failed)
Definition: mbs_equil_struct.h:146
MbsEquil * mbs_new_equil_aux(MbsData *s, MbsAux *mbs_aux)
Definition: mbs_equil.c:49
int * xe_index
vector containing the index of the added variables inside the equilibrium variables vector
Definition: mbs_equil_struct.h:82
#define _MBS_ERR_MOD_SPEC_11
Mid Level error number Module specific errors range from -11 to -19 please read the error message...
Definition: mbs_errors_names.h:172
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:46
Definition: mbs_equil_struct.h:9
double lpk_equitol
options for the lpk gradient [default = 1e-6]
Definition: mbs_equil_struct.h:27
void mbs_compute_sin_cos_quc(MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec)
Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are independe...
Definition: mbs_trigo.c:65
@ BUFFER_R
Definition: mbs_buffer.h:23
double ** grad_uxd
uxd Linear Tangent matrix: delta uxd / delta x (obtained numerically)
Definition: mbs_equil_struct.h:133
int get_output_vector_size(int index)
get the output vector size corresponding to the requested index
Definition: set_output.c:316
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Compute the joint accelerations of the system in the current configuration.
Definition: mbs_dirdynared.c:26
void user_call_equil_finish(MbsData *mbs_data, MbsEquil *mbs_equil)
Module redirection for user own equil finish function, see user_equil_finish().
Definition: mbs_project_fct_ptr.c:566
double senstol
tolerance for testing a variable non-sensitivity [default = 1e-6]
Definition: mbs_equil_struct.h:65
void user_call_equil_init(MbsData *mbs_data, MbsEquil *mbs_equil)
Module redirection for user own equilibrium initialization function, see user_equil_init().
Definition: mbs_project_fct_ptr.c:554
int buffersize
The number of time step that can be recorded in the buffer [default = -1].
Definition: mbs_equil_struct.h:88
int mbs_run_equil(MbsEquil *eq, MbsData *s)
Run the Equilibrium process.
Definition: mbs_equil.c:248
int get_output_vector_nb()
get the number of user vector inputs
Definition: set_output.c:334
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_equil_struct.h:143
void init_set_output(int max_nb_curves)
initialize the static auto_output structure
Definition: set_output.c:85
int mbs_equil_fsolvepk(int(*fun_ptr)(double *, int, double *, MbsEquil *, MbsAux *, MbsData *), MbsEquil *eq, MbsAux *aux, MbsData *s)
Solve equation f(x)=0 based on given initial values.
Definition: mbs_equil.c:1076
void mbs_delete_lpk(MbsLpk *lpk)
free memory of the lpk structure.
Definition: mbs_linearipk.c:399
double * Z
Array with the current values of the distances between of the points of a link (see: user_LinkForces(...
Definition: mbs_data.h:339
int mbs_calc_hJ(MbsData *s, MbsAux *mbs_aux)
compute the current value of the constraints ( ) and the constraint Jacobian matrix ( ).
Definition: mbs_close_loops.c:194
double lpk_lintol
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:28
int mbs_equil_finish(MbsEquil *mbs_equil, MbsData *mbs_data)
Set equilibrum flag to done in MbsData structure Put the MBSysPAD initial velocities and acceleration...
Definition: mbs_equil.c:864
double equitol
Minimum gradient to be considered as sensitive [default = 1e-6].
Definition: mbs_linearipk_struct.h:53
int flag_stop
stop the simulation in case of non zero value. Negative for error, positive for user_wanted behavior.
Definition: mbs_data.h:409
int nx
number of variables for the equilibrium
Definition: mbs_equil_struct.h:111
void cholsl(double **a, int n, double p[], double b[], double x[])
Definition: cholsl.c:10
MbsAux * aux
Definition: mbs_equil_struct.h:106
int choldc(double **a, int n, double p[])
Compute the Cholesky decomposition of a, i.e.
Definition: choldc.c:25
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
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:1090
int * xs
index of sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:124
double ** grad_fxe
fxe Linear Tangent matrix: delta fxe / delta x (obtained numerically)
Definition: mbs_equil_struct.h:134
int mbs_call_dirdyna(double **M, double *c, MbsData *s, double tsim)
Symbolic direct dynamic function declaration.
Definition: mbs_project_fct_ptr.c:72
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
void pick_and_place_dvec_1(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1426
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:322
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_equil_struct.h:140
double ** xe_ptr
vector of pointers pointing to the extra variables
Definition: mbs_equil_struct.h:80
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:1007
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:396
void reset_flag_output()
reset the flag_output to 0. Useful when running several simulation in a row with different save2file ...
Definition: set_output.c:77
int mbs_equil_grad_dev(MbsEquil *eq, MbsData *s)
Compute the gradient of f(x) for a given configuration based on a deviation computation.
Definition: mbs_equil.c:1862
int max_save_user
The maximal number of user variables saved [default = 12].
Definition: mbs_equil_struct.h:89
double lintol
Relative convergence criteria of the gradient [default = 1e-3].
Definition: mbs_linearipk_struct.h:54
#define MAX(a, b)
Definition: useful_functions.h:14
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:287
char * get_output_vector_label(int index)
get the output vector label corresponding to the requested index
Definition: set_output.c:305
void mbs_equil_ignorance(MbsEquilOptions *options)
Allocate the memory for the int table containing the index of the qu variables to ignore !
Definition: mbs_equil.c:1013
int mbs_rank_0(double **A, int m, int n)
Compute the rank of a matrix.
Definition: rank_lapack.c:21
int user_call_DrivenJoints(MbsData *s, double tsim)
Module redirection for the computation of driven joints, see user_DrivenJoints() however the return d...
Definition: mbs_project_fct_ptr.c:258
int mbs_makedirs(char *path)
Create (recursively) the specified directory.
Definition: mbs_path.c:586
@ BUFFER_F
Definition: mbs_buffer.h:23
double norm_pk
norm of the equlibrium variables vector x (parameter to minimize in the solvepk algorithm)
Definition: mbs_equil_struct.h:129
int mbs_equil_save(MbsEquil *eq, MbsData *mbs_data, int n)
Q?? is that necessary.
Definition: mbs_equil.c:291
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:669
int save2file
1: results saved 0: not saved [default = 1]
Definition: mbs_equil_struct.h:19
int nF
nF=nqu or nF=nqu+nux (working variable)
Definition: mbs_linearipk_struct.h:32
#define MSG_ERR
Definition: mbs_equil.c:36
@ BUFFER_LINK_Z
Definition: mbs_buffer.h:22
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:401
int nxch
number of exchange variables for the equilibrium
Definition: mbs_equil_struct.h:117
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:395
int nquch
number of changed independant variables
Definition: mbs_equil_struct.h:75
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_equil_struct.h:144
double R
Definition: mbs_equil_struct.h:138
double relaxIterMax
maximum number of relaxation iterations [default = 10]
Definition: mbs_equil_struct.h:63
int nhu
Number of independent constraints.
Definition: mbs_data.h:269
int mode
1=static / 2=quasistatic / 3=dynamic [default = 1]
Definition: mbs_equil_struct.h:60
int nx
nx=nqu or nux (working variable)
Definition: mbs_linearipk_struct.h:31
double ** xch_ptr
vector of pointers pointing to the exchange variables (the ones that replaces the changed qu)
Definition: mbs_equil_struct.h:77
#define MBS_VERBOSE_ALL
Definition: mbs_define.h:47
double * get_output_vector_ptr(int index)
get the pointer to the output vector at the requested index
Definition: set_output.c:353
int lpk_itermax
options for the lpk gradient [default = 10]
Definition: mbs_equil_struct.h:23