[numerics] add DEBUG verbose
@@ -47,8 +47,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem,
if (problem == NULL || globalVelocity == NULL)
numerics_error("gfc3d_compute_error", "null input");
-
-
/* Computes error = dnorm2( GlobalVelocity -M^-1( q + H reaction)*/
int nc = problem->numberOfContacts;
int m = nc * 3;
@@ -60,8 +58,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem,
DEBUG_EXPR(NV_display(reaction,m));
DEBUG_EXPR(NV_display(velocity,m));
-
-
NumericsMatrix *H = problem->H;
NumericsMatrix *M = problem->M;
@@ -71,8 +67,6 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem,
}
double* tmp = options->dWork;
-
-
cblas_dcopy_msan(n, q, 1, tmp , 1);
if (nc >0)
{
@@ -86,9 +80,10 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem,
DEBUG_PRINTF("square norm of -M v + H R + q = %e\n", *error);
/* CHECK_RETURN(!NM_gesv_expert(problem->M, globalVelocity, NM_KEEP_FACTORS)); */
-
-
- if (nc >0)
+#ifdef DEBUG_MESSAGES
+ double error_equilibria =0.0;
+#endif
+ DEBUG_EXPR_WE(error_equilibria = *error; );
{
/* Checks inputs */
if (reaction == NULL || velocity == NULL)
@@ -106,7 +101,7 @@ int gfc3d_compute_error(GlobalFrictionContactProblem* problem,
}
DEBUG_PRINTF("square of the error = %e\n", *error);
-
+ DEBUG_PRINTF("square of the error in complementarity = %e\n", *error- error_equilibria);
/* Done, taking the square root */
*error = sqrt(*error);
