1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 12:17:05 +01:00

Commit for debugging, lot of IO

This commit is contained in:
Guido Cossu
2016-12-13 06:35:30 +00:00
parent e0be2b6e6c
commit 5c74b6028b
4 changed files with 19 additions and 7 deletions

View File

@ -128,8 +128,12 @@ class ConjugateGradient : public OperatorFunction<Field> {
p = p * b + r;
LinalgTimer.Stop();
std::cout << GridLogIterative << "ConjugateGradient: Iteration " << k
<< " residual " << cp << " target " << rsq << std::endl;
std::cout << GridLogDebug << "a = "<< a << " b_pred = "<< b_pred << " b = "<< b << std::endl;
std::cout << GridLogDebug << "qq = "<< qq << " d = "<< d << " c = "<< c << std::endl;
// Stopping condition
if (cp <= rsq) {
@ -161,7 +165,7 @@ class ConjugateGradient : public OperatorFunction<Field> {
}
std::cout << GridLogMessage << "ConjugateGradient did NOT converge"
<< std::endl;
if (ErrorOnNoConverge) assert(0);
if (ErrorOnNoConverge) exit(1);
}
};
}