1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

Lanczos test

This commit is contained in:
Peter Boyle 2015-10-09 00:39:21 +02:00
parent 814c79f38d
commit 44fecd4d8d

View File

@ -35,21 +35,26 @@ int main (int argc, char ** argv)
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf); MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf);
const int Nk = 10; const int Nk = 30;
const int Np = 1; const int Np = 10;
RealD enorm = 1.0; const int Nm = Nk+Np;
RealD vthrs = 1; const int MaxIt= 10000;
const int Nit= 1000; RealD resid = 1.0e-8;
ImplicitlyRestartedLanczos<LatticeFermion> IRL(HermOp,PolyX, std::vector<double> Coeffs(1,1.0);
Nk,Np,enorm,vthrs,Nit); Polynomial<LatticeFermion> PolyX(Coeffs);
ImplicitlyRestartedLanczos<LatticeFermion> IRL(HermOp,PolyX,Nk,Nm,resid,MaxIt);
std::vector<RealD> eval(Nk); std::vector<RealD> eval(Nm);
std::vector<LatticeFermion> evec(Nk,FGrid); std::vector<LatticeFermion> evec(Nm,FGrid);
for(int i=0;i<Nm;i++){
std::cout << i<<" / "<< Nm<< " grid pointer "<<evec[i]._grid<<std::endl;
};
int Nconv;
IRL.calc(eval,evec, IRL.calc(eval,evec,
src, src,
Nsbt,
Nconv); Nconv);