1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-18 07:47:06 +01:00

Reorganise a little to let the PV inverter be defined outside

the Reconstruct class.

This lets the multiple choices for PV inversion be composed without
changing the routine and no if/else case enumeration.

Implemented SchurDiagMooee PV inversion (red black) and Unprec PV inversion.
Red black cuts from 190 iterations to 90 iterations at 10^-12 on 8^4 test system

Will revisit multiple Schur options and add a Fourier based multishift PV inverse, similar
to the one Rudy Arthur did in BFM
This commit is contained in:
Peter Boyle
2018-10-10 13:22:01 +01:00
parent be40aaf751
commit 9bfd641b22
2 changed files with 111 additions and 67 deletions

View File

@ -229,16 +229,14 @@ void TestReconstruct5D(What & Ddwf,
Ddwf.M(result,src_NE);
src_NE = src_NE - src;
std::cout <<GridLogMessage<< " True residual is " << norm2(src_NE)<<std::endl;
Reconstruct5DfromPhysical<LatticeFermion> reconstructor(CG);
std::cout <<GridLogMessage<< " True result " << norm2(result)<<std::endl;
std::cout <<GridLogMessage<< " 4d result " << norm2(res4)<<std::endl;
std::cout <<GridLogMessage<< " Reconstructing " <<std::endl;
result_rec = result;
// typedef PauliVillarsSolverUnprec<LatticeFermion> PVinverter;
typedef PauliVillarsSolverRBprec<LatticeFermion> PVinverter;
PVinverter PVinverse(CG);
Reconstruct5DfromPhysical<LatticeFermion,PVinverter> reconstructor(PVinverse);
reconstructor(Ddwf,res4,src4,result_rec);
std::cout <<GridLogMessage << "Result "<<norm2(result)<<std::endl;
@ -246,7 +244,6 @@ void TestReconstruct5D(What & Ddwf,
result_rec = result_rec - result;
std::cout <<GridLogMessage << "Difference "<<norm2(result_rec)<<std::endl;
// reconstructor.SliceDump(result_rec);
}