#include "mbs_linearipk_struct.h"
#include "mbs_data.h"
#include "mbs_aux.h"
#include "useful_functions.h"
#include "MBSfun.h"
Go to the source code of this file.
Functions | |
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. More... | |
int | mbs_lineari_fct (double *x, double *Fx, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice) |
compute the Fx vector for a given vector x. More... | |
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,qd,qdd). More... | |
void | mbs_delete_lpk (MbsLpk *lpk) |
free memory of the lpk structure. More... | |
void mbs_delete_lpk | ( | MbsLpk * | lpk | ) |
free memory of the lpk structure.
[in,out] | lpk | the MbsLpk structure to delete. |
int mbs_lineari_fct | ( | double * | x, |
double * | Fx, | ||
MbsLpk * | lpk, | ||
MbsAux * | aux, | ||
MbsData * | s, | ||
int | EqChoice | ||
) |
compute the Fx vector for a given vector x.
The values in the vector x are set in the memory pointed by MbsLpk::x_ptr (typically the independents joints coordinates MbsData::q or velocities MbsData::qd).
NOTE: this function could be clearly improved by the use of a vector of pointer that either point the velocities or the positions.
[in] | x | contains the independent position OR velocities OR the extra differential states. |
[out] | Fx | contains the residual of the reduced equations of motion OR the extra set of constitutive ODE for the provided vector x. |
[in] | lpk | computation structure used for the linearization. |
[in] | aux | auxilary structure necessary for the computation of the reduced residual. |
[in] | s | data structure, just used for the computation. |
[in] | EqChoice | digit that indicates on which equations is performed the linearization:
|
compute the linearized damping matrix Gr or stiffness matrix Kr for a given configuration (q,qd,qdd).
The compted matrix depend weither MbsLpk::x_ptr points to MbsData::q[MbsData::qu] or MbsData::qd[MbsData::qu].
NOTE: this function could be clearly improved by the use of a vector of pointer that either point the velocities or the positions.
[out] | GK | contains the resulting linearized matrix (Gr or Kr). |
[in] | lpk | computation structure used for the linearization. |
[in] | aux | auxilary structure necessary for the computation of the reduced residual. |
[in] | s | data structure containing the mbs configuration (q,qd,qdd). |
[in] | EqChoice | digit that indicates on which equations is performed the linearization (see mbs_lineari_fct()) |