Commit 177cbcb6 authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹

[Fix] small modif for merge request, error code number

parent 8e3c8d72
Pipeline #4411 passed with stage
in 9 minutes and 6 seconds
......@@ -44,7 +44,7 @@ MbsAux * initMbsAux(MbsData *s)
Ncons = s->Ncons;
mbs_aux->NRerr = s->NRerr;
mbs_aux->MAX_NR_ITER = 97;
mbs_aux->MAX_NR_ITER = 100;
if (Ncons>0)
{
......
......@@ -635,43 +635,11 @@ void mbs_fct_dirdyn(double tsim, double y[], double dydt[], MbsData *s, MbsDirdy
i = dirdynared(dd->mbs_aux,s);
}
if (i >= dd->mbs_aux->MAX_NR_ITER) // Error management
if (i < 0) // 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);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -400 + i);
}
else if (i == -55)
{
mbs_msg(">>DIRDYN>> Mass matrix Error: The reduced mass matrix has a line of zeros at time %g s !\n", tsim);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -400 + i);
}
else if (i == -33)
{
mbs_msg(">>DIRDYN>> Acceleration computation: The cholesky decomposition has failed at time %g s !\n", tsim);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -400 + i);
}
else if (i == -2)
{
mbs_error_msg(">>DIRDYN>> Error during Lambda computation at time %g s !\n", tsim);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -400 + i);
}
else if (i == -7)
{
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");
mbs_msg(">>DIRDYN>> Error during direct dynamics at time %g s !\n", tsim);
mbs_error_msg("[%d] in mbs_fct_dirdyn !! \n", -400 + i);
}
// User Derivatives
if(s->Nux>0) user_Derivative(s);
......
......@@ -47,7 +47,7 @@ int dirdynared(MbsAux *mbs_aux,MbsData *s)
if (iter >= mbs_aux->MAX_NR_ITER)
{
mbs_msg("\t >DIRDYNARED> Impossible to close the geometry after %d iterations \n", iter);
return iter;
return -50;
}
else if (iter <0) // error during LU decomposition
{
......
......@@ -58,6 +58,5 @@ void find_project_path(const char* mbsfile, char* prjpath){
mbs_msg(">>LOAD>> the *.mbs file must be in the dataR folder. \n");
mbs_msg("\n>>LOAD>> Check your files names and paths \n\n");
mbs_error_msg("[%d] in find_project_path !! \n", -989);
exit(1);
}
}
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