Commit 248b976f authored by Quentin Docquier's avatar Quentin Docquier

some changes in the error message for the sensitive variable detection.

parent 847caf6a
......@@ -726,16 +726,14 @@ int mbs_equil_fsolvepk(int(*fun_ptr)(double*, int, double*, MbsEquil*, MbsAux*,
if (rank_grad< eq->nxs)
{
// An error is detected !
mbs_msg("EQUIL-ERROR: the number of sensitive variables determined numerically is not consistent with the rank of the numerical gradient \n \
--> Try to adjust equil options 'senstol' and/or 'devJac' \n \
--> Set the variable known to be non-sensitive to driven just for the equilibrium (using 'mbs_set_qdriven' and 'mbs_set_qu' around the equilibrium process. see 'mbs_set.h') \n");
mbs_msg(">>EQUIL>> Numerical gradient : delta F_eq / delta x_eq \n");
print_dmat_0(grad, nf, nx);
mbs_msg(">>EQUIL>> Number of sensitive variables detected, nxs = %d\n", eq->nxs);
mbs_msg(">>EQUIL>> xs = ["); for (i = 0; i < eq->nxs; i++) { mbs_msg(" %d ", eq->xs[i] + 1);} mbs_msg(" ] \t (index in the x vector)\n");
mbs_msg(">>EQUIL>> xns = ["); for (i = 0; i < eq->nxns; i++){ mbs_msg(" %d ", eq->xns[i] + 1);}mbs_msg(" ] \t (index in the x vector)\n");
mbs_msg(">>EQUIL>> xs = ["); for (i = 0; i < eq->nxs; i++) { mbs_msg(" %d ", eq->xs[i] + 1); } mbs_msg(" ] \t (index in the x vector)\n");
mbs_msg(">>EQUIL>> xns = ["); for (i = 0; i < eq->nxns; i++) { mbs_msg(" %d ", eq->xns[i] + 1); }mbs_msg(" ] \t (index in the x vector)\n");
mbs_msg(">>EQUIL>> from Numerical gradient : delta F_eq / delta x_eq \n");
print_dmat_0(grad, nf, nx);
mbs_msg(">>EQUIL>> Rank of Numerical gradient computed, %d\n", rank_grad);
mbs_error_msg(">>EQUIL>> After eliminating the non sensitive variables, the numerical gradient is still singular !\n");
mbs_error_msg(">>EQUIL>> The number of sensitive variables determined numerically is not consistent with the rank of the numerical gradient \n --> Try to adjust equil options 'senstol' and/or 'devJac' \n --> Set the variable known to be non-sensitive to driven just for the equilibrium (using 'mbs_set_qdriven' and 'mbs_set_qu' around the equilibrium process. see 'mbs_set.h') \n");
err = 1;
return err;
}
......@@ -1015,8 +1013,7 @@ int mbs_equil_fsolvepk(int(*fun_ptr)(double*, int, double*, MbsEquil*, MbsAux*,
void mbs_print_equil(MbsEquil* eq)
{
int i;
mbs_msg("\n--- Equilibrium Printout ---\n");
mbs_msg("-------------- Equilibrium Printout ---------------\n");
mbs_msg("Options \n");
......
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