mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 12:47:05 +01:00
Commit for debugging, lot of IO
This commit is contained in:
@ -234,11 +234,17 @@ namespace Grid {
|
||||
virtual RealD MpcDag (const Field &in, Field &out){
|
||||
Field tmp(in._grid);
|
||||
|
||||
std::cout << "norm in :" << norm2(in) << std::endl;
|
||||
_Mat.MeooeDag(in,tmp);
|
||||
_Mat.MooeeInvDag(tmp,out);
|
||||
std::cout << "norm tmp :" << norm2(tmp) << std::endl;
|
||||
_Mat.MooeeInvDag(tmp,out);
|
||||
std::cout << "norm out :" << norm2(out) << std::endl;
|
||||
_Mat.MeooeDag(out,tmp);
|
||||
std::cout << "norm tmp :" << norm2(tmp) << std::endl;
|
||||
|
||||
|
||||
_Mat.MooeeDag(in,out);
|
||||
std::cout << "norm out :" << norm2(out) << std::endl;
|
||||
return axpy_norm(out,-1.0,tmp,out);
|
||||
}
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user