11 PowerMethod<Field> power_method;
12 auto lambda_max = power_method(HermOp,Phi);
13 std::cout <<
GridLogMessage <<
"Pseudofermion action lamda_max "<<lambda_max<<
"( bound "<<hi<<
")"<<std::endl;
14 assert( (lambda_max < hi) &&
" High Bounds Check on operator failed" );
21 int orderfilter = 1000;
24 GridBase *FermionGrid = GaussNoise.Grid();
34 std::cout <<
"************************* "<<std::endl;
35 std::cout <<
" noise = "<<Nx<<std::endl;
36 std::cout <<
" Cheb x noise = "<<Nz<<std::endl;
37 std::cout <<
" Ratio = "<<Nz/Nx<<std::endl;
38 std::cout <<
"************************* "<<std::endl;
39 assert( ((Nz/Nx)<1.0) &&
" ChebyBoundsCheck ");
47 GridBase *FermionGrid = GaussNoise.Grid();
67 std::cout <<
"************************* "<<std::endl;
68 std::cout <<
" | noise |^2 = "<<Nx<<std::endl;
69 std::cout <<
" | (MdagM^-1/2)^2 noise |^2 = "<<Nz<<std::endl;
70 std::cout <<
" | MdagM (MdagM^-1/2)^2 noise |^2 = "<<Ny<<std::endl;
71 std::cout <<
" | noise - MdagM (MdagM^-1/2)^2 noise |^2 = "<<
Nd<<std::endl;
72 std::cout <<
" | noise - MdagM (MdagM^-1/2)^2 noise|/|noise| = " << std::sqrt(
Nd/Nx) << std::endl;
73 std::cout <<
"************************* "<<std::endl;
74 assert( (std::sqrt(
Nd/Nx)<tol) &&
" InverseSqrtBoundsCheck ");
83 int MaxIter,
double tol,
88 GridBase *FermionGrid = GaussNoise.Grid();
94 Field tmp1(FermionGrid), tmp2(FermionGrid);
105 for(
int i=0;i<inv_pow;i++){
106 msCG(HermOp, *in, *out);
107 if(i!=inv_pow-1) std::swap(in, out);
118 std::cout <<
"************************* "<<std::endl;
119 std::cout <<
" | noise |^2 = "<<Nx<<std::endl;
120 std::cout <<
" | (MdagM^-1/" << inv_pow <<
")^" << inv_pow <<
" noise |^2 = "<<Nz<<std::endl;
121 std::cout <<
" | MdagM (MdagM^-1/" << inv_pow <<
")^" << inv_pow <<
" noise |^2 = "<<Ny<<std::endl;
122 std::cout <<
" | noise - MdagM (MdagM^-1/" << inv_pow <<
")^" << inv_pow <<
" noise |^2 = "<<
Nd<<std::endl;
123 std::cout <<
" | noise - MdagM (MdagM^-1/" << inv_pow <<
")^" << inv_pow <<
" noise |/| noise | = "<<std::sqrt(
Nd/Nx)<<std::endl;
124 std::cout <<
"************************* "<<std::endl;
125 assert( (std::sqrt(
Nd/Nx)<tol) &&
" InversePowerBoundsCheck ");
void InverseSqrtBoundsCheck(int MaxIter, double tol, LinearOperatorBase< Field > &HermOp, Field &GaussNoise, MultiShiftFunction &PowerNegHalf)
void ChebyBoundsCheck(LinearOperatorBase< Field > &HermOp, Field &GaussNoise, RealD lo, RealD hi)
void InversePowerBoundsCheck(int inv_pow, int MaxIter, double tol, LinearOperatorBase< Field > &HermOp, Field &GaussNoise, MultiShiftFunction &ApproxNegPow)
void HighBoundCheck(LinearOperatorBase< Field > &HermOp, Field &Phi, RealD hi)
RealD norm2(const Lattice< vobj > &arg)
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
#define NAMESPACE_BEGIN(A)
virtual void HermOp(const Field &in, Field &out)=0