mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-07 04:35:56 +01:00
Isnan check on guess and convergence assert on result
This commit is contained in:
parent
42c583265c
commit
8c9010d0f4
@ -30,7 +30,8 @@ public:
|
||||
|
||||
//Initial residual computation & set up
|
||||
RealD guess = norm2(psi);
|
||||
|
||||
assert(std::isnan(psi)==0);
|
||||
|
||||
Linop.HermOpAndNorm(psi,mmp,d,b);
|
||||
|
||||
r= src-mmp;
|
||||
@ -94,6 +95,9 @@ public:
|
||||
<<" computed residual "<<sqrt(cp/ssq)
|
||||
<<" true residual "<<true_residual
|
||||
<<" target "<<Tolerance<<std::endl;
|
||||
|
||||
assert(true_residual/Tolerance < 1000.0);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user