print intermediate values only in debug mode

This commit is contained in:
Krishna Vedala 2020-04-09 15:52:10 -04:00
parent 7a7858a7fb
commit 2a8848bf23
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -169,6 +169,7 @@ int main(int argc, char **argv)
}
// tol_condition /= (degree - 1);
#if defined(DEBUG) || !defined(NDEBUG)
if (iter % 500 == 0)
{
printf("Iter: %lu\t", iter);
@ -177,7 +178,6 @@ int main(int argc, char **argv)
printf("\t\tabsolute average change: %.4g\n", tol_condition);
}
#if defined(DEBUG) || !defined(NDEBUG)
fprintf(log_file, "%.4g", tol_condition);
#endif
}