mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-11 14:40:46 +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
|
//Initial residual computation & set up
|
||||||
RealD guess = norm2(psi);
|
RealD guess = norm2(psi);
|
||||||
|
assert(std::isnan(psi)==0);
|
||||||
|
|
||||||
Linop.HermOpAndNorm(psi,mmp,d,b);
|
Linop.HermOpAndNorm(psi,mmp,d,b);
|
||||||
|
|
||||||
r= src-mmp;
|
r= src-mmp;
|
||||||
@ -94,6 +95,9 @@ public:
|
|||||||
<<" computed residual "<<sqrt(cp/ssq)
|
<<" computed residual "<<sqrt(cp/ssq)
|
||||||
<<" true residual "<<true_residual
|
<<" true residual "<<true_residual
|
||||||
<<" target "<<Tolerance<<std::endl;
|
<<" target "<<Tolerance<<std::endl;
|
||||||
|
|
||||||
|
assert(true_residual/Tolerance < 1000.0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user