|
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:1239
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:20
int mbs_equil_init(MbsEquil *mbs_equil, MbsData *mbs_data)
Initialize the Equilibrium structure variables.
Definition: mbs_equil.c:271
double * x
variables for the equilibrium
Definition: mbs_equil_struct.h:77
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:1258
const char * respath
Path in which result file are saved. [default:resultsR folder].
Definition: mbs_equil_struct.h:29
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:814
@ BUFFER_OTHER
Definition: mbs_buffer.h:23
int grad_lpk
options to compute the gradient through the lpk parabolic fitting method. If not activated,...
Definition: mbs_equil_struct.h:20
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
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:191
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
void mbs_equil_exchange(MbsEquilOptions *options)
Allocate the memory for the changed equilibrium variables through a table of pointers.
Definition: mbs_equil.c:794
int nxe
number of added variables for the equilibrium
Definition: mbs_equil_struct.h:85
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
int clearmbsglobal
Q? inout = 1, out = 2, none = 3, all = 4, default = 1 ???
Definition: mbs_equil_struct.h:44
int * xe
index of the added variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:86
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:293
double lpk_absincr_max
options for the lpk gradient [default = 0]
Definition: mbs_equil_struct.h:24
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: mbs_1D_array.c:1293
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
#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:1405
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 compute_uxd
no = 0, yes = 1, flag to compute the extra constitutive differential equations as equil equations [de...
Definition: mbs_equil_struct.h:18
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
int visualize
Q? no = 0, yes = 1, default = 0.
Definition: mbs_equil_struct.h:43
@ BUFFER_X
Definition: mbs_buffer.h:23
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:294
char * buffer_format
if NULL, "%e" is used
Definition: mbs_equil_struct.h:31
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:175
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:287
double lpk_relincr
options for the lpk gradient [default = 1e-2]
Definition: mbs_equil_struct.h:22
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_equil_struct.h:107
MbsEquil * mbs_new_equil_aux(MbsData *mbs_data, MbsAux *mbs_aux)
Definition: mbs_equil.c:44
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
double lpk_absincr
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:23
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
double * qd_saved
initial generalized velocities as defined in the mbsysPad
Definition: mbs_equil_struct.h:73
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:147
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:271
int verbose
no = 0, yes = 1, extra outputs = 2 [default = 1]
Definition: mbs_equil_struct.h:16
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
int * quch
index of changed independant variables
Definition: mbs_equil_struct.h:50
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:347
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:887
int method
fsolvepk = 1, other method to be added. [default = 1]
Definition: mbs_equil_struct.h:14
double ** x_ptr
vector of pointers pointing to the equilibrium variables
Definition: mbs_equil_struct.h:78
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
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:344
char * resfilename
The keyword used for determining the name of result files [default:equil].
Definition: mbs_equil_struct.h:28
void free_set_output()
release memory of auto_output
Definition: set_output.c:56
double * F
Definition: mbs_equil_struct.h:102
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:212
int * xns
index of non sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:91
int nxns
number of non sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:90
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:814
double devjac
deviate state for Gradient calculation [default = 1e-6]
Definition: mbs_equil_struct.h:40
double equitol
equilibrium acceptation tolerance [default = 1e-6]
Definition: mbs_equil_struct.h:15
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 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:1489
int Nux
Number of user variable.
Definition: mbs_data.h:288
void mbs_print_equil(MbsEquil *eq)
Print the equilibrium structure and its options.
Definition: mbs_equil.c:1598
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:299
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:655
int mbs_growing_buffer_write(MbsGrowingBuffer *b)
write the content of the growing buffer to disk
Definition: mbs_buffer.c:557
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:808
int ludcmp(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 1.
Definition: ludcmp.c:19
@ BUFFER_Q
Definition: mbs_buffer.h:21
void mbs_equil_exchange(MbsEquilOptions *options)
Allocate the memory for the changed equilibrium variables through a table of pointers.
Definition: mbs_equil.c:794
void user_Derivative(MbsData *mbs_data)
Definition: user_Derivative.c:15
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:844
int framerate
number of frame per second for the .anim file
Definition: mbs_equil_struct.h:61
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:142
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
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:156
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:140
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:682
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:19
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:183
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
void mbs_dirdyna(double **M, double *c, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:40
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
MbsEquilOptions * options
structure defining the option of a equilibrium
Definition: mbs_equil_struct.h:70
int mbs_equil_save(MbsEquil *eq, MbsData *s, int iter)
Q?? is that necessary.
Definition: mbs_equil.c:254
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:20
int nxs
number of sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:88
const char * animpath
Path in which animation file are saved. [default:animationR folder].
Definition: mbs_equil_struct.h:30
Definition: mbs_equil_struct.h:68
int itermax
maximum number of iteration for solvepk [default = 30]
Definition: mbs_equil_struct.h:41
int mbs_run_equil(MbsEquil *mbs_equil, MbsData *mbs_data)
Run the Equilibrium process.
Definition: mbs_equil.c:214
double ** grad
Linear Tangent matrix: delta Fx / delta x (obtained numerically)
Definition: mbs_equil_struct.h:96
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:74
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 user_equil_finish(MbsData *mbs_data, MbsEquil *mbs_equil)
user own finishing functions
Definition: user_equil.c:53
Definition: mbs_buffer.h:46
int Nux_saved
copy of mbs_data Nux
Definition: mbs_equil_struct.h:80
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:253
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:164
void user_equil_loop(MbsData *mbs_data, MbsEquil *mbs_equil)
user own loop functions
Definition: user_equil.c:40
int iter
current iteration in the equilibrium computation
Definition: mbs_equil_struct.h:104
void mbs_delete_growing_buffer(MbsGrowingBuffer *b)
release memory for growing buffer
Definition: mbs_buffer.c:188
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
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:655
MbsLpk * lpk
working structure to compute the linearized matrices (one by one)
Definition: mbs_equil_struct.h:100
void mbs_equil_addition(MbsEquilOptions *options)
Allocate the memory for the addition equilibrium variables through a table of pointers.
Definition: mbs_equil.c:819
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:233
int nxe
number of extra equilibrium variables
Definition: mbs_equil_struct.h:53
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:34
void(* fxe_ptr)(MbsData *, double *)
pointer pointing on the .c function calculating the added equilibrum functions
Definition: mbs_equil_struct.h:64
double relaxcoeff
relaxation coefficient [default = 0.9]
Definition: mbs_equil_struct.h:36
void freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_aux.c:174
void mbs_delete_equil(MbsEquil *eq, MbsData *s)
Free the Equilibrium structure (pointers table, Equibrium options, ...)
Definition: mbs_equil.c:146
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:830
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:1598
void mbs_delete_equil(MbsEquil *eq, MbsData *mbs_data)
Free the Equilibrium structure (pointers table, Equibrium options, ...)
Definition: mbs_equil.c:146
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
#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:808
double ** grad_Rr
mbs Linear Tangent matrix: delta Rr / delta x (obtained numerically)
Definition: mbs_equil_struct.h:97
int soft
softing in pk algorithm no = 0, yes = 1 [default = 0]
Definition: mbs_equil_struct.h:38
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
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:844
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:312
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1)
Definition: mbs_equil_struct.h:60
#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:168
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_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:87
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
MbsGrowingBuffer * mbs_new_growing_buffer(int max_nx, int size, const char *respath)
create a new growing buffer for the user inputs to save
Definition: mbs_buffer.c:120
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:34
int mbs_calc_force(MbsData *s)
compute the force and torques applied on the multibody system.
Definition: mbs_calc_force.c:13
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
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:180
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:35
void mbs_calc_jdqd(MbsData *s, MbsAux *mbs_aux)
compute the quadratic term of the constraints at acceleration level:
Definition: mbs_close_loops.c:216
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:18
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
int * xch
index of the exchange variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:83
int bufferNb
Definition: mbs_equil_struct.h:106
void mbs_equil_addition(MbsEquilOptions *options)
Allocate the memory for the addition equilibrium variables through a table of pointers.
Definition: mbs_equil.c:819
int saveperiod
The number of iteration between two buffer records [default = 1] (every iteration are recorded)
Definition: mbs_equil_struct.h:59
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:1405
Definition: mbs_data.h:149
void 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:188
int success
1 if the equilibrium process were successful (0 if none -1 if failed)
Definition: mbs_equil_struct.h:111
MbsEquil * mbs_new_equil_aux(MbsData *s, MbsAux *mbs_aux)
Definition: mbs_equil.c:44
int * xe_index
vector containing the index of the added variables inside the equilibrium variables vector
Definition: mbs_equil_struct.h:56
#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:162
Definition: mbs_equil_struct.h:12
double lpk_equitol
options for the lpk gradient [default = 1e-6]
Definition: mbs_equil_struct.h:25
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
double ** grad_uxd
uxd Linear Tangent matrix: delta uxd / delta x (obtained numerically)
Definition: mbs_equil_struct.h:98
int get_output_vector_size(int index)
get the output vector size corresponding to the requested index
Definition: set_output.c:222
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_dirdynared.c:25
double senstol
tolerance for testing a variable non-sensitivity [default = 1e-6]
Definition: mbs_equil_struct.h:39
int buffersize
The number of time step that can be recorded in the buffer [default = -1].
Definition: mbs_equil_struct.h:62
int mbs_run_equil(MbsEquil *eq, MbsData *s)
Run the Equilibrium process.
Definition: mbs_equil.c:214
int get_output_vector_nb()
get the number of user vector inputs
Definition: set_output.c:240
void user_equil_init(MbsData *mbs_data, MbsEquil *mbs_equil)
user own initialization functions
Definition: user_equil.c:27
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_equil_struct.h:108
void init_set_output(int max_nb_curves)
initialize the static auto_output structure
Definition: set_output.c:23
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:887
void mbs_delete_lpk(MbsLpk *lpk)
free memory of the lpk structure.
Definition: mbs_linearipk.c:393
double lpk_lintol
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:26
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:682
double equitol
options for the lpk linearization [default = 1e-6]
Definition: mbs_linearipk_struct.h:53
@ BUFFER_R
Definition: mbs_buffer.h:23
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
int nx
number of variables for the equilibrium
Definition: mbs_equil_struct.h:76
void cholsl(double **a, int n, double p[], double b[], double x[])
Definition: cholsl.c:10
MbsAux * aux
Definition: mbs_equil_struct.h:71
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: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 * xs
index of sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:89
double ** grad_fxe
fxe Linear Tangent matrix: delta fxe / delta x (obtained numerically)
Definition: mbs_equil_struct.h:99
@ BUFFER_F
Definition: mbs_buffer.h:23
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:1230
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:222
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_equil_struct.h:105
double ** xe_ptr
vector of pointers pointing to the extra variables
Definition: mbs_equil_struct.h:54
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:832
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:286
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:15
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:1489
int max_save_user
The maximal number of user variables saved [default = 12].
Definition: mbs_equil_struct.h:63
double lintol
options for the lpk linearization [default = 1e-3]
Definition: mbs_linearipk_struct.h:54
void user_equil_fxe(MbsData *mbs_data, double *f)
user own implementation of added equilibrium equations Fxe Necessary to express equilibrium f(x)=0
Definition: user_equil.c:65
#define MAX(a, b)
Definition: useful_functions.h:14
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
char * get_output_vector_label(int index)
get the output vector label corresponding to the requested index
Definition: set_output.c:211
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:830
int mbs_rank_0(double **A, int m, int n)
Compute the rank of matrix_in.
Definition: rank_lapack.c:38
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)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
double norm_pk
norm of the equlibrium variables vector x (parameter to minimize in the solvepk algorithm)
Definition: mbs_equil_struct.h:94
int mbs_equil_save(MbsEquil *eq, MbsData *mbs_data, int n)
Q?? is that necessary.
Definition: mbs_equil.c:254
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:494
int save2file
1: results saved 0: not saved [default = 1]
Definition: mbs_equil_struct.h:17
int nF
nF=nqu or nF=nqu+nux (working variable)
Definition: mbs_linearipk_struct.h:32
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:291
int nxch
number of exchange variables for the equilibrium
Definition: mbs_equil_struct.h:82
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:285
int nquch
number of changed independant variables
Definition: mbs_equil_struct.h:49
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_equil_struct.h:109
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
double R
Definition: mbs_equil_struct.h:103
double relaxIterMax
maximum number of relaxation iterations [default = 10]
Definition: mbs_equil_struct.h:37
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
int mode
1=static / 2=quasistatic / 3=dynamic [default = 1]
Definition: mbs_equil_struct.h:34
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:51
double * get_output_vector_ptr(int index)
get the pointer to the output vector at the requested index
Definition: set_output.c:259
int lpk_itermax
options for the lpk gradient [default = 10]
Definition: mbs_equil_struct.h:21
void user_DrivenJoints(MbsData *mbs_data, double tsim)
Compute the positions, velocities and acceleration of driven joint.
Definition: user_DrivenJoints.c:15