Commit 59a74d1d authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹

[Fix] close geo in dirdyn was not well returned

parent cc788b47
Pipeline #4404 passed with stage
in 9 minutes and 8 seconds
......@@ -635,17 +635,17 @@ void mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdy
i = dirdynared(dd->mbs_aux,s);
}
if(i<0){ // Error management
if (i >= dd->mbs_aux->MAX_NR_ITER)
{
mbs_msg(">>DIRDYN>> ***** mbs_run_dirdyn : impossible to close the MBS : *****\n");
mbs_msg(">>DIRDYN>> after %d iteration of Newton Raphson \n", i);
mbs_msg(">>DIRDYN>> Loop closing Error: Newton-Raphson iteration overrun during direct dynamics at time %g s !\n", tsim);
mbs_msg(">>DIRDYN>>\n");
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", 400 + i);
}
else if (i == -22)
if (i >= dd->mbs_aux->MAX_NR_ITER) // Error management
{
mbs_msg(">>DIRDYN>> ***** mbs_run_dirdyn : impossible to close the MBS : *****\n");
mbs_msg(">>DIRDYN>> After %d iterations of Newton Raphson \n", i);
mbs_msg(">>DIRDYN>> Loop closing Error: Newton-Raphson iteration overrun during direct dynamics at time %g s !\n", tsim);
mbs_msg(">>DIRDYN>>\n");
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", 400 + i);
}
else if(i<0)
{
if (i == -22)
{
mbs_msg(">>DIRDYN>>\n");
mbs_msg(">>DIRDYN>> Error during direct dynamics at time %g s !\n", tsim);
......@@ -671,6 +671,7 @@ void mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdy
mbs_msg(">>DIRDYN>> Direct dynamic computation: At least one acceleration is Nan at time %g s !\n", tsim);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -470 + i);
}
mbs_error_msg("[??] unknown error in mbs_fct_dirdyn !! \n");
}
// User Derivatives
if(s->Nux>0) user_Derivative(s);
......
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