[numerics] fix correct computation of errors
@@ -873,21 +873,21 @@ void gfc3d_ADMM(GlobalFrictionContactProblem* restrict problem_original, double*
{
(*computeError)(problem, reaction, velocity, v, tolerance, options,
norm_q, norm_b, &error);
- printf("############ error = %g\n", error);
+ /* printf("############ error = %g\n", error); */
gfc3d_balancing_back_to_original_variables(problem,
options,
reaction, velocity, v);
(*computeError)(original_problem, reaction, velocity, v, tolerance, options,
- original_problem->norm_b, original_problem->norm_b, &error);
+ original_problem->norm_q, original_problem->norm_b, &error);
error_original = error;
- printf("############ error original = %g\n", error_original);
+ /* printf("############ error original = %g\n", error_original); */
}
else
{
(*computeError)(problem, reaction, velocity, v, tolerance, options,
norm_q, norm_b, &error);
- printf("############ error = %g\n", error);
+ /* printf("############ error = %g\n", error); */
}
@@ -915,12 +915,6 @@ void gfc3d_ADMM(GlobalFrictionContactProblem* restrict problem_original, double*
numerics_printf_verbose(1,"---- GFC3D - ADMM - We keep the tolerance on the residual to %14.7e", tolerance);
}
- if(iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING]>0)
- {
- gfc3d_balancing_go_to_balanced_variables(problem,
- options,
- reaction, velocity, v);
- }
if(rescaling_cone)
{
@@ -940,6 +934,14 @@ void gfc3d_ADMM(GlobalFrictionContactProblem* restrict problem_original, double*
reaction[pos] = reaction[pos]/ problem->mu[contact];
}
}
+ if(iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING]>0)
+ {
+ gfc3d_balancing_go_to_balanced_variables(problem,
+ options,
+ reaction, velocity, v);
+ }
+
+
}
//getchar();
}
@@ -956,7 +958,7 @@ void gfc3d_ADMM(GlobalFrictionContactProblem* restrict problem_original, double*
options,
reaction, velocity, v);
(*computeError)(original_problem, reaction, velocity, v, tolerance, options,
- original_problem->norm_b, original_problem->norm_b, &error);
+ original_problem->norm_q, original_problem->norm_b, &error);
}
else
{
