Commit e27bde1a authored by Olivier Lantsoght's avatar Olivier Lantsoght
Browse files

[Constraints] Solving #180

parent 5df9da6b
......@@ -64,7 +64,7 @@ int mbs_step_close_geo(MbsData *s, MbsAux *mbs_aux) {
mbs_calc_hJ(s, mbs_aux);
// Norme des contraintes (en supposant que toutes les contraintes independantes sont au debut ???)
mbs_aux->norm_h = norminf_vector(mbs_aux->h, s->nhu);
mbs_aux->norm_h = norminf_vector(mbs_aux->mJv_h, s->nhu);
// -Jv
nL = s->nhu;
......@@ -88,11 +88,6 @@ int mbs_step_close_geo(MbsData *s, MbsAux *mbs_aux) {
if (mbs_aux->norm_h > mbs_aux->NRerr)
{
// err
for (i = 1; i <= s->nhu; i++)
{
mbs_aux->mJv_h[i] = mbs_aux->h[s->hu[i]];
}
lubksb(mbs_aux->mJv, s->nqv, mbs_aux->ind_mJv, mbs_aux->mJv_h);
// Correction des qv
......@@ -190,6 +185,11 @@ void mbs_calc_hJ(MbsData *s, MbsAux *mbs_aux)
mbs_aux->Jac[s->Nloopc + i][j] = mbs_aux->Juserc[i][j];
}
}
// Retrieving independant constraint value
for (i = 1; i <= s->nhu; i++)
{
mbs_aux->mJv_h[i] = mbs_aux->h[s->hu[i]];
}
}
void mbs_calc_jdqd(MbsData *s, MbsAux *mbs_aux)
......
......@@ -33,7 +33,7 @@ typedef struct MbsAux_tag
int *ind_mJv;
double *Qc;
double *mJv_h;
double *mJv_h; //! Value of the independant constraints (\f$h_u(q)\f$)
// double **mJv_h;
int nquc; //! store nqu+nqc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment