mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Useful periodic print. CG convergence bound is remarkably accurate on
low eigenvalue in numerical tests
This commit is contained in:
parent
57bd0a0a22
commit
e9648a1635
@ -152,8 +152,13 @@ public:
|
|||||||
LinearCombTimer.Stop();
|
LinearCombTimer.Stop();
|
||||||
LinalgTimer.Stop();
|
LinalgTimer.Stop();
|
||||||
|
|
||||||
std::cout << GridLogIterative << "ConjugateGradient: Iteration " << k
|
if ( (k % 500) == 0 ) {
|
||||||
|
std::cout << GridLogMessage << "ConjugateGradient: Iteration " << k
|
||||||
<< " residual " << sqrt(cp/ssq) << " target " << Tolerance << std::endl;
|
<< " residual " << sqrt(cp/ssq) << " target " << Tolerance << std::endl;
|
||||||
|
} else {
|
||||||
|
std::cout << GridLogIterative << "ConjugateGradient: Iteration " << k
|
||||||
|
<< " residual " << sqrt(cp/ssq) << " target " << Tolerance << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Stopping condition
|
// Stopping condition
|
||||||
if (cp <= rsq) {
|
if (cp <= rsq) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user