mirror of
https://github.com/paboyle/Grid.git
synced 2025-07-27 01:37:07 +01:00
Merge branch 'feature/dirichlet' into feature/block_lanczos22
This commit is contained in:
@@ -29,19 +29,6 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
template<class d>
|
||||
struct scal {
|
||||
d internal;
|
||||
};
|
||||
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
template<class What>
|
||||
void TestWhat(What & Ddwf,
|
||||
@@ -88,8 +75,13 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"DomainWallFermion vectorised test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestWhat<DomainWallFermionR>(Ddwf,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
std::vector<Complex> boundary = {1,1,1,-1};
|
||||
DomainWallFermionD::ImplParams Params(boundary);
|
||||
Coordinate Dirichlet({0,8,8,16,32});
|
||||
Params.dirichlet=Dirichlet;
|
||||
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,Params);
|
||||
TestWhat<DomainWallFermionD>(Ddwf,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
RealD b=1.5;// Scale factor b+c=2, b-c=1
|
||||
RealD c=0.5;
|
||||
@@ -97,54 +89,54 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
MobiusFermionR Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermionR>(Dmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermionD>(Dmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"Z-MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::vector<ComplexD> gamma(Ls,std::complex<double>(1.0,0.0));
|
||||
ZMobiusFermionR zDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestWhat<ZMobiusFermionR>(zDmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
ZMobiusFermionD zDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestWhat<ZMobiusFermionD>(zDmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
MobiusZolotarevFermionR Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
MobiusZolotarevFermionD Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
|
||||
TestWhat<MobiusZolotarevFermionR>(Dzolo,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<MobiusZolotarevFermionD>(Dzolo,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ScaledShamirFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
ScaledShamirFermionR Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
|
||||
TestWhat<ScaledShamirFermionR>(Dsham,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<ScaledShamirFermionD>(Dsham,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
ShamirZolotarevFermionR Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
ShamirZolotarevFermionD Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
|
||||
TestWhat<ShamirZolotarevFermionR>(Dshamz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<ShamirZolotarevFermionD>(Dshamz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermionR Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonCayleyTanhFermionD Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
|
||||
TestWhat<OverlapWilsonCayleyTanhFermionR>(Dov,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<OverlapWilsonCayleyTanhFermionD>(Dov,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
OverlapWilsonCayleyZolotarevFermionR Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
OverlapWilsonCayleyZolotarevFermionD Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermionR>(Dovz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermionD>(Dovz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"=============================================================="<<std::endl;
|
||||
|
||||
|
@@ -209,8 +209,8 @@ int main (int argc, char ** argv) {
|
||||
std::cout << GridLogMessage << "Lattice dimensions: " << latt << " Ls: " << Ls << std::endl;
|
||||
|
||||
// ZMobius EO Operator
|
||||
ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
|
||||
// Eigenvector storage
|
||||
LanczosParams fine =Params.FineParams;
|
||||
|
@@ -101,7 +101,7 @@ int main (int argc, char ** argv)
|
||||
std:: cout << " MdagM site flops = "<< 4*MdagMsiteflops<<std::endl;
|
||||
std:: cout << " CG site flops = "<< CGsiteflops <<std::endl;
|
||||
int iters;
|
||||
for(int i=0;i<200;i++){
|
||||
for(int i=0;i<10;i++){
|
||||
result_o = Zero();
|
||||
t1=usecond();
|
||||
mCG(src_o,result_o);
|
||||
|
@@ -33,8 +33,8 @@ using namespace Grid;
|
||||
const int TSRC = 0; //timeslice where rho is nonzero
|
||||
const int VDIM = 5; //length of each vector
|
||||
|
||||
typedef typename DomainWallFermionR::ComplexField ComplexField;
|
||||
typedef typename DomainWallFermionR::FermionField FermionField;
|
||||
typedef typename DomainWallFermionD::ComplexField ComplexField;
|
||||
typedef typename DomainWallFermionD::FermionField FermionField;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@@ -793,6 +793,7 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
std::cout <<" OK ! "<<std::endl;
|
||||
|
||||
#ifdef USE_FP16
|
||||
// Double to Half
|
||||
std::cout << GridLogMessage<< "Double to half" ;
|
||||
precisionChange(&H[0],&D[0],Ndp);
|
||||
@@ -822,6 +823,7 @@ int main (int argc, char ** argv)
|
||||
assert( tmp < 1.0e-3 );
|
||||
}
|
||||
std::cout <<" OK ! "<<std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
Grid_finalize();
|
||||
|
@@ -75,8 +75,8 @@ int main (int argc, char ** argv)
|
||||
RealD M5=1.8;
|
||||
|
||||
{
|
||||
OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
HermitianLinearOperator<OverlapWilsonContFracTanhFermionR,LatticeFermion> HermIndefOp(Dcf);
|
||||
OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
HermitianLinearOperator<OverlapWilsonContFracTanhFermionD,LatticeFermion> HermIndefOp(Dcf);
|
||||
|
||||
HermIndefOp.Op(src,ref);
|
||||
HermIndefOp.OpDiag(src,result);
|
||||
@@ -92,8 +92,8 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
|
||||
{
|
||||
OverlapWilsonPartialFractionTanhFermionR Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
HermitianLinearOperator<OverlapWilsonPartialFractionTanhFermionR,LatticeFermion> HermIndefOp(Dpf);
|
||||
OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
HermitianLinearOperator<OverlapWilsonPartialFractionTanhFermionD,LatticeFermion> HermIndefOp(Dpf);
|
||||
|
||||
HermIndefOp.Op(src,ref);
|
||||
HermIndefOp.OpDiag(src,result);
|
||||
|
@@ -140,14 +140,14 @@ int main (int argc, char ** argv)
|
||||
|
||||
// RealD mass=0.1;
|
||||
// RealD M5=1.8;
|
||||
// DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
// DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
// LatticeFermion src_o(FrbGrid);
|
||||
// LatticeFermion result_o(FrbGrid);
|
||||
// pickCheckerboard(Odd,src_o,src);
|
||||
// result_o=Zero();
|
||||
|
||||
// SchurDiagMooeeOperator<DomainWallFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
// SchurDiagMooeeOperator<DomainWallFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
// ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
// CG(HermOpEO,src_o,result_o);
|
||||
|
||||
|
@@ -76,20 +76,20 @@ int main (int argc, char ** argv)
|
||||
RealD M5 =1.8;
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonContFracTanhFermion test"<<std::endl;
|
||||
OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonContFracTanhFermionR>(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonContFracTanhFermionD>(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonContFracZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonContFracZolotarevFermionR Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestWhat<OverlapWilsonContFracZolotarevFermionR>(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonContFracZolotarevFermionD Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestWhat<OverlapWilsonContFracZolotarevFermionD>(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonPartialFractionTanhFermion test"<<std::endl;
|
||||
OverlapWilsonPartialFractionTanhFermionR Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonPartialFractionTanhFermionR>(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonPartialFractionTanhFermionD>(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonPartialFractionZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonPartialFractionZolotarevFermionR Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestWhat<OverlapWilsonPartialFractionZolotarevFermionR>(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonPartialFractionZolotarevFermionD Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestWhat<OverlapWilsonPartialFractionZolotarevFermionD>(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ int main (int argc, char ** argv)
|
||||
RealD shift = 0.1234;
|
||||
RealD M5 = 1.8;
|
||||
int pm = 1;
|
||||
DomainWallEOFAFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5);
|
||||
DomainWallEOFAFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5);
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@@ -216,7 +216,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd , phi_o, phi);
|
||||
|
||||
SchurDiagMooeeOperator<DomainWallEOFAFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<DomainWallEOFAFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
HermOpEO.MpcDagMpc(chi_e, dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o, dchi_o);
|
||||
|
||||
|
@@ -86,7 +86,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD M5 =1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@@ -213,7 +213,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<DomainWallFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<DomainWallFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
244
tests/core/Test_fft_matt.cc
Normal file
244
tests/core/Test_fft_matt.cc
Normal file
@@ -0,0 +1,244 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT,
|
||||
Gamma::Algebra::Gamma5
|
||||
};
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
int threads = GridThread::GetThreads();
|
||||
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
||||
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplexD::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
|
||||
int vol = 1;
|
||||
for(int d=0;d<latt_size.size();d++){
|
||||
vol = vol * latt_size[d];
|
||||
}
|
||||
GridCartesian GRID(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGRID(&GRID);
|
||||
|
||||
LatticeComplexD coor(&GRID);
|
||||
|
||||
ComplexD ci(0.0,1.0);
|
||||
|
||||
std::vector<int> seeds({1,2,3,4});
|
||||
GridSerialRNG sRNG; sRNG.SeedFixedIntegers(seeds); // naughty seeding
|
||||
GridParallelRNG pRNG(&GRID);
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
LatticeGaugeFieldD Umu(&GRID);
|
||||
SU<Nc>::ColdConfiguration(pRNG,Umu); // Unit gauge
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Wilson test
|
||||
////////////////////////////////////////////////////
|
||||
{
|
||||
LatticeFermionD src(&GRID); gaussian(pRNG,src);
|
||||
LatticeFermionD src_p(&GRID);
|
||||
LatticeFermionD tmp(&GRID);
|
||||
LatticeFermionD ref(&GRID);
|
||||
LatticeFermionD result(&GRID);
|
||||
|
||||
RealD mass=0.1;
|
||||
WilsonFermionD Dw(Umu,GRID,RBGRID,mass);
|
||||
|
||||
Dw.M(src,ref);
|
||||
std::cout << "Norm src "<<norm2(src)<<std::endl;
|
||||
std::cout << "Norm Dw x src "<<norm2(ref)<<std::endl;
|
||||
{
|
||||
FFT theFFT(&GRID);
|
||||
|
||||
////////////////
|
||||
// operator in Fourier space
|
||||
////////////////
|
||||
tmp =ref;
|
||||
theFFT.FFT_all_dim(result,tmp,FFT::forward);
|
||||
std::cout<<"FFT[ Dw x src ] "<< norm2(result)<<std::endl;
|
||||
|
||||
tmp = src;
|
||||
theFFT.FFT_all_dim(src_p,tmp,FFT::forward);
|
||||
std::cout<<"FFT[ src ] "<< norm2(src_p)<<std::endl;
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// work out the predicted FT from Fourier
|
||||
/////////////////////////////////////////////////////////////////
|
||||
auto FGrid = &GRID;
|
||||
LatticeFermionD Kinetic(FGrid); Kinetic = Zero();
|
||||
LatticeComplexD kmu(FGrid);
|
||||
LatticeInteger scoor(FGrid);
|
||||
LatticeComplexD sk (FGrid); sk = Zero();
|
||||
LatticeComplexD sk2(FGrid); sk2= Zero();
|
||||
LatticeComplexD W(FGrid); W= Zero();
|
||||
LatticeComplexD one(FGrid); one =ComplexD(1.0,0.0);
|
||||
ComplexD ci(0.0,1.0);
|
||||
|
||||
for(int mu=0;mu<Nd;mu++) {
|
||||
|
||||
RealD TwoPiL = M_PI * 2.0/ latt_size[mu];
|
||||
|
||||
LatticeCoordinate(kmu,mu);
|
||||
|
||||
kmu = TwoPiL * kmu;
|
||||
|
||||
sk2 = sk2 + 2.0*sin(kmu*0.5)*sin(kmu*0.5);
|
||||
sk = sk + sin(kmu) *sin(kmu);
|
||||
|
||||
// -1/2 Dw -> 1/2 gmu (eip - emip) = i sinp gmu
|
||||
Kinetic = Kinetic + sin(kmu)*ci*(Gamma(Gmu[mu])*src_p);
|
||||
|
||||
}
|
||||
|
||||
W = mass + sk2;
|
||||
Kinetic = Kinetic + W * src_p;
|
||||
|
||||
std::cout<<"Momentum space src "<< norm2(src_p)<<std::endl;
|
||||
std::cout<<"Momentum space Dw x src "<< norm2(Kinetic)<<std::endl;
|
||||
std::cout<<"FT[Coordinate space Dw] "<< norm2(result)<<std::endl;
|
||||
|
||||
result = result - Kinetic;
|
||||
std::cout<<"diff "<< norm2(result)<<std::endl;
|
||||
|
||||
}
|
||||
|
||||
std::cout << " =======================================" <<std::endl;
|
||||
std::cout << " Checking FourierFreePropagator x Dw = 1" <<std::endl;
|
||||
std::cout << " =======================================" <<std::endl;
|
||||
std::cout << "Dw src = " <<norm2(src)<<std::endl;
|
||||
std::cout << "Dw tmp = " <<norm2(tmp)<<std::endl;
|
||||
Dw.M(src,tmp);
|
||||
|
||||
Dw.FreePropagator(tmp,ref,mass);
|
||||
|
||||
std::cout << "Dw ref = " <<norm2(ref)<<std::endl;
|
||||
|
||||
ref = ref - src;
|
||||
|
||||
std::cout << "Dw ref-src = " <<norm2(ref)<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Wilson prop
|
||||
////////////////////////////////////////////////////
|
||||
{
|
||||
std::cout<<"****************************************"<<std::endl;
|
||||
std::cout << "Wilson Mom space 4d propagator \n";
|
||||
std::cout<<"****************************************"<<std::endl;
|
||||
|
||||
LatticeFermionD src(&GRID); gaussian(pRNG,src);
|
||||
LatticeFermionD tmp(&GRID);
|
||||
LatticeFermionD ref(&GRID);
|
||||
LatticeFermionD diff(&GRID);
|
||||
|
||||
src=Zero();
|
||||
Coordinate point(4,0); // 0,0,0,0
|
||||
SpinColourVectorD ferm;
|
||||
ferm=Zero();
|
||||
ferm()(0)(0) = ComplexD(1.0);
|
||||
pokeSite(ferm,src,point);
|
||||
|
||||
RealD mass=0.1;
|
||||
|
||||
WilsonFermionD Dw(Umu,GRID,RBGRID,mass);
|
||||
|
||||
// Momentum space prop
|
||||
std::cout << " Solving by FFT and Feynman rules" <<std::endl;
|
||||
Dw.FreePropagator(src,ref,mass) ;
|
||||
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
|
||||
LatticeFermionD result(&GRID);
|
||||
const int sdir=0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Conjugate gradient on normal equations system
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
std::cout << " Solving by Conjugate Gradient (CGNE)" <<std::endl;
|
||||
Dw.Mdag(src,tmp);
|
||||
src=tmp;
|
||||
MdagMLinearOperator<WilsonFermionD,LatticeFermionD> HermOp(Dw);
|
||||
ConjugateGradient<LatticeFermionD> CG(1.0e-10,10000);
|
||||
CG(HermOp,src,result);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
std::cout << " Taking difference" <<std::endl;
|
||||
std::cout << "Dw result "<<norm2(result)<<std::endl;
|
||||
std::cout << "Dw ref "<<norm2(ref)<<std::endl;
|
||||
|
||||
diff = ref - result;
|
||||
std::cout << "result - ref "<<norm2(diff)<<std::endl;
|
||||
|
||||
DumpSliceNorm("Slice Norm Solution ",result,Nd-1);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
//Gauge invariance test
|
||||
////////////////////////////////////////////////////
|
||||
{
|
||||
std::cout<<"****************************************"<<std::endl;
|
||||
std::cout << "Gauge invariance test \n";
|
||||
std::cout<<"****************************************"<<std::endl;
|
||||
LatticeGaugeField U_GT(&GRID); // Gauge transformed field
|
||||
LatticeColourMatrix g(&GRID); // local Gauge xform matrix
|
||||
U_GT = Umu;
|
||||
// Make a random xform to teh gauge field
|
||||
SU<Nc>::RandomGaugeTransform(pRNG,U_GT,g); // Unit gauge
|
||||
|
||||
LatticeFermionD src(&GRID);
|
||||
LatticeFermionD tmp(&GRID);
|
||||
LatticeFermionD ref(&GRID);
|
||||
LatticeFermionD diff(&GRID);
|
||||
|
||||
// could loop over colors
|
||||
src=Zero();
|
||||
Coordinate point(4,0); // 0,0,0,0
|
||||
SpinColourVectorD ferm;
|
||||
ferm=Zero();
|
||||
ferm()(0)(0) = ComplexD(1.0);
|
||||
pokeSite(ferm,src,point);
|
||||
|
||||
RealD mass=0.1;
|
||||
WilsonFermionD Dw(U_GT,GRID,RBGRID,mass);
|
||||
|
||||
// Momentum space prop
|
||||
std::cout << " Solving by FFT and Feynman rules" <<std::endl;
|
||||
Dw.FreePropagator(src,ref,mass) ;
|
||||
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
|
||||
LatticeFermionD result(&GRID);
|
||||
const int sdir=0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Conjugate gradient on normal equations system
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
std::cout << " Solving by Conjugate Gradient (CGNE)" <<std::endl;
|
||||
Dw.Mdag(src,tmp);
|
||||
src=tmp;
|
||||
MdagMLinearOperator<WilsonFermionD,LatticeFermionD> HermOp(Dw);
|
||||
ConjugateGradient<LatticeFermionD> CG(1.0e-10,10000);
|
||||
CG(HermOp,src,result);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
std::cout << " Taking difference" <<std::endl;
|
||||
std::cout << "Dw result "<<norm2(result)<<std::endl;
|
||||
std::cout << "Dw ref "<<norm2(ref)<<std::endl;
|
||||
|
||||
diff = ref - result;
|
||||
std::cout << "result - ref "<<norm2(diff)<<std::endl;
|
||||
|
||||
DumpSliceNorm("Slice Norm Solution ",result,Nd-1);
|
||||
}
|
||||
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@@ -52,7 +52,7 @@ int main (int argc, char ** argv)
|
||||
// pRNG.SeedFixedIntegers(seeds);
|
||||
pRNG.SeedFixedIntegers(std::vector<int>({45,12,81,9}));
|
||||
|
||||
typedef typename GparityWilsonFermionR::FermionField FermionField;
|
||||
typedef typename GparityWilsonFermionD::FermionField FermionField;
|
||||
|
||||
FermionField src (&Grid); random(pRNG,src);
|
||||
FermionField phi (&Grid); random(pRNG,phi);
|
||||
@@ -80,10 +80,10 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
|
||||
GparityWilsonFermionR::ImplParams params;
|
||||
GparityWilsonFermionD::ImplParams params;
|
||||
std::vector<int> twists(Nd,0); twists[1] = 1;
|
||||
params.twists = twists;
|
||||
GparityWilsonFermionR Dw(Umu,Grid,RBGrid,mass,params);
|
||||
GparityWilsonFermionD Dw(Umu,Grid,RBGrid,mass,params);
|
||||
|
||||
FermionField src_e (&RBGrid);
|
||||
FermionField src_o (&RBGrid);
|
||||
@@ -199,7 +199,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<GparityWilsonFermionR,FermionField> HermOpEO(Dw);
|
||||
SchurDiagMooeeOperator<GparityWilsonFermionD,FermionField> HermOpEO(Dw);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
110
tests/core/Test_memory_manager.cc
Normal file
110
tests/core/Test_memory_manager.cc
Normal file
@@ -0,0 +1,110 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_memory_manager.cc
|
||||
|
||||
Copyright (C) 2022
|
||||
|
||||
Author: Peter Boyle <pboyle@bnl.gov>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
void MemoryTest(GridCartesian * FGrid,int N);
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
||||
|
||||
int N=100;
|
||||
for(int i=0;i<N;i++){
|
||||
std::cout << "============================"<<std::endl;
|
||||
std::cout << "Epoch "<<i<<"/"<<N<<std::endl;
|
||||
std::cout << "============================"<<std::endl;
|
||||
MemoryTest(UGrid,256);
|
||||
MemoryManager::Print();
|
||||
AUDIT();
|
||||
}
|
||||
Grid_finalize();
|
||||
}
|
||||
|
||||
void MemoryTest(GridCartesian * FGrid, int N)
|
||||
{
|
||||
LatticeComplexD zero(FGrid); zero=Zero();
|
||||
std::vector<LatticeComplexD> A(N,zero);//FGrid);
|
||||
|
||||
std::vector<ComplexD> B(N,ComplexD(0.0)); // Update sequentially on host
|
||||
|
||||
for(int v=0;v<N;v++) A[v] = Zero();
|
||||
|
||||
uint64_t counter = 0;
|
||||
for(int epoch = 0;epoch<10000;epoch++){
|
||||
|
||||
int v = random() %N; // Which vec
|
||||
int w = random() %2; // Write or read
|
||||
int e = random() %3; // expression or for loop
|
||||
int dev= random() %2; // On device?
|
||||
// int e=1;
|
||||
ComplexD zc = counter++;
|
||||
|
||||
if ( w ) {
|
||||
B[v] = B[v] + zc;
|
||||
if ( e == 0 ) {
|
||||
A[v] = A[v] + zc - A[v] + A[v];
|
||||
} else {
|
||||
if ( dev ) {
|
||||
autoView(A_v,A[v],AcceleratorWrite);
|
||||
accelerator_for(ss,FGrid->oSites(),1,{
|
||||
A_v[ss] = A_v[ss] + zc;
|
||||
});
|
||||
} else {
|
||||
autoView(A_v,A[v],CpuWrite);
|
||||
thread_for(ss,FGrid->oSites(),{
|
||||
A_v[ss] = A_v[ss] + zc;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( e == 0 ) {
|
||||
A[v] = A[v] + A[v] - A[v];
|
||||
} else {
|
||||
if ( dev ) {
|
||||
autoView(A_v,A[v],AcceleratorRead);
|
||||
accelerator_for(ss,FGrid->oSites(),1,{
|
||||
assert(B[v]==A_v[ss]()()().getlane(0));
|
||||
});
|
||||
// std::cout << "["<<v<<"] checked on GPU"<<B[v]<<std::endl;
|
||||
} else {
|
||||
autoView(A_v,A[v],CpuRead);
|
||||
thread_for(ss,FGrid->oSites(),{
|
||||
assert(B[v]==A_v[ss]()()().getlane(0));
|
||||
});
|
||||
// std::cout << "["<<v<<"] checked on CPU"<<B[v]<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -92,7 +92,7 @@ int main (int argc, char ** argv)
|
||||
RealD shift = 0.1234;
|
||||
RealD M5 = 1.8;
|
||||
int pm = 1;
|
||||
MobiusEOFAFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5, b, c);
|
||||
MobiusEOFAFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5, b, c);
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@@ -218,7 +218,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd , phi_o, phi);
|
||||
|
||||
SchurDiagMooeeOperator<MobiusEOFAFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<MobiusEOFAFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
HermOpEO.MpcDagMpc(chi_e, dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o, dchi_o);
|
||||
|
||||
|
@@ -108,8 +108,8 @@ int main (int argc, char ** argv)
|
||||
omegas.push_back( std::complex<double>(0.0686324988446592,-0.0550658530827402) );
|
||||
#endif
|
||||
|
||||
MobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, 0.5,0.5);
|
||||
// DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
MobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, 0.5,0.5);
|
||||
// DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@@ -264,7 +264,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
|
||||
SchurDiagMooeeOperator<MobiusFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<MobiusFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
124
tests/core/Test_prec_change.cc
Normal file
124
tests/core/Test_prec_change.cc
Normal file
@@ -0,0 +1,124 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/core/Test_prec_change.cc
|
||||
|
||||
Copyright (C) 2015
|
||||
|
||||
Author: Christopher Kelly <ckelly@bnl.gov>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
int Ls = 12;
|
||||
Coordinate latt4 = GridDefaultLatt();
|
||||
|
||||
GridCartesian * UGridD = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplexD::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGridD = SpaceTimeGrid::makeFourDimRedBlackGrid(UGridD);
|
||||
GridCartesian * FGridD = SpaceTimeGrid::makeFiveDimGrid(Ls,UGridD);
|
||||
GridRedBlackCartesian * FrbGridD = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGridD);
|
||||
|
||||
GridCartesian * UGridF = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplexF::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGridF = SpaceTimeGrid::makeFourDimRedBlackGrid(UGridF);
|
||||
GridCartesian * FGridF = SpaceTimeGrid::makeFiveDimGrid(Ls,UGridF);
|
||||
GridRedBlackCartesian * FrbGridF = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGridF);
|
||||
|
||||
|
||||
std::vector<int> seeds4({1,2,3,4});
|
||||
std::vector<int> seeds5({5,6,7,8});
|
||||
|
||||
std::cout << GridLogMessage << "Initialising 5d RNG" << std::endl;
|
||||
GridParallelRNG RNG5(FGridD); RNG5.SeedFixedIntegers(seeds5);
|
||||
GridParallelRNG RNG5F(FGridF); RNG5F.SeedFixedIntegers(seeds5);
|
||||
std::cout << GridLogMessage << "Initialised RNGs" << std::endl;
|
||||
|
||||
LatticeFermionD field_d(FGridD), tmp_d(FGridD);
|
||||
random(RNG5,field_d);
|
||||
RealD norm2_field_d = norm2(field_d);
|
||||
|
||||
LatticeFermionD2 field_d2(FGridF), tmp_d2(FGridF);
|
||||
random(RNG5F,field_d2);
|
||||
RealD norm2_field_d2 = norm2(field_d2);
|
||||
|
||||
LatticeFermionF field_f(FGridF);
|
||||
|
||||
//Test original implementation
|
||||
{
|
||||
std::cout << GridLogMessage << "Testing original implementation" << std::endl;
|
||||
field_f = Zero();
|
||||
precisionChangeOrig(field_f,field_d);
|
||||
RealD Ndiff = (norm2_field_d - norm2(field_f))/norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of single and double prec fields differs by " << Ndiff << std::endl;
|
||||
tmp_d = Zero();
|
||||
precisionChangeOrig(tmp_d, field_f);
|
||||
Ndiff = norm2( LatticeFermionD(tmp_d-field_d) ) / norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of back-converted and original double prec fields differs by " << Ndiff << std::endl;
|
||||
}
|
||||
//Test new implementation with pregenerated workspace
|
||||
{
|
||||
std::cout << GridLogMessage << "Testing new implementation with pregenerated workspace" << std::endl;
|
||||
precisionChangeWorkspace wk_sp_to_dp(field_d.Grid(),field_f.Grid());
|
||||
precisionChangeWorkspace wk_dp_to_sp(field_f.Grid(),field_d.Grid());
|
||||
|
||||
field_f = Zero();
|
||||
precisionChange(field_f,field_d,wk_dp_to_sp);
|
||||
RealD Ndiff = (norm2_field_d - norm2(field_f))/norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of single and double prec fields differs by " << Ndiff << std::endl;
|
||||
tmp_d = Zero();
|
||||
precisionChange(tmp_d, field_f,wk_sp_to_dp);
|
||||
Ndiff = norm2( LatticeFermionD(tmp_d-field_d) ) / norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of back-converted and original double prec fields differs by " << Ndiff << std::endl;
|
||||
}
|
||||
//Test new implementation without pregenerated workspace
|
||||
{
|
||||
std::cout << GridLogMessage << "Testing new implementation without pregenerated workspace" << std::endl;
|
||||
field_f = Zero();
|
||||
precisionChange(field_f,field_d);
|
||||
RealD Ndiff = (norm2_field_d - norm2(field_f))/norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of single and double prec fields differs by " << Ndiff << std::endl;
|
||||
tmp_d = Zero();
|
||||
precisionChange(tmp_d, field_f);
|
||||
Ndiff = norm2( LatticeFermionD(tmp_d-field_d) ) / norm2_field_d;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of back-converted and original double prec fields differs by " << Ndiff << std::endl;
|
||||
}
|
||||
//Test fast implementation
|
||||
{
|
||||
std::cout << GridLogMessage << "Testing fast (double2) implementation" << std::endl;
|
||||
field_f = Zero();
|
||||
precisionChangeFast(field_f,field_d2);
|
||||
RealD Ndiff = (norm2_field_d2 - norm2(field_f))/norm2_field_d2;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of single and double prec fields differs by " << Ndiff << std::endl;
|
||||
tmp_d2 = Zero();
|
||||
precisionChangeFast(tmp_d2, field_f);
|
||||
Ndiff = norm2( LatticeFermionD2(tmp_d2-field_d2) ) / norm2_field_d2;
|
||||
std::cout << GridLogMessage << (fabs(Ndiff) > 1e-05 ? "!!FAIL" : "Pass") << ": relative norm2 of back-converted and original double prec fields differs by " << Ndiff << std::endl;
|
||||
}
|
||||
std::cout << "Done" << std::endl;
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@@ -53,9 +53,9 @@ int main (int argc, char ** argv)
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
// pRNG.SeedFixedIntegers(std::vector<int>({45,12,81,9});
|
||||
|
||||
typedef typename ImprovedStaggeredFermionR::FermionField FermionField;
|
||||
typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField;
|
||||
typename ImprovedStaggeredFermionR::ImplParams params;
|
||||
typedef typename ImprovedStaggeredFermionD::FermionField FermionField;
|
||||
typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField;
|
||||
typename ImprovedStaggeredFermionD::ImplParams params;
|
||||
|
||||
FermionField src (&Grid); random(pRNG,src);
|
||||
FermionField result(&Grid); result=Zero();
|
||||
@@ -130,7 +130,7 @@ int main (int argc, char ** argv)
|
||||
// ref = ref + mass * src;
|
||||
}
|
||||
|
||||
ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0,params);
|
||||
ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0,params);
|
||||
|
||||
|
||||
std::cout<<GridLogMessage<<"=========================================================="<<std::endl;
|
||||
@@ -269,7 +269,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<ImprovedStaggeredFermionR,FermionField> HermOpEO(Ds);
|
||||
SchurDiagMooeeOperator<ImprovedStaggeredFermionD,FermionField> HermOpEO(Ds);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -60,9 +60,9 @@ int main (int argc, char ** argv)
|
||||
pRNG4.SeedFixedIntegers(seeds);
|
||||
pRNG5.SeedFixedIntegers(seeds);
|
||||
|
||||
typedef typename ImprovedStaggeredFermion5DR::FermionField FermionField;
|
||||
typedef typename ImprovedStaggeredFermion5DR::ComplexField ComplexField;
|
||||
typename ImprovedStaggeredFermion5DR::ImplParams params;
|
||||
typedef typename ImprovedStaggeredFermion5DD::FermionField FermionField;
|
||||
typedef typename ImprovedStaggeredFermion5DD::ComplexField ComplexField;
|
||||
typename ImprovedStaggeredFermion5DD::ImplParams params;
|
||||
|
||||
FermionField src (FGrid);
|
||||
|
||||
@@ -148,7 +148,7 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
|
||||
ImprovedStaggeredFermion5DR Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0,params);
|
||||
ImprovedStaggeredFermion5DD Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0,params);
|
||||
|
||||
std::cout<<GridLogMessage<<"=========================================================="<<std::endl;
|
||||
std::cout<<GridLogMessage<<"= Testing Dhop against cshift implementation "<<std::endl;
|
||||
@@ -288,7 +288,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<ImprovedStaggeredFermion5DR,FermionField> HermOpEO(Ds);
|
||||
SchurDiagMooeeOperator<ImprovedStaggeredFermion5DD,FermionField> HermOpEO(Ds);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -52,9 +52,9 @@ int main (int argc, char ** argv)
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
// pRNG.SeedFixedIntegers(std::vector<int>({45,12,81,9});
|
||||
|
||||
typedef typename NaiveStaggeredFermionR::FermionField FermionField;
|
||||
typedef typename NaiveStaggeredFermionR::ComplexField ComplexField;
|
||||
typename NaiveStaggeredFermionR::ImplParams params;
|
||||
typedef typename NaiveStaggeredFermionD::FermionField FermionField;
|
||||
typedef typename NaiveStaggeredFermionD::ComplexField ComplexField;
|
||||
typename NaiveStaggeredFermionD::ImplParams params;
|
||||
|
||||
FermionField src (&Grid); random(pRNG,src);
|
||||
FermionField result(&Grid); result=Zero();
|
||||
@@ -120,7 +120,7 @@ int main (int argc, char ** argv)
|
||||
// ref = ref + mass * src;
|
||||
}
|
||||
|
||||
NaiveStaggeredFermionR Ds(Umu,Grid,RBGrid,mass,c1,u0,params);
|
||||
NaiveStaggeredFermionD Ds(Umu,Grid,RBGrid,mass,c1,u0,params);
|
||||
|
||||
|
||||
std::cout<<GridLogMessage<<"=========================================================="<<std::endl;
|
||||
@@ -258,7 +258,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<NaiveStaggeredFermionR,FermionField> HermOpEO(Ds);
|
||||
SchurDiagMooeeOperator<NaiveStaggeredFermionD,FermionField> HermOpEO(Ds);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -52,8 +52,8 @@ int main(int argc, char **argv)
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
// pRNG.SeedFixedIntegers(std::vector<int>({45,12,81,9});
|
||||
|
||||
typedef typename WilsonCloverFermionR::FermionField FermionField;
|
||||
typename WilsonCloverFermionR::ImplParams params;
|
||||
typedef typename WilsonCloverFermionD::FermionField FermionField;
|
||||
typename WilsonCloverFermionD::ImplParams params;
|
||||
WilsonAnisotropyCoefficients anis;
|
||||
|
||||
FermionField src(&Grid);
|
||||
@@ -88,8 +88,8 @@ int main(int argc, char **argv)
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
|
||||
WilsonCloverFermionR Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonCloverFermionR Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
WilsonCloverFermionD Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonCloverFermionD Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
|
||||
std::cout << GridLogMessage << "==========================================================" << std::endl;
|
||||
std::cout << GridLogMessage << "= Testing that Deo + Doe = Dunprec " << std::endl;
|
||||
@@ -324,8 +324,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
/////////////////
|
||||
|
||||
WilsonCloverFermionR Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonCloverFermionR Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
WilsonCloverFermionD Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonCloverFermionD Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
|
||||
tmp = Omega * src;
|
||||
pickCheckerboard(Even, src_e, tmp);
|
||||
@@ -377,14 +377,14 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
|
||||
WilsonFermionR Dw(Umu, Grid, RBGrid, mass, params);
|
||||
WilsonFermionD Dw(Umu, Grid, RBGrid, mass, params);
|
||||
|
||||
Dw.M(src, result);
|
||||
Dwc.M(src, chi);
|
||||
|
||||
Dwc_prime.M(Omega * src, phi);
|
||||
|
||||
WilsonFermionR Dw_prime(U_prime, Grid, RBGrid, mass, params);
|
||||
WilsonFermionD Dw_prime(U_prime, Grid, RBGrid, mass, params);
|
||||
Dw_prime.M(Omega * src, result2);
|
||||
|
||||
err = result - adj(Omega) * result2;
|
||||
@@ -411,7 +411,7 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
err = Zero();
|
||||
WilsonCloverFermionR Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0
|
||||
WilsonCloverFermionD Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0
|
||||
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd, phi_o, phi);
|
||||
@@ -437,7 +437,7 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
err = Zero();
|
||||
CompactWilsonCloverFermionR Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0
|
||||
CompactWilsonCloverFermionD Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0
|
||||
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd, phi_o, phi);
|
||||
|
@@ -74,7 +74,7 @@ int main (int argc, char ** argv)
|
||||
SU<Nc>::HotConfiguration(RNG4,Umu);
|
||||
}
|
||||
|
||||
typename WilsonCloverFermionR::ImplParams params;
|
||||
typename WilsonCloverFermionD::ImplParams params;
|
||||
WilsonAnisotropyCoefficients anis;
|
||||
RealD mass = 0.1;
|
||||
RealD csw_r = 1.0;
|
||||
@@ -83,32 +83,32 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
std::cout<<GridLogMessage <<"WilsonFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
WilsonFermionR Dw(Umu,*UGrid,*UrbGrid,mass,params);
|
||||
TestConserved<WilsonFermionR>(Dw,Umu,UGrid,UrbGrid,&RNG4);
|
||||
WilsonFermionD Dw(Umu,*UGrid,*UrbGrid,mass,params);
|
||||
TestConserved<WilsonFermionD>(Dw,Umu,UGrid,UrbGrid,&RNG4);
|
||||
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
std::cout<<GridLogMessage <<"WilsonCloverFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
WilsonCloverFermionR Dwc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params);
|
||||
TestConserved<WilsonCloverFermionR>(Dwc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
WilsonCloverFermionD Dwc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params);
|
||||
TestConserved<WilsonCloverFermionD>(Dwc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
std::cout<<GridLogMessage <<"CompactWilsonCloverFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
CompactWilsonCloverFermionR Dwcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
TestConserved<CompactWilsonCloverFermionR>(Dwcc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
CompactWilsonCloverFermionD Dwcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
TestConserved<CompactWilsonCloverFermionD>(Dwcc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
std::cout<<GridLogMessage <<"WilsonExpCloverFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
WilsonExpCloverFermionR Dewc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params);
|
||||
TestConserved<WilsonExpCloverFermionR>(Dewc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
WilsonExpCloverFermionD Dewc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params);
|
||||
TestConserved<WilsonExpCloverFermionD>(Dewc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
std::cout<<GridLogMessage <<"CompactWilsonExpCloverFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"=================================="<<std::endl;
|
||||
CompactWilsonExpCloverFermionR Dewcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
TestConserved<CompactWilsonExpCloverFermionR>(Dewcc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
CompactWilsonExpCloverFermionD Dewcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
TestConserved<CompactWilsonExpCloverFermionD>(Dewcc,Umu,UGrid,UrbGrid,&RNG4);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
|
||||
WilsonFermionR Dw(Umu,Grid,RBGrid,mass);
|
||||
WilsonFermionD Dw(Umu,Grid,RBGrid,mass);
|
||||
|
||||
LatticeFermion src_e (&RBGrid);
|
||||
LatticeFermion src_o (&RBGrid);
|
||||
@@ -205,7 +205,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<WilsonFermionR,LatticeFermion> HermOpEO(Dw);
|
||||
SchurDiagMooeeOperator<WilsonFermionD,LatticeFermion> HermOpEO(Dw);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -52,8 +52,8 @@ int main(int argc, char **argv)
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
// pRNG.SeedFixedIntegers(std::vector<int>({45,12,81,9});
|
||||
|
||||
typedef typename WilsonExpCloverFermionR::FermionField FermionField;
|
||||
typename WilsonExpCloverFermionR::ImplParams params;
|
||||
typedef typename WilsonExpCloverFermionD::FermionField FermionField;
|
||||
typename WilsonExpCloverFermionD::ImplParams params;
|
||||
WilsonAnisotropyCoefficients anis;
|
||||
|
||||
FermionField src(&Grid);
|
||||
@@ -88,8 +88,8 @@ int main(int argc, char **argv)
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
|
||||
WilsonExpCloverFermionR Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonExpCloverFermionR Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
WilsonExpCloverFermionD Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonExpCloverFermionD Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
|
||||
std::cout << GridLogMessage << "==========================================================" << std::endl;
|
||||
std::cout << GridLogMessage << "= Testing that Deo + Doe = Dunprec " << std::endl;
|
||||
@@ -324,8 +324,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
/////////////////
|
||||
|
||||
WilsonExpCloverFermionR Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonExpCloverFermionR Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
WilsonExpCloverFermionD Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params);
|
||||
CompactWilsonExpCloverFermionD Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params);
|
||||
|
||||
tmp = Omega * src;
|
||||
pickCheckerboard(Even, src_e, tmp);
|
||||
@@ -377,14 +377,14 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
|
||||
WilsonFermionR Dw(Umu, Grid, RBGrid, mass, params);
|
||||
WilsonFermionD Dw(Umu, Grid, RBGrid, mass, params);
|
||||
|
||||
Dw.M(src, result);
|
||||
Dwc.M(src, chi);
|
||||
|
||||
Dwc_prime.M(Omega * src, phi);
|
||||
|
||||
WilsonFermionR Dw_prime(U_prime, Grid, RBGrid, mass, params);
|
||||
WilsonFermionD Dw_prime(U_prime, Grid, RBGrid, mass, params);
|
||||
Dw_prime.M(Omega * src, result2);
|
||||
|
||||
err = result - adj(Omega) * result2;
|
||||
@@ -411,7 +411,7 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
err = Zero();
|
||||
WilsonExpCloverFermionR Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0
|
||||
WilsonExpCloverFermionD Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0
|
||||
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd, phi_o, phi);
|
||||
@@ -437,7 +437,7 @@ int main(int argc, char **argv)
|
||||
chi = Zero();
|
||||
phi = Zero();
|
||||
err = Zero();
|
||||
CompactWilsonExpCloverFermionR Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0
|
||||
CompactWilsonExpCloverFermionD Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0
|
||||
|
||||
pickCheckerboard(Even, phi_e, phi);
|
||||
pickCheckerboard(Odd, phi_o, phi);
|
||||
|
@@ -90,7 +90,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD mu = 0.1;
|
||||
WilsonTMFermionR Dw(Umu,Grid,RBGrid,mass,mu);
|
||||
WilsonTMFermionD Dw(Umu,Grid,RBGrid,mass,mu);
|
||||
|
||||
LatticeFermion src_e (&RBGrid);
|
||||
LatticeFermion src_o (&RBGrid);
|
||||
@@ -206,7 +206,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Even,phi_e,phi);
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
SchurDiagMooeeOperator<WilsonTMFermionR,LatticeFermion> HermOpEO(Dw);
|
||||
SchurDiagMooeeOperator<WilsonTMFermionD,LatticeFermion> HermOpEO(Dw);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -123,7 +123,7 @@ int main (int argc, char ** argv)
|
||||
RealD _mass,RealD _M5,
|
||||
std::vector<ComplexD> &gamma, RealD b,RealD c,const ImplParams &p= ImplParams()) :
|
||||
*/
|
||||
ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,RealD(1.),RealD(0.));
|
||||
ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,RealD(1.),RealD(0.));
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@@ -278,7 +278,7 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Odd ,phi_o,phi);
|
||||
|
||||
|
||||
SchurDiagMooeeOperator<ZMobiusFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<ZMobiusFermionD,LatticeFermion> HermOpEO(Ddwf);
|
||||
HermOpEO.MpcDagMpc(chi_e,dchi_e);
|
||||
HermOpEO.MpcDagMpc(chi_o,dchi_o);
|
||||
|
||||
|
@@ -125,10 +125,10 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"DomainWallFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionF DdwfF(UmuF,*FGridF,*FrbGridF,*UGridF,*UrbGridF,mass,M5);
|
||||
TestCGinversions<DomainWallFermionR>(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<DomainWallFermionR,DomainWallFermionF>(Ddwf,DdwfF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestCGinversions<DomainWallFermionD>(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<DomainWallFermionD,DomainWallFermionF>(Ddwf,DdwfF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
RealD b=1.5;// Scale factor b+c=2, b-c=1
|
||||
RealD c=0.5;
|
||||
@@ -137,54 +137,54 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
MobiusFermionR Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
MobiusFermionF DmobF(UmuF,*FGridF,*FrbGridF,*UGridF,*UrbGridF,mass,M5,b,c);
|
||||
TestCGinversions<MobiusFermionR>(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<MobiusFermionR,MobiusFermionF>(Dmob,DmobF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestCGinversions<MobiusFermionD>(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<MobiusFermionD,MobiusFermionF>(Dmob,DmobF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ZMobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
ZMobiusFermionR ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestCGinversions<ZMobiusFermionR>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<ZMobiusFermionR>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestCGinversions<ZMobiusFermionD>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<ZMobiusFermionD>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
MobiusZolotarevFermionR Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
TestCGinversions<MobiusZolotarevFermionR>(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<MobiusZolotarevFermionR>(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
MobiusZolotarevFermionD Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
TestCGinversions<MobiusZolotarevFermionD>(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<MobiusZolotarevFermionD>(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ScaledShamirFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
ScaledShamirFermionR Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
ScaledShamirFermionF DshamF(UmuF,*FGridF,*FrbGridF,*UGridF,*UrbGridF,mass,M5,2.0);
|
||||
TestCGinversions<ScaledShamirFermionR>(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<ScaledShamirFermionR,ScaledShamirFermionF>(Dsham,DshamF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestCGinversions<ScaledShamirFermionD>(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<ScaledShamirFermionD,ScaledShamirFermionF>(Dsham,DshamF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
ShamirZolotarevFermionR Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<ShamirZolotarevFermionR>(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<ShamirZolotarevFermionR>(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ShamirZolotarevFermionD Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<ShamirZolotarevFermionD>(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<ShamirZolotarevFermionD>(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermionR Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonCayleyTanhFermionD Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonCayleyTanhFermionF DovF(UmuF,*FGridF,*FrbGridF,*UGridF,*UrbGridF,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonCayleyTanhFermionR>(Dov,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<OverlapWilsonCayleyTanhFermionR,OverlapWilsonCayleyTanhFermionF>(Dov,DovF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestCGinversions<OverlapWilsonCayleyTanhFermionD>(Dov,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5DFA<OverlapWilsonCayleyTanhFermionD,OverlapWilsonCayleyTanhFermionF>(Dov,DovF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
OverlapWilsonCayleyZolotarevFermionR Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<OverlapWilsonCayleyZolotarevFermionR>(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<OverlapWilsonCayleyZolotarevFermionR>(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonCayleyZolotarevFermionD Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<OverlapWilsonCayleyZolotarevFermionD>(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestReconstruct5D<OverlapWilsonCayleyZolotarevFermionD>(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@@ -95,8 +95,8 @@ int main (int argc, char ** argv)
|
||||
RealD mass=0.5;
|
||||
RealD M5=1.8;
|
||||
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> HermIndefOp(Ddwf);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionD,LatticeFermion> HermIndefOp(Ddwf);
|
||||
|
||||
HermIndefOp.Op(src,ref);
|
||||
HermIndefOp.OpDiag(src,result);
|
||||
@@ -118,7 +118,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
std::cout<<GridLogMessage<<"Calling Aggregation class" <<std::endl;
|
||||
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermDefOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermDefOp(Ddwf);
|
||||
typedef Aggregation<vSpinColourVector,vTComplex,nbasis> Subspace;
|
||||
|
||||
Subspace Aggregates(Coarse5d,FGrid,cb);
|
||||
|
@@ -76,41 +76,41 @@ int main (int argc, char ** argv)
|
||||
RealD mass=0.1;
|
||||
RealD M5 =1.8;
|
||||
std::cout<<GridLogMessage <<"DomainWallFermion test"<<std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestWhat<DomainWallFermionR>(Ddwf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestWhat<DomainWallFermionD>(Ddwf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
RealD b=1.5;// Scale factor b+c=2, b-c=1
|
||||
RealD c=0.5;
|
||||
std::vector<ComplexD> gamma(Ls,ComplexD(1.0,0.1));
|
||||
|
||||
std::cout<<GridLogMessage <<"MobiusFermion test"<<std::endl;
|
||||
MobiusFermionR Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermionR>(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermionD>(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"ZMobiusFermion test"<<std::endl;
|
||||
ZMobiusFermionR ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestWhat<ZMobiusFermionR>(ZDmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
TestWhat<ZMobiusFermionD>(ZDmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"MobiusZolotarevFermion test"<<std::endl;
|
||||
MobiusZolotarevFermionR Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
TestWhat<MobiusZolotarevFermionR>(Dzolo,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
MobiusZolotarevFermionD Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
TestWhat<MobiusZolotarevFermionD>(Dzolo,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"ScaledShamirFermion test"<<std::endl;
|
||||
ScaledShamirFermionR Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestWhat<ScaledShamirFermionR>(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestWhat<ScaledShamirFermionD>(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
|
||||
std::cout<<GridLogMessage <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
ShamirZolotarevFermionR Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<ShamirZolotarevFermionR>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ShamirZolotarevFermionD Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<ShamirZolotarevFermionD>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermionR Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonCayleyTanhFermionR>(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonCayleyTanhFermionD Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonCayleyTanhFermionD>(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyZolotarevFermionR Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermionR>(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonCayleyZolotarevFermionD Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermionD>(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@@ -83,8 +83,8 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Building g5R5 hermitian DWF operator" <<std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> HermIndefOp(Ddwf);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionD,LatticeFermion> HermIndefOp(Ddwf);
|
||||
|
||||
const int nbasis = 8;
|
||||
|
||||
@@ -95,7 +95,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Calling Aggregation class to build subspace" <<std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermDefOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermDefOp(Ddwf);
|
||||
Subspace Aggregates(Coarse5d,FGrid,cb);
|
||||
Aggregates.CreateSubspace(RNG5,HermDefOp);
|
||||
|
||||
|
@@ -128,8 +128,8 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"DomainWallFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestConserved<DomainWallFermionR>(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestConserved<DomainWallFermionD>(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
RealD b=1.5;// Scale factor b+c=2, b-c=1
|
||||
RealD c=0.5;
|
||||
@@ -138,23 +138,23 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
MobiusFermionR Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestConserved<MobiusFermionR>(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestConserved<MobiusFermionD>(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ScaledShamirFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
ScaledShamirFermionR Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestConserved<ScaledShamirFermionR>(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestConserved<ScaledShamirFermionD>(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ZMobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"======================"<<std::endl;
|
||||
for(int s=0;s<Ls;s++) omegasrev[s]=conjugate(omegas[Ls-1-s]);
|
||||
// for(int s=0;s<Ls;s++) omegasrev[s]=omegas[Ls-1-s];
|
||||
ZMobiusFermionR ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegas,b,c);
|
||||
ZMobiusFermionR ZDmobrev(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegasrev,b,c);
|
||||
TestConserved<ZMobiusFermionR>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5,&ZDmobrev);
|
||||
ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegas,b,c);
|
||||
ZMobiusFermionD ZDmobrev(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegasrev,b,c);
|
||||
TestConserved<ZMobiusFermionD>(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5,&ZDmobrev);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
@@ -290,7 +290,7 @@ void TestConserved(Action & Ddwf,
|
||||
const RealD DmuPAmu{real(TensorRemove(sumPA[t]-sumPA[(t-1+Nt)%Nt]))};
|
||||
std::cout<<GridLogMessage<<" t "<<t<<" DmuPAmu "<<DmuPAmu
|
||||
<<" PP "<<real(TensorRemove(sumPP[t]))<<" PJ5q "<<real(TensorRemove(sumPJ5q[t]))
|
||||
<<" Ward Identity defect " <<(DmuPAmu - 2.*real(TensorRemove(Ddwf.mass*sumPP[t] + sumPJ5q[t])))<<std::endl;
|
||||
<<" Ward Identity defect " <<(DmuPAmu - 2.*real(TensorRemove(Ddwf.Mass()*sumPP[t] + sumPJ5q[t])))<<std::endl;
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
@@ -539,7 +539,7 @@ void TestConserved1(Action & Ddwf, Action & Ddwfrev,
|
||||
PA = trace(g5*Axial_mu);
|
||||
PP = trace(adj(prop4)*prop4);
|
||||
|
||||
Defect = Defect - 2.0*Ddwf.mass* PP;
|
||||
Defect = Defect - 2.0*Ddwf.Mass()* PP;
|
||||
Defect = Defect - 2.0*PJ5q;
|
||||
|
||||
std::vector<TComplex> sumPAref;
|
||||
@@ -565,8 +565,8 @@ void TestConserved1(Action & Ddwf, Action & Ddwfrev,
|
||||
std::cout <<" PAc action "<<real(TensorRemove(sumPA[t]));
|
||||
std::cout <<" PJ5q ref "<<real(TensorRemove(sumPJ5qref[t]));
|
||||
std::cout <<" PJ5q action "<<real(TensorRemove(sumPJ5q[t]));
|
||||
std::cout <<"WTI defects "<<real(TensorRemove(sumPAref[t]-sumPAref[(t-1+Nt)%Nt] - 2.0*(Ddwf.mass*sumPP[t] + sumPJ5q[t]) ))<<",";
|
||||
std::cout <<real(TensorRemove(sumPA[t]-sumPA[(t-1+Nt)%Nt] - 2.0*(Ddwf.mass*sumPP[t] + sumPJ5q[t]) ))<<"\n";
|
||||
std::cout <<"WTI defects "<<real(TensorRemove(sumPAref[t]-sumPAref[(t-1+Nt)%Nt] - 2.0*(Ddwf.Mass()*sumPP[t] + sumPJ5q[t]) ))<<",";
|
||||
std::cout <<real(TensorRemove(sumPA[t]-sumPA[(t-1+Nt)%Nt] - 2.0*(Ddwf.Mass()*sumPP[t] + sumPJ5q[t]) ))<<"\n";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -600,7 +600,7 @@ void TestConserved1(Action & Ddwf, Action & Ddwfrev,
|
||||
// Dperp
|
||||
{
|
||||
RealD diag = 5.0 - Ddwf.M5;
|
||||
mass = Ddwf.mass;
|
||||
mass = Ddwf.Mass();
|
||||
autoView( psi,result5,CpuRead);
|
||||
autoView( chi,tmp, CpuWrite);
|
||||
thread_for(sss,UGrid->oSites(),{
|
||||
|
@@ -77,8 +77,8 @@ int main(int argc, char** argv)
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
DomainWallEOFAFermionR Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5);
|
||||
DomainWallEOFAFermionR Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5);
|
||||
DomainWallEOFAFermionD Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5);
|
||||
DomainWallEOFAFermionD Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5);
|
||||
|
||||
// Construct the action and test the heatbath (zero initial guess)
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@ using namespace Grid;
|
||||
;
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityDomainWallEOFAFermionR FermionAction;
|
||||
typedef GparityDomainWallEOFAFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
// Parameters for test
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char** argv)
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
// GparityDomainWallFermionR::ImplParams params;
|
||||
// GparityDomainWallFermionD::ImplParams params;
|
||||
FermionAction::ImplParams params;
|
||||
FermionAction Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, params);
|
||||
FermionAction Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, params);
|
||||
|
@@ -79,8 +79,8 @@ int main(int argc, char** argv)
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
MobiusEOFAFermionR Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionR Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, b, c);
|
||||
MobiusEOFAFermionD Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionD Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, b, c);
|
||||
|
||||
// Construct the action and test the heatbath (zero initial guess)
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@ using namespace Grid;
|
||||
;
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityMobiusEOFAFermionR FermionAction;
|
||||
typedef GparityMobiusEOFAFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
// Parameters for test
|
||||
|
@@ -105,10 +105,10 @@ int main(int argc, char **argv)
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
// Initialize RHMC fermion operators
|
||||
DomainWallFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5);
|
||||
DomainWallFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5);
|
||||
SchurDiagMooeeOperator<DomainWallFermionR, LatticeFermion> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<DomainWallFermionR, LatticeFermion> VdagV(Ddwf_b);
|
||||
DomainWallFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5);
|
||||
DomainWallFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5);
|
||||
SchurDiagMooeeOperator<DomainWallFermionD, LatticeFermion> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<DomainWallFermionD, LatticeFermion> VdagV(Ddwf_b);
|
||||
|
||||
// Degree 12 rational approximations to x^(1/4) and x^(-1/4)
|
||||
double lo = 0.0001;
|
||||
@@ -153,10 +153,10 @@ int main(int argc, char **argv)
|
||||
RealD shift_L = 0.0;
|
||||
RealD shift_R = -1.0;
|
||||
int pm = 1;
|
||||
DomainWallEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5);
|
||||
DomainWallEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5);
|
||||
MdagMLinearOperator<DomainWallEOFAFermionR, LatticeFermion> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<DomainWallEOFAFermionR, LatticeFermion> RdagR(Deofa_R);
|
||||
DomainWallEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5);
|
||||
DomainWallEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5);
|
||||
MdagMLinearOperator<DomainWallEOFAFermionD, LatticeFermion> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<DomainWallEOFAFermionD, LatticeFermion> RdagR(Deofa_R);
|
||||
|
||||
// Stochastically estimate reweighting factor via EOFA
|
||||
RealD k = Deofa_L.k;
|
||||
|
@@ -33,7 +33,7 @@ using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
typedef typename GparityDomainWallFermionR::FermionField FermionField;
|
||||
typedef typename GparityDomainWallFermionD::FermionField FermionField;
|
||||
|
||||
// parameters for test
|
||||
const std::vector<int> grid_dim = { 8, 8, 8, 8 };
|
||||
@@ -107,11 +107,11 @@ int main(int argc, char **argv)
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
// Initialize RHMC fermion operators
|
||||
GparityDomainWallFermionR::ImplParams params;
|
||||
GparityDomainWallFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, params);
|
||||
GparityDomainWallFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, params);
|
||||
SchurDiagMooeeOperator<GparityDomainWallFermionR, FermionField> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<GparityDomainWallFermionR, FermionField> VdagV(Ddwf_b);
|
||||
GparityDomainWallFermionD::ImplParams params;
|
||||
GparityDomainWallFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, params);
|
||||
GparityDomainWallFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, params);
|
||||
SchurDiagMooeeOperator<GparityDomainWallFermionD, FermionField> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<GparityDomainWallFermionD, FermionField> VdagV(Ddwf_b);
|
||||
|
||||
// Degree 12 rational approximations to x^(1/4) and x^(-1/4)
|
||||
double lo = 0.0001;
|
||||
@@ -156,10 +156,10 @@ int main(int argc, char **argv)
|
||||
RealD shift_L = 0.0;
|
||||
RealD shift_R = -1.0;
|
||||
int pm = 1;
|
||||
GparityDomainWallEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, params);
|
||||
GparityDomainWallEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, params);
|
||||
MdagMLinearOperator<GparityDomainWallEOFAFermionR, FermionField> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<GparityDomainWallEOFAFermionR, FermionField> RdagR(Deofa_R);
|
||||
GparityDomainWallEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, params);
|
||||
GparityDomainWallEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, params);
|
||||
MdagMLinearOperator<GparityDomainWallEOFAFermionD, FermionField> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<GparityDomainWallEOFAFermionD, FermionField> RdagR(Deofa_R);
|
||||
|
||||
// Stochastically estimate reweighting factor via EOFA
|
||||
RealD k = Deofa_L.k;
|
||||
|
@@ -107,10 +107,10 @@ int main(int argc, char **argv)
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
// Initialize RHMC fermion operators
|
||||
MobiusFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c);
|
||||
MobiusFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c);
|
||||
SchurDiagMooeeOperator<MobiusFermionR, LatticeFermion> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<MobiusFermionR, LatticeFermion> VdagV(Ddwf_b);
|
||||
MobiusFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c);
|
||||
MobiusFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c);
|
||||
SchurDiagMooeeOperator<MobiusFermionD, LatticeFermion> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<MobiusFermionD, LatticeFermion> VdagV(Ddwf_b);
|
||||
|
||||
// Degree 12 rational approximations to x^(1/4) and x^(-1/4)
|
||||
double lo = 0.0001;
|
||||
@@ -155,10 +155,10 @@ int main(int argc, char **argv)
|
||||
RealD shift_L = 0.0;
|
||||
RealD shift_R = -1.0;
|
||||
int pm = 1;
|
||||
MobiusEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c);
|
||||
MobiusEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c);
|
||||
MdagMLinearOperator<MobiusEOFAFermionR, LatticeFermion> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<MobiusEOFAFermionR, LatticeFermion> RdagR(Deofa_R);
|
||||
MobiusEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c);
|
||||
MobiusEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c);
|
||||
MdagMLinearOperator<MobiusEOFAFermionD, LatticeFermion> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<MobiusEOFAFermionD, LatticeFermion> RdagR(Deofa_R);
|
||||
|
||||
// Stochastically estimate reweighting factor via EOFA
|
||||
RealD k = Deofa_L.k;
|
||||
|
@@ -33,7 +33,7 @@ using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
typedef typename GparityDomainWallFermionR::FermionField FermionField;
|
||||
typedef typename GparityDomainWallFermionD::FermionField FermionField;
|
||||
|
||||
// parameters for test
|
||||
const std::vector<int> grid_dim = { 8, 8, 8, 8 };
|
||||
@@ -109,11 +109,11 @@ int main(int argc, char **argv)
|
||||
SU<Nc>::HotConfiguration(RNG4, Umu);
|
||||
|
||||
// Initialize RHMC fermion operators
|
||||
GparityDomainWallFermionR::ImplParams params;
|
||||
GparityMobiusFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c, params);
|
||||
GparityMobiusFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c, params);
|
||||
SchurDiagMooeeOperator<GparityMobiusFermionR, FermionField> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<GparityMobiusFermionR, FermionField> VdagV(Ddwf_b);
|
||||
GparityDomainWallFermionD::ImplParams params;
|
||||
GparityMobiusFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c, params);
|
||||
GparityMobiusFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c, params);
|
||||
SchurDiagMooeeOperator<GparityMobiusFermionD, FermionField> MdagM(Ddwf_f);
|
||||
SchurDiagMooeeOperator<GparityMobiusFermionD, FermionField> VdagV(Ddwf_b);
|
||||
|
||||
// Degree 12 rational approximations to x^(1/4) and x^(-1/4)
|
||||
double lo = 0.0001;
|
||||
@@ -158,10 +158,10 @@ int main(int argc, char **argv)
|
||||
RealD shift_L = 0.0;
|
||||
RealD shift_R = -1.0;
|
||||
int pm = 1;
|
||||
GparityMobiusEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c, params);
|
||||
GparityMobiusEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c, params);
|
||||
MdagMLinearOperator<GparityMobiusEOFAFermionR, FermionField> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<GparityMobiusEOFAFermionR, FermionField> RdagR(Deofa_R);
|
||||
GparityMobiusEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c, params);
|
||||
GparityMobiusEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c, params);
|
||||
MdagMLinearOperator<GparityMobiusEOFAFermionD, FermionField> LdagL(Deofa_L);
|
||||
MdagMLinearOperator<GparityMobiusEOFAFermionD, FermionField> RdagR(Deofa_R);
|
||||
|
||||
// Stochastically estimate reweighting factor via EOFA
|
||||
RealD k = Deofa_L.k;
|
||||
|
305
tests/forces/Test_bdy.cc
Normal file
305
tests/forces/Test_bdy.cc
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
|
||||
2f Full det MdagM 10^6 force ~ 1.3e7
|
||||
rid : Message : 1767.283471 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 1767.283476 s : S1 : 1.52885e+09
|
||||
Grid : Message : 1767.283480 s : S2 : 1.52886e+09
|
||||
Grid : Message : 1767.283482 s : dS : 8877.34
|
||||
Grid : Message : 1767.283483 s : dSpred : 8877.7
|
||||
Grid : Message : 1767.283484 s : diff : -0.360484
|
||||
Grid : Message : 1767.283485 s : *********************************************************
|
||||
|
||||
2f Full det MpcdagMpc 10^6 force ~ 1.8e6
|
||||
Grid : Message : 2399.576962 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 2399.576968 s : S1 : 1.52885e+09
|
||||
Grid : Message : 2399.576972 s : S2 : 1.52886e+09
|
||||
Grid : Message : 2399.576974 s : dS : 9728.49
|
||||
Grid : Message : 2399.576975 s : dSpred : 9726.58
|
||||
Grid : Message : 2399.576976 s : diff : 1.90683
|
||||
Grid : Message : 2399.576977 s : *********************************************************
|
||||
|
||||
2f bdy MdagM 1500 force Force ~ 2800
|
||||
Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 4622.385067 s : S1 : 1.52885e+09
|
||||
Grid : Message : 4622.385071 s : S2 : 1.52885e+09
|
||||
Grid : Message : 4622.385072 s : dS : 25.4944
|
||||
Grid : Message : 4622.385073 s : dSpred : 25.4672
|
||||
Grid : Message : 4622.385074 s : diff : 0.0271414
|
||||
Grid : Message : 4622.385075 s : *********************************************************
|
||||
|
||||
2f bdy MpcdagMpc 10^6 force Force ~ 2200
|
||||
Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 4622.385067 s : S1 : 1.52885e+09
|
||||
Grid : Message : 4622.385071 s : S2 : 1.52885e+09
|
||||
Grid : Message : 4622.385072 s : dS : 25.4944
|
||||
Grid : Message : 4622.385073 s : dSpred : 25.4672
|
||||
Grid : Message : 4622.385074 s : diff : 0.0271414
|
||||
Grid : Message : 4622.385075 s : *********************************************************
|
||||
|
||||
1f Bdy Det
|
||||
Optimisation log: looser rational AND MD tolerances sloppy
|
||||
MobiusForce.221179 -- same as HMC. dS is mispredicted Forece ~2.8
|
||||
Grid : Message : 6582.258991 s : dS : 0.024478
|
||||
Grid : Message : 6582.258992 s : dSpred : 0.00791876
|
||||
Grid : Message : 6582.258994 s : diff : 0.0165592
|
||||
|
||||
MobiusForce.221193 -- tight rational AND MD tolerances to 1e-8 ~ 2.8 same
|
||||
Grid : Message : 1964.939209 s : S1 : 7.64404e+08
|
||||
Grid : Message : 1964.939213 s : S2 : 7.64404e+08
|
||||
Grid : Message : 1964.939215 s : dS : -0.00775838 <--- too loose even on action
|
||||
Grid : Message : 1964.939216 s : dSpred : -0.00416793
|
||||
Grid : Message : 1964.939217 s : diff : -0.00359045
|
||||
|
||||
MobiusForce.221394 -- looser rational, MD tol 1e-8 ~ 2.8 same
|
||||
Grid : Message : 1198.346720 s : S1 : 764404649.48886
|
||||
Grid : Message : 1198.346760 s : S2 : 764404649.5133
|
||||
Grid : Message : 1198.346780 s : dS : 0.024440884590149
|
||||
Grid : Message : 1198.346800 s : dSpred : 0.0079145154465184
|
||||
Grid : Message : 1198.346810 s : diff : 0.016526369143631
|
||||
|
||||
MobiusForce.221394 -- tight rational, MD tol sloppy Force ~ 2.8
|
||||
Grid : Message : 2376.921950 s : S1 : 764404436.44069
|
||||
Grid : Message : 2376.921954 s : S2 : 764404436.43299
|
||||
Grid : Message : 2376.921956 s : dS : -0.0076971054077148
|
||||
Grid : Message : 2376.921958 s : dSpred : -0.0041610472282526
|
||||
Grid : Message : 2376.921959 s : diff : -0.0035360581794623
|
||||
|
||||
*/
|
||||
|
||||
//
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_double_ratio.cc
|
||||
|
||||
Copyright (C) 2022
|
||||
|
||||
Author: Peter Boyle <pboyle@bnl.gov>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
typedef MobiusFermionD FermionAction;
|
||||
typedef WilsonImplD FimplD;
|
||||
typedef WilsonImplD FermionImplPolicy;
|
||||
|
||||
template<class Gimpl>
|
||||
void ForceTest(Action<LatticeGaugeField> &action,LatticeGaugeField & U,MomentumFilterBase<LatticeGaugeField> &Filter)
|
||||
{
|
||||
GridBase *UGrid = U.Grid();
|
||||
|
||||
std::vector<int> seeds({1,2,3,5});
|
||||
GridSerialRNG sRNG; sRNG.SeedFixedIntegers(seeds);
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds);
|
||||
|
||||
LatticeColourMatrix Pmu(UGrid);
|
||||
LatticeGaugeField P(UGrid);
|
||||
LatticeGaugeField UdSdU(UGrid);
|
||||
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
std::cout << GridLogMessage << " Force test for "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
|
||||
RealD eps=0.005;
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Refresh "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
Gimpl::generate_momenta(P,sRNG,RNG4);
|
||||
Filter.applyFilter(P);
|
||||
|
||||
#if 0
|
||||
FieldMetaData header;
|
||||
std::string file("./ckpoint_lat.2000");
|
||||
NerscIO::readConfiguration(U,header,file);
|
||||
#else
|
||||
U = 1.0;
|
||||
#endif
|
||||
action.refresh(U,sRNG,RNG4);
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Action "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
RealD S1 = action.S(U);
|
||||
|
||||
Gimpl::update_field(P,U,eps);
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Derivative "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
action.deriv(U,UdSdU);
|
||||
UdSdU = Ta(UdSdU);
|
||||
Filter.applyFilter(UdSdU);
|
||||
|
||||
DumpSliceNorm("Force",UdSdU,Nd-1);
|
||||
|
||||
Gimpl::update_field(P,U,eps);
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Action "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
RealD S2 = action.S(U);
|
||||
|
||||
// Use the derivative
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
auto UdSdUmu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
Pmu= PeekIndex<LorentzIndex>(P,mu);
|
||||
dS = dS - trace(Pmu*UdSdUmu)*eps*2.0*2.0;
|
||||
}
|
||||
ComplexD dSpred = sum(dS);
|
||||
RealD diff = S2-S1-dSpred.real();
|
||||
|
||||
std::cout<< GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout<< GridLogMessage << "S1 : "<< S1 <<std::endl;
|
||||
std::cout<< GridLogMessage << "S2 : "<< S2 <<std::endl;
|
||||
std::cout<< GridLogMessage << "dS : "<< S2-S1 <<std::endl;
|
||||
std::cout<< GridLogMessage << "dSpred : "<< dSpred.real() <<std::endl;
|
||||
std::cout<< GridLogMessage << "diff : "<< diff<<std::endl;
|
||||
std::cout<< GridLogMessage << "*********************************************************"<<std::endl;
|
||||
// assert(diff<1.0);
|
||||
std::cout<< GridLogMessage << "Done" <<std::endl;
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
}
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::cout << std::setprecision(14);
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate shm;
|
||||
GlobalSharedMemory::GetShmDims(mpi_layout,shm);
|
||||
|
||||
const int Ls=12;
|
||||
const int Nt = latt_size[3];
|
||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Domain decomposed operator
|
||||
////////////////////////////////////////////////////////////////
|
||||
Coordinate CommDim(Nd);
|
||||
for(int d=0;d<Nd;d++) CommDim[d]= (mpi_layout[d]/shm[d])>1 ? 1 : 0;
|
||||
|
||||
Coordinate NonDirichlet(Nd+1,0);
|
||||
Coordinate Dirichlet(Nd+1,0);
|
||||
Dirichlet[1] = CommDim[0]*latt_size[0]/mpi_layout[0] * shm[0];
|
||||
Dirichlet[2] = CommDim[1]*latt_size[1]/mpi_layout[1] * shm[1];
|
||||
Dirichlet[3] = CommDim[2]*latt_size[2]/mpi_layout[2] * shm[2];
|
||||
Dirichlet[4] = CommDim[3]*latt_size[3]/mpi_layout[3] * shm[3];
|
||||
|
||||
Coordinate Block4(Nd);
|
||||
Block4[0] = Dirichlet[1];
|
||||
Block4[1] = Dirichlet[2];
|
||||
Block4[2] = Dirichlet[3];
|
||||
Block4[3] = Dirichlet[4];
|
||||
|
||||
std::vector<Complex> boundary = {1,1,1,-1};
|
||||
FermionAction::ImplParams Params(boundary);
|
||||
FermionAction::ImplParams ParamsDir(boundary);
|
||||
Params.dirichlet=NonDirichlet;
|
||||
ParamsDir.dirichlet=Dirichlet;
|
||||
ParamsDir.partialDirichlet=1;
|
||||
|
||||
///////////////////// Gauge Field and Gauge Forces ////////////////////////////
|
||||
LatticeGaugeField U(UGrid);
|
||||
|
||||
RealD beta=6.0;
|
||||
WilsonGaugeActionR PlaqAction(beta);
|
||||
IwasakiGaugeActionR RectAction(beta);
|
||||
|
||||
MomentumFilterNone<LatticeGaugeField> FilterNone;
|
||||
ForceTest<GimplTypesR>(PlaqAction,U,FilterNone);
|
||||
ForceTest<GimplTypesR>(RectAction,U,FilterNone);
|
||||
|
||||
////////////////////////////////////
|
||||
// Action
|
||||
////////////////////////////////////
|
||||
RealD mass=0.00078;
|
||||
RealD pvmass=1.0;
|
||||
RealD M5=1.8;
|
||||
RealD b=1.5;
|
||||
RealD c=0.5;
|
||||
|
||||
// Double versions
|
||||
FermionAction DdwfPeriodic(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,Params);
|
||||
FermionAction PVPeriodic (U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,pvmass,M5,b,c,Params);
|
||||
FermionAction DdwfDirichlet(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,ParamsDir);
|
||||
|
||||
double StoppingCondition = 1.0e-8;
|
||||
double MaxCGIterations = 50000;
|
||||
ConjugateGradient<LatticeFermion> CG(StoppingCondition,MaxCGIterations);
|
||||
|
||||
//////////////////// Two Flavour Determinant Ratio ///////////////////////////////
|
||||
TwoFlavourRatioPseudoFermionAction<FimplD> Nf2(PVPeriodic, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(Nf2,U,FilterNone);
|
||||
|
||||
//////////////////// Two Flavour Determinant force test Even Odd ///////////////////////////////
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<FimplD> Nf2eo(PVPeriodic, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(Nf2eo,U,FilterNone);
|
||||
|
||||
//////////////////// Domain forces ////////////////////
|
||||
int Width=4;
|
||||
DDHMCFilter<WilsonImplD::Field> DDHMCFilter(Block4,Width);
|
||||
|
||||
//////////////////// Two flavour boundary det ////////////////////
|
||||
TwoFlavourRatioPseudoFermionAction<FimplD> BdyNf2(DdwfDirichlet, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(BdyNf2,U,DDHMCFilter);
|
||||
|
||||
//////////////////// Two flavour eo boundary det ////////////////////
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<FimplD> BdyNf2eo(DdwfDirichlet, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(BdyNf2eo,U,DDHMCFilter);
|
||||
|
||||
//////////////////// One flavour boundary det ////////////////////
|
||||
OneFlavourRationalParams OFRp; // Up/down
|
||||
OFRp.lo = 4.0e-5;
|
||||
OFRp.hi = 90.0;
|
||||
OFRp.MaxIter = 60000;
|
||||
OFRp.tolerance= 1.0e-8;
|
||||
OFRp.mdtolerance= 1.0e-6;
|
||||
OFRp.degree = 18;
|
||||
OFRp.precision= 80;
|
||||
OFRp.BoundsCheckFreq=0;
|
||||
std::vector<RealD> ActionTolByPole({
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8
|
||||
});
|
||||
std::vector<RealD> MDTolByPole({
|
||||
1.0e-6,3.0e-7,1.0e-7,1.0e-7, // Orig sloppy
|
||||
// 1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8
|
||||
});
|
||||
OneFlavourEvenOddRatioRationalPseudoFermionAction<FermionImplPolicy> BdySqrt(DdwfDirichlet,DdwfPeriodic,OFRp);
|
||||
ForceTest<GimplTypesR>(BdySqrt,U,DDHMCFilter);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@@ -66,7 +66,7 @@ int main (int argc, char ** argv)
|
||||
////////////////////////////////////
|
||||
RealD mass=0.01;
|
||||
RealD M5=1.8;
|
||||
OverlapWilsonContFracTanhFermionR Dcf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonContFracTanhFermionD Dcf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
Dcf.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
541
tests/forces/Test_double_ratio.cc
Normal file
541
tests/forces/Test_double_ratio.cc
Normal file
@@ -0,0 +1,541 @@
|
||||
/*
|
||||
2f Full det MdagM 10^6 force ~ 1.3e7
|
||||
rid : Message : 1767.283471 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 1767.283476 s : S1 : 1.52885e+09
|
||||
Grid : Message : 1767.283480 s : S2 : 1.52886e+09
|
||||
Grid : Message : 1767.283482 s : dS : 8877.34
|
||||
Grid : Message : 1767.283483 s : dSpred : 8877.7
|
||||
Grid : Message : 1767.283484 s : diff : -0.360484
|
||||
Grid : Message : 1767.283485 s : *********************************************************
|
||||
|
||||
2f Full det MpcdagMpc 10^6 force ~ 1.8e6
|
||||
Grid : Message : 2399.576962 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 2399.576968 s : S1 : 1.52885e+09
|
||||
Grid : Message : 2399.576972 s : S2 : 1.52886e+09
|
||||
Grid : Message : 2399.576974 s : dS : 9728.49
|
||||
Grid : Message : 2399.576975 s : dSpred : 9726.58
|
||||
Grid : Message : 2399.576976 s : diff : 1.90683
|
||||
Grid : Message : 2399.576977 s : *********************************************************
|
||||
|
||||
2f bdy MdagM 1500 force Force ~ 2800
|
||||
Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 4622.385067 s : S1 : 1.52885e+09
|
||||
Grid : Message : 4622.385071 s : S2 : 1.52885e+09
|
||||
Grid : Message : 4622.385072 s : dS : 25.4944
|
||||
Grid : Message : 4622.385073 s : dSpred : 25.4672
|
||||
Grid : Message : 4622.385074 s : diff : 0.0271414
|
||||
Grid : Message : 4622.385075 s : *********************************************************
|
||||
|
||||
2f bdy MpcdagMpc 10^6 force Force ~ 2200
|
||||
Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 4622.385067 s : S1 : 1.52885e+09
|
||||
Grid : Message : 4622.385071 s : S2 : 1.52885e+09
|
||||
Grid : Message : 4622.385072 s : dS : 25.4944
|
||||
Grid : Message : 4622.385073 s : dSpred : 25.4672
|
||||
Grid : Message : 4622.385074 s : diff : 0.0271414
|
||||
Grid : Message : 4622.385075 s : *********************************************************
|
||||
|
||||
1f Bdy Det
|
||||
//
|
||||
// These all had tol set by OFRp, not through MDpoles
|
||||
// So assumptions it was Remez might be wrong.
|
||||
//
|
||||
Optimisation log: looser rational AND MD tolerances sloppy
|
||||
MobiusForce.221179 -- same as HMC. dS is mispredicted Forece ~2.8
|
||||
Grid : Message : 6582.258991 s : dS : 0.024478
|
||||
Grid : Message : 6582.258992 s : dSpred : 0.00791876
|
||||
Grid : Message : 6582.258994 s : diff : 0.0165592
|
||||
|
||||
MobiusForce.221193 -- tight rational AND MD tolerances to 1e-8 ~ 2.8 same
|
||||
Grid : Message : 1964.939209 s : S1 : 7.64404e+08
|
||||
Grid : Message : 1964.939213 s : S2 : 7.64404e+08
|
||||
Grid : Message : 1964.939215 s : dS : -0.00775838 <--- too loose even on action
|
||||
Grid : Message : 1964.939216 s : dSpred : -0.00416793
|
||||
Grid : Message : 1964.939217 s : diff : -0.00359045
|
||||
|
||||
MobiusForce.221394 -- tight rational, MD tol sloppy Force ~ 2.8
|
||||
Grid : Message : 2376.921950 s : S1 : 764404436.44069
|
||||
Grid : Message : 2376.921954 s : S2 : 764404436.43299
|
||||
Grid : Message : 2376.921956 s : dS : -0.0076971054077148
|
||||
Grid : Message : 2376.921958 s : dSpred : -0.0041610472282526
|
||||
Grid : Message : 2376.921959 s : diff : -0.0035360581794623
|
||||
|
||||
|
||||
MobiusForce.221587 -- slightly sloppier action, coming from tol array
|
||||
-- much sloppier force
|
||||
-- degree 18
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-6,3.0e-7,1.0e-7,1.0e-7, // Orig sloppy
|
||||
Grid : Message : 2438.875507 s : S1 : 764404436.42251
|
||||
Grid : Message : 2438.875512 s : S2 : 764404436.4148
|
||||
Grid : Message : 2438.875514 s : dS : -0.0077102184295654
|
||||
Grid : Message : 2438.875516 s : dSpred : -0.0075684496959103
|
||||
Grid : Message : 2438.875517 s : diff : -0.00014176873365508
|
||||
|
||||
MobiusForce.221639 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence more
|
||||
|
||||
Grid : Message : 2373.927550 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 2373.927600 s : S1 : 764404436.42251
|
||||
Grid : Message : 2373.927640 s : S2 : 764404436.4148
|
||||
Grid : Message : 2373.927660 s : dS : -0.0077102184295654
|
||||
Grid : Message : 2373.927680 s : dSpred : -0.0075993463919849
|
||||
Grid : Message : 2373.927690 s : diff : -0.00011087203758051
|
||||
Grid : Message : 2373.927700 s : *********************************************************
|
||||
|
||||
|
||||
Grid : Message : 69.269319 s : ApproxPowerMD shift[0] pole 9.5166866092503e-06 residue -2.0047722631555e-08 tol 3e-06
|
||||
Grid : Message : 69.269321 s : ApproxPowerMD shift[1] pole 4.7123486192778e-05 residue -1.316766030683e-07 tol 1e-06
|
||||
Grid : Message : 69.269323 s : ApproxPowerMD shift[2] pole 0.00014860967743736 residue -6.109883117444e-07 tol 1e-07
|
||||
Grid : Message : 69.269325 s : ApproxPowerMD shift[3] pole 0.00041055696132763 residue -2.6088717433891e-06 tol 1e-07
|
||||
Grid : Message : 69.269327 s : ApproxPowerMD shift[4] pole 0.0010822555692906 residue -1.0853799412802e-05 tol 1e-08
|
||||
Grid : Message : 69.269329 s : ApproxPowerMD shift[5] pole 0.0028029613512087 residue -4.4741734470158e-05 tol 1e-08
|
||||
Grid : Message : 69.269331 s : ApproxPowerMD shift[6] pole 0.0072103567378527 residue -0.00018380499193253 tol 1e-08
|
||||
|
||||
rusher 96I]$ more MobiusForce.221887
|
||||
1.0e-5,3.0e-6,3.0e-7,1.0e-7, // soften convergence more more
|
||||
// <-- this is the dirichlet solve, why poorer conditioned???
|
||||
Grid : Message : 1627.226206 s : ConjugateGradientMultiShift k=3643 Shift 3 has converged
|
||||
Grid : Message : 1667.373045 s : ConjugateGradientMultiShift k=5381 Shift 2 has converged
|
||||
Grid : Message : 1705.236992 s : ConjugateGradientMultiShift k=7063 Shift 1 has converged
|
||||
Grid : Message : 1752.493182 s : ConjugateGradientMultiShift k=9220 Shift 0 has converged
|
||||
//
|
||||
//Grid : Message : 1414.837250 s : OneFlavourEvenOddRatioRationalPseudoFermionAction deriv: doing (M^dag M)^{-1/2} ( (V^dag V)^{1/4} Phi)
|
||||
Grid : Message : 1523.416680 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged
|
||||
Grid : Message : 1530.798503 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged
|
||||
Grid : Message : 1536.153421 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged <-- this is the non-dirichlet solve
|
||||
|
||||
Grid : Message : 2339.927565 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 2339.927571 s : S1 : 764404436.42251
|
||||
Grid : Message : 2339.927575 s : S2 : 764404436.4148
|
||||
Grid : Message : 2339.927577 s : dS : -0.0077102184295654
|
||||
Grid : Message : 2339.927579 s : dSpred : -0.0068752425267964
|
||||
Grid : Message : 2339.927580 s : diff : -0.00083497590276901
|
||||
Grid : Message : 2339.927581 s : *********************************************************
|
||||
Grid : Message : 2339.927582 s : Done
|
||||
Grid : Message : 2339.927582 s : *********************************************************
|
||||
|
||||
Force 76 S {S {S {(9.0175185326468,-3.5764415623768e-36)}}}
|
||||
Force 77 S {S {S {(4.1289977678493,-4.3364721285803e-37)}}}
|
||||
Force 78 S {S {S {(3.2299269465841,6.0391022273495e-37)}}}
|
||||
Force 79 S {S {S {(3.0051199649288,-9.6243599973575e-37)}}}
|
||||
Force 80 S {S {S {(2.8924316727872,-1.3371248240604e-37)}}}
|
||||
Force 81 S {S {S {(2.8270868791781,1.792628885004e-37)}}}
|
||||
Force 82 S {S {S {(2.8676819960087,-1.3518185034456e-36)}}}
|
||||
Force 83 S {S {S {(2.7724152154523,1.4950818774521e-37)}}}
|
||||
Force 84 S {S {S {(3.0204624534964,-9.6475025423893e-36)}}}
|
||||
Force 85 S {S {S {(2.8631304063459,2.2426228161781e-37)}}}
|
||||
Force 86 S {S {S {(2.9025673908905,-1.3942465026706e-36)}}}
|
||||
Force 87 S {S {S {(2.8553405232646,-2.0938493124022e-38)}}}
|
||||
Force 88 S {S {S {(3.2820184381375,-1.422348164495e-36)}}}
|
||||
Force 89 S {S {S {(3.8974980085791,1.1682209795266e-35)}}}
|
||||
Force 90 S {S {S {(4.660053618223,-1.4399805797573e-37)}}}
|
||||
Force 91 S {S {S {(6.7993872372366,1.4524702072348e-36)}}}
|
||||
Full
|
||||
Grid : Message : 1523.416680 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged
|
||||
Grid : Message : 1530.798503 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged
|
||||
Grid : Message : 1536.153421 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged
|
||||
PV solve depth 3
|
||||
Grid : Message : 1667.373045 s : ConjugateGradientMultiShift k=5381 Shift 2 has converged
|
||||
Grid : Message : 1705.236992 s : ConjugateGradientMultiShift k=7063 Shift 1 has converged
|
||||
Grid : Message : 1752.493182 s : ConjugateGradientMultiShift k=9220 Shift 0 has converged
|
||||
|
||||
MobiusForce.222490 depth 1
|
||||
Grid : Message : 2155.595070 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 2155.595076 s : S1 : 764404436.37475
|
||||
Grid : Message : 2155.595080 s : S2 : 764404436.21131
|
||||
Grid : Message : 2155.595082 s : dS : -0.16344606876373
|
||||
Grid : Message : 2155.595084 s : dSpred : -0.16235663327375
|
||||
Grid : Message : 2155.595085 s : diff : -0.0010894354899788
|
||||
|
||||
Force 4 S {S {S {(24.512489110423,-7.4203080895657e-36)}}}
|
||||
Force 5 S {S {S {(14.442663101577,7.3909207307951e-37)}}}
|
||||
Force 6 S {S {S {(12.298567945213,2.1989091200069e-36)}}}
|
||||
Force 7 S {S {S {(11.582362859271,-2.2540104177017e-36)}}}
|
||||
Force 8 S {S {S {(11.465725500906,-2.9512255045332e-36)}}}
|
||||
Force 9 S {S {S {(10.869067954412,-2.8388188572358e-36)}}}
|
||||
Force 10 S {S {S {(10.937111429576,-3.3530976357206e-36)}}}
|
||||
Force 11 S {S {S {(11.23500117508,-1.4487967873885e-36)}}}
|
||||
Force 12 S {S {S {(10.900736551834,5.1427877848475e-36)}}} Force is bigger
|
||||
Force 13 S {S {S {(10.951921323651,-1.2098775605838e-35)}}}
|
||||
Force 14 S {S {S {(10.676529230575,-2.50527233519e-36)}}}
|
||||
Force 15 S {S {S {(10.98568474467,3.2193851533145e-36)}}}
|
||||
Force 16 S {S {S {(11.931707726568,-8.5223340434616e-37)}}}
|
||||
Force 17 S {S {S {(13.751904678482,7.6337337826369e-36)}}}
|
||||
Force 18 S {S {S {(17.518955473833,1.8073225643893e-36)}}}
|
||||
Force 19 S {S {S {(20.36519304598,-2.5184966466368e-36)}}}
|
||||
Full solve
|
||||
Grid : Message : 1441.297575 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged
|
||||
Grid : Message : 1449.206520 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged
|
||||
Grid : Message : 1454.352909 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged
|
||||
|
||||
Dirichlet solve -- why so expensive??
|
||||
Spectral radius worse?
|
||||
Grid : Message : 1571.887003 s : ConjugateGradientMultiShift k=5195 Shift 2 has converged
|
||||
Grid : Message : 1599.543760 s : ConjugateGradientMultiShift k=6508 Shift 1 has converged
|
||||
Grid : Message : 1625.368198 s : ConjugateGradientMultiShift k=7819 Shift 0 has converged
|
||||
|
||||
|
||||
dS is much bigger.
|
||||
|
||||
|
||||
MobiusForce.223606
|
||||
Grid : Message : 1123.276405 s : ConjugateGradientMultiShift k=3273 Shift 0 has converged
|
||||
Grid : Message : 1125.945359 s : ConjugateGradientMultiShift k=3407 Shift 1 has converged
|
||||
Grid : Message : 1127.896580 s : ConjugateGradientMultiShift k=3508 Shift 2 has converged <-- 2 takes longer
|
||||
first (bdy) hasenbusch mass raised to 0.005 -- reduces Dirchlet solve cost
|
||||
Force looks ok still
|
||||
Grid : Message : 1510.884960 s : OneFlavourEvenOddRatioRationalPseudoFermionAction compute action: complete
|
||||
Grid : Message : 1510.969380 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 1510.969440 s : S1 : 764404436.37475
|
||||
Grid : Message : 1510.969480 s : S2 : 764404436.17379
|
||||
Grid : Message : 1510.969500 s : dS : -0.20095825195312
|
||||
Grid : Message : 1510.969520 s : dSpred : -0.20025674631954
|
||||
Grid : Message : 1510.969530 s : diff : -0.00070150563358654
|
||||
Force 76 S {S {S {(24.161229317675,2.0147973173094e-35)}}}
|
||||
Force 77 S {S {S {(15.841085162729,3.983456481349e-36)}}}
|
||||
Force 78 S {S {S {(11.031761776856,9.0394046210295e-35)}}}
|
||||
Force 79 S {S {S {(12.177830066719,1.583978637733e-36)}}}
|
||||
Force 80 S {S {S {(9.8372072482222,6.4284847310594e-37)}}}
|
||||
Force 81 S {S {S {(9.6588863493149,1.0501572656659e-35)}}}
|
||||
Force 82 S {S {S {(10.623076227724,-4.4161853392455e-35)}}}
|
||||
Force 83 S {S {S {(8.9477003784221,-7.067659784319e-37)}}}
|
||||
Force 84 S {S {S {(9.7663166497594,-2.1014900256825e-35)}}}
|
||||
Force 85 S {S {S {(8.9992648919057,-4.7107936109203e-36)}}}
|
||||
Force 86 S {S {S {(9.0399987268337,6.4652189295226e-37)}}}
|
||||
Force 87 S {S {S {(9.1319052497073,7.9566273871284e-37)}}}
|
||||
Force 88 S {S {S {(10.094569606113,-1.263656427134e-37)}}}
|
||||
Force 89 S {S {S {(11.563679905523,-1.2777623593438e-35)}}}
|
||||
Force 90 S {S {S {(13.653150474463,2.9093485182852e-37)}}}
|
||||
Force 91 S {S {S {(16.303719912019,2.9857556510886e-36)}}}
|
||||
|
||||
MobiusForce.223749
|
||||
first (bdy) hasenbusch mass raised to 0.01 -- reduces Dirchlet solve cost
|
||||
Grid : Message : 1374.472462 s : OneFlavourEvenOddRatioRationalPseudoFermionAction compute action: complete
|
||||
Grid : Message : 1374.479206 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Grid : Message : 1374.479211 s : S1 : 764404436.37428
|
||||
Grid : Message : 1374.479215 s : S2 : 764404436.20009
|
||||
Grid : Message : 1374.479217 s : dS : -0.17418932914734
|
||||
Grid : Message : 1374.479219 s : dSpred : -0.17358090105485
|
||||
Grid : Message : 1374.479220 s : diff : -0.00060842809248995
|
||||
Force 76 S {S {S {(27.006858541753,4.2141472476979e-36)}}}
|
||||
Force 77 S {S {S {(19.388701462694,-5.1620365048422e-35)}}}
|
||||
Force 78 S {S {S {(13.502424539662,-2.4038859474316e-35)}}}
|
||||
Force 79 S {S {S {(15.555776987064,6.0567346426118e-36)}}}
|
||||
Force 80 S {S {S {(12.752116522904,-2.3720006631655e-35)}}}
|
||||
Force 81 S {S {S {(12.656857824233,1.6912424972456e-35)}}}
|
||||
Force 82 S {S {S {(15.159284452724,5.0898905390605e-36)}}}
|
||||
Force 83 S {S {S {(12.222695136014,-2.2061824913027e-35)}}}
|
||||
Force 84 S {S {S {(12.92077598466,9.6287681011731e-36)}}}
|
||||
Force 85 S {S {S {(11.884630495484,2.822655809912e-36)}}}
|
||||
Force 86 S {S {S {(11.896353116174,1.0926219990893e-35)}}}
|
||||
Force 87 S {S {S {(11.557019282287,2.1532117771187e-35)}}}
|
||||
Force 88 S {S {S {(11.945108384613,-3.0210204816133e-36)}}}
|
||||
Force 89 S {S {S {(13.295373801078,7.3115748621146e-36)}}}
|
||||
Force 90 S {S {S {(15.373728471417,-7.4923071185536e-36)}}}
|
||||
Force 91 S {S {S {(17.348173714234,1.0344350287236e-36)}}}
|
||||
|
||||
MobiusForce.223829
|
||||
1.0e-5,5.0e-6,1.0e-6,1.0e-7, // soften convergence more more
|
||||
Grid : Message : 1000.951387 s : ConjugateGradientMultiShift k=1881 Shift 0 has converged
|
||||
Grid : Message : 1002.619542 s : ConjugateGradientMultiShift k=1960 Shift 1 has converged
|
||||
Grid : Message : 1003.726982 s : ConjugateGradientMultiShift k=2014 Shift 4 has converged
|
||||
Grid : Message : 1005.698741 s : ConjugateGradientMultiShift k=2113 Shift 2 has converged
|
||||
Grid : Message : 1007.320875 s : ConjugateGradientMultiShift k=2197 Shift 3 has converged
|
||||
Grid : Message : 1351.171259 s : S1 : 764404436.37428
|
||||
Grid : Message : 1351.171263 s : S2 : 764404436.20009
|
||||
Grid : Message : 1351.171265 s : dS : -0.17418932914734
|
||||
Grid : Message : 1351.171266 s : dSpred : -0.1743248065338
|
||||
Grid : Message : 1351.171267 s : diff : 0.00013547738646566
|
||||
Force 76 S {S {S {(27.004288088317,6.035575744297e-35)}}}
|
||||
Force 77 S {S {S {(19.388023720604,-6.9736202362532e-36)}}}
|
||||
Force 78 S {S {S {(13.502663916173,6.4067380855692e-35)}}}
|
||||
Force 79 S {S {S {(15.55135748152,1.7219522871608e-35)}}}
|
||||
Force 80 S {S {S {(12.75135802213,-1.1303847551095e-35)}}}
|
||||
Force 81 S {S {S {(12.655732786276,1.689773129307e-36)}}}
|
||||
Force 82 S {S {S {(15.158469055699,-6.7205950772387e-35)}}}
|
||||
Force 83 S {S {S {(12.222907191126,-1.6775773754173e-35)}}}
|
||||
Force 84 S {S {S {(12.916025368247,-1.9641041234302e-35)}}}
|
||||
Force 85 S {S {S {(11.881879452577,-2.3054382955502e-36)}}}
|
||||
Force 86 S {S {S {(11.897253557199,-3.3617669065579e-35)}}}
|
||||
Force 87 S {S {S {(11.55717723524,-1.8690360178074e-36)}}}
|
||||
Force 88 S {S {S {(11.945590605851,-6.7208889508264e-36)}}}
|
||||
Force 89 S {S {S {(13.298173932749,-1.0322309768158e-35)}}}
|
||||
Force 90 S {S {S {(15.373845416836,7.4158999857501e-36)}}}
|
||||
Force 91 S {S {S {(17.348058307158,-1.8514036025451e-36)}}}
|
||||
-- could make the stopping condition mandatory if shift 0 is converged.
|
||||
-- Save 20% of iterations and single tunable
|
||||
*/
|
||||
|
||||
//
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_double_ratio.cc
|
||||
|
||||
Copyright (C) 2022
|
||||
|
||||
Author: Peter Boyle <pboyle@bnl.gov>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
typedef MobiusFermionD FermionAction;
|
||||
typedef WilsonImplD FimplD;
|
||||
typedef WilsonImplD FermionImplPolicy;
|
||||
|
||||
template<class Gimpl>
|
||||
void ForceTest(Action<LatticeGaugeField> &action,LatticeGaugeField & U,MomentumFilterBase<LatticeGaugeField> &Filter)
|
||||
{
|
||||
GridBase *UGrid = U.Grid();
|
||||
|
||||
std::vector<int> seeds({1,2,3,5});
|
||||
GridSerialRNG sRNG; sRNG.SeedFixedIntegers(seeds);
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds);
|
||||
|
||||
LatticeColourMatrix Pmu(UGrid);
|
||||
LatticeGaugeField P(UGrid);
|
||||
LatticeGaugeField UdSdU(UGrid);
|
||||
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
std::cout << GridLogMessage << " Force test for "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
|
||||
RealD eps=0.005;
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Refresh "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
Gimpl::generate_momenta(P,sRNG,RNG4);
|
||||
Filter.applyFilter(P);
|
||||
|
||||
FieldMetaData header;
|
||||
std::string file("./ckpoint_lat.2000");
|
||||
NerscIO::readConfiguration(U,header,file);
|
||||
|
||||
action.refresh(U,sRNG,RNG4);
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Action "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
RealD S1 = action.S(U);
|
||||
|
||||
Gimpl::update_field(P,U,eps);
|
||||
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Derivative "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
action.deriv(U,UdSdU);
|
||||
UdSdU = Ta(UdSdU);
|
||||
Filter.applyFilter(UdSdU);
|
||||
|
||||
DumpSliceNorm("Force",UdSdU,Nd-1);
|
||||
|
||||
Gimpl::update_field(P,U,eps);
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout << GridLogMessage << " Action "<<action.action_name()<<std::endl;
|
||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
|
||||
RealD S2 = action.S(U);
|
||||
|
||||
// Use the derivative
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
auto UdSdUmu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
Pmu= PeekIndex<LorentzIndex>(P,mu);
|
||||
dS = dS - trace(Pmu*UdSdUmu)*eps*2.0*2.0;
|
||||
}
|
||||
ComplexD dSpred = sum(dS);
|
||||
RealD diff = S2-S1-dSpred.real();
|
||||
|
||||
std::cout<< GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||
std::cout<< GridLogMessage << "S1 : "<< S1 <<std::endl;
|
||||
std::cout<< GridLogMessage << "S2 : "<< S2 <<std::endl;
|
||||
std::cout<< GridLogMessage << "dS : "<< S2-S1 <<std::endl;
|
||||
std::cout<< GridLogMessage << "dSpred : "<< dSpred.real() <<std::endl;
|
||||
std::cout<< GridLogMessage << "diff : "<< diff<<std::endl;
|
||||
std::cout<< GridLogMessage << "*********************************************************"<<std::endl;
|
||||
// assert(diff<1.0);
|
||||
std::cout<< GridLogMessage << "Done" <<std::endl;
|
||||
std::cout << GridLogMessage << "*********************************************************"<<std::endl;
|
||||
}
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::cout << std::setprecision(14);
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate shm;
|
||||
GlobalSharedMemory::GetShmDims(mpi_layout,shm);
|
||||
|
||||
const int Ls=12;
|
||||
const int Nt = latt_size[3];
|
||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Domain decomposed operator
|
||||
////////////////////////////////////////////////////////////////
|
||||
Coordinate CommDim(Nd);
|
||||
for(int d=0;d<Nd;d++) CommDim[d]= (mpi_layout[d]/shm[d])>1 ? 1 : 0;
|
||||
|
||||
Coordinate NonDirichlet(Nd+1,0);
|
||||
Coordinate Dirichlet(Nd+1,0);
|
||||
Dirichlet[1] = CommDim[0]*latt_size[0]/mpi_layout[0] * shm[0];
|
||||
Dirichlet[2] = CommDim[1]*latt_size[1]/mpi_layout[1] * shm[1];
|
||||
Dirichlet[3] = CommDim[2]*latt_size[2]/mpi_layout[2] * shm[2];
|
||||
Dirichlet[4] = CommDim[3]*latt_size[3]/mpi_layout[3] * shm[3];
|
||||
|
||||
Coordinate Block4(Nd);
|
||||
Block4[0] = Dirichlet[1];
|
||||
Block4[1] = Dirichlet[2];
|
||||
Block4[2] = Dirichlet[3];
|
||||
Block4[3] = Dirichlet[4];
|
||||
|
||||
std::vector<Complex> boundary = {1,1,1,-1};
|
||||
FermionAction::ImplParams Params(boundary);
|
||||
FermionAction::ImplParams ParamsDir(boundary);
|
||||
Params.dirichlet=NonDirichlet;
|
||||
ParamsDir.dirichlet=Dirichlet;
|
||||
ParamsDir.partialDirichlet=1;
|
||||
|
||||
///////////////////// Gauge Field and Gauge Forces ////////////////////////////
|
||||
LatticeGaugeField U(UGrid);
|
||||
|
||||
RealD beta=6.0;
|
||||
WilsonGaugeActionR PlaqAction(beta);
|
||||
IwasakiGaugeActionR RectAction(beta);
|
||||
|
||||
MomentumFilterNone<LatticeGaugeField> FilterNone;
|
||||
ForceTest<GimplTypesR>(PlaqAction,U,FilterNone);
|
||||
ForceTest<GimplTypesR>(RectAction,U,FilterNone);
|
||||
|
||||
////////////////////////////////////
|
||||
// Action
|
||||
////////////////////////////////////
|
||||
RealD mass=0.00078;
|
||||
RealD dmass=0.01;
|
||||
RealD pvmass=1.0;
|
||||
RealD M5=1.8;
|
||||
RealD b=1.5;
|
||||
RealD c=0.5;
|
||||
|
||||
// Double versions
|
||||
FermionAction DdwfPeriodic(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,Params);
|
||||
FermionAction PVPeriodic (U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,pvmass,M5,b,c,Params);
|
||||
FermionAction DdwfDirichlet(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,dmass,M5,b,c,ParamsDir);
|
||||
|
||||
double StoppingCondition = 1.0e-8;
|
||||
double MaxCGIterations = 50000;
|
||||
ConjugateGradient<LatticeFermion> CG(StoppingCondition,MaxCGIterations);
|
||||
|
||||
//////////////////// Two Flavour Determinant Ratio ///////////////////////////////
|
||||
TwoFlavourRatioPseudoFermionAction<FimplD> Nf2(PVPeriodic, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(Nf2,U,FilterNone);
|
||||
|
||||
//////////////////// Two Flavour Determinant force test Even Odd ///////////////////////////////
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<FimplD> Nf2eo(PVPeriodic, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(Nf2eo,U,FilterNone);
|
||||
|
||||
//////////////////// Domain forces ////////////////////
|
||||
int Width=4;
|
||||
DDHMCFilter<WilsonImplD::Field> DDHMCFilter(Block4,Width);
|
||||
|
||||
//////////////////// Two flavour boundary det ////////////////////
|
||||
TwoFlavourRatioPseudoFermionAction<FimplD> BdyNf2(DdwfDirichlet, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(BdyNf2,U,DDHMCFilter);
|
||||
|
||||
//////////////////// Two flavour eo boundary det ////////////////////
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<FimplD> BdyNf2eo(DdwfDirichlet, DdwfPeriodic,CG,CG);
|
||||
// ForceTest<GimplTypesR>(BdyNf2eo,U,DDHMCFilter);
|
||||
|
||||
//////////////////// One flavour boundary det ////////////////////
|
||||
RationalActionParams OFRp; // Up/down
|
||||
OFRp.lo = 6.0e-5;
|
||||
OFRp.hi = 90.0;
|
||||
OFRp.inv_pow = 2;
|
||||
OFRp.MaxIter = SP_iters; // get most shifts by 2000, stop sharing space
|
||||
OFRp.action_tolerance= 1.0e-8;
|
||||
OFRp.action_degree = 18;
|
||||
OFRp.md_tolerance= 1.0e-5;
|
||||
OFRp.md_degree = 14;
|
||||
// OFRp.degree = 20; converges
|
||||
// OFRp.degree = 16;
|
||||
OFRp.precision= 80;
|
||||
OFRp.BoundsCheckFreq=0;
|
||||
/*
|
||||
OneFlavourRationalParams OFRp; // Up/down
|
||||
OFRp.lo = 4.0e-5;
|
||||
OFRp.hi = 90.0;
|
||||
OFRp.MaxIter = 60000;
|
||||
OFRp.tolerance= 1.0e-9;
|
||||
OFRp.mdtolerance= 1.0e-8;
|
||||
OFRp.degree = 18;
|
||||
OFRp.precision= 80;
|
||||
OFRp.BoundsCheckFreq=0;
|
||||
*/
|
||||
std::vector<RealD> ActionTolByPole({
|
||||
1.0e-7,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8
|
||||
});
|
||||
std::vector<RealD> MDTolByPole({
|
||||
1.6e-5,5.0e-6,1.0e-6,3.0e-7, // soften convergence more more
|
||||
// 1.0e-6,3.0e-7,1.0e-7,1.0e-7,
|
||||
// 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8
|
||||
});
|
||||
/*
|
||||
std::vector<RealD> ActionTolByPole({
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8
|
||||
});
|
||||
std::vector<RealD> MDTolByPole({
|
||||
1.0e-5,5.0e-6,1.0e-6,1.0e-7, // soften convergence more more
|
||||
// 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence more
|
||||
// 1.0e-6,3.0e-7,1.0e-7,1.0e-7, // Orig sloppy
|
||||
// 1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8,1.0e-8,1.0e-8,
|
||||
1.0e-8,1.0e-8
|
||||
});
|
||||
*/
|
||||
OneFlavourEvenOddRatioRationalPseudoFermionAction<FermionImplPolicy> BdySqrt(DdwfDirichlet,DdwfPeriodic,OFRp);
|
||||
BdySqrt.SetTolerances(ActionTolByPole,MDTolByPole);
|
||||
ForceTest<GimplTypesR>(BdySqrt,U,DDHMCFilter);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@@ -67,7 +67,7 @@ int main (int argc, char ** argv)
|
||||
////////////////////////////////////
|
||||
RealD mass=0.01;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
Ddwf.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -80,8 +80,8 @@ int main (int argc, char** argv)
|
||||
RealD mf = 0.01;
|
||||
RealD mb = 1.0;
|
||||
RealD M5 = 1.8;
|
||||
DomainWallEOFAFermionR Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5);
|
||||
DomainWallEOFAFermionR Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5);
|
||||
DomainWallEOFAFermionD Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5);
|
||||
DomainWallEOFAFermionD Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5);
|
||||
OneFlavourRationalParams Params(0.95, 100.0, 5000, 1.0e-12, 12);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-12, 5000);
|
||||
ExactOneFlavourRatioPseudoFermionAction<WilsonImplR> Meofa(Lop, Rop, CG, CG, CG, CG, CG, Params, true);
|
||||
|
@@ -47,7 +47,7 @@ int main (int argc, char ** argv)
|
||||
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
|
||||
|
||||
typedef typename GparityDomainWallFermionR::FermionField FermionField;
|
||||
typedef typename GparityDomainWallFermionD::FermionField FermionField;
|
||||
|
||||
int threads = GridThread::GetThreads();
|
||||
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
||||
@@ -76,10 +76,10 @@ int main (int argc, char ** argv)
|
||||
std::vector<int> twists(Nd,0);
|
||||
twists[nu] = 1;
|
||||
twists[Nd-1] = 1; //antiperiodic in time
|
||||
GparityDomainWallFermionR::ImplParams params;
|
||||
GparityDomainWallFermionD::ImplParams params;
|
||||
params.twists = twists;
|
||||
|
||||
GparityDomainWallFermionR Dw(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params);
|
||||
GparityDomainWallFermionD Dw(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params);
|
||||
|
||||
Dw.M (phi,Mphi);
|
||||
|
||||
|
@@ -33,7 +33,7 @@ using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityDomainWallEOFAFermionR FermionAction;
|
||||
typedef GparityDomainWallEOFAFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
int main (int argc, char** argv)
|
||||
|
@@ -56,7 +56,7 @@ int main (int argc, char ** argv)
|
||||
int threads = GridThread::GetThreads();
|
||||
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
||||
|
||||
typedef typename GparityDomainWallFermionR::FermionField FermionField;
|
||||
typedef typename GparityDomainWallFermionD::FermionField FermionField;
|
||||
FermionField phi (FGrid); gaussian(RNG5,phi);
|
||||
FermionField Mphi (FGrid);
|
||||
FermionField MphiPrime (FGrid);
|
||||
@@ -75,8 +75,8 @@ int main (int argc, char ** argv)
|
||||
std::vector<int> twists(Nd,0);
|
||||
twists[nu] = 1;
|
||||
twists[3] = 1;
|
||||
GparityDomainWallFermionR::ImplParams params; params.twists = twists;
|
||||
GparityDomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params);
|
||||
GparityDomainWallFermionD::ImplParams params; params.twists = twists;
|
||||
GparityDomainWallFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params);
|
||||
Ddwf.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -70,8 +70,8 @@ void convertFermion1f_from_2f(FermionField1f &out_1f, const FermionField2f &in_2
|
||||
|
||||
int nuoff = is_4d ? 0 : 1; //s in 0 direction
|
||||
|
||||
int L_2f = FGrid_2f->FullDimensions()[nu+nuoff];
|
||||
int L_1f = FGrid_1f->FullDimensions()[nu+nuoff];
|
||||
Integer L_2f = FGrid_2f->FullDimensions()[nu+nuoff];
|
||||
Integer L_1f = FGrid_1f->FullDimensions()[nu+nuoff];
|
||||
assert(L_1f == 2 * L_2f);
|
||||
|
||||
auto in_f0_2fgrid = PeekIndex<GparityFlavourIndex>(in_2f,0); //flavor 0 on 2f Grid
|
||||
|
@@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
int threads = GridThread::GetThreads();
|
||||
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
||||
|
||||
typedef typename GparityDomainWallFermionR::FermionField FermionField;
|
||||
typedef typename GparityDomainWallFermionD::FermionField FermionField;
|
||||
FermionField phi (FGrid); gaussian(RNG4,phi);
|
||||
FermionField Mphi (FGrid);
|
||||
FermionField MphiPrime (FGrid);
|
||||
@@ -70,8 +70,8 @@ int main (int argc, char ** argv)
|
||||
std::vector<int> twists(Nd,0);
|
||||
twists[nu] = 1;
|
||||
twists[3]=1;
|
||||
GparityWilsonFermionR::ImplParams params; params.twists = twists;
|
||||
GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params);
|
||||
GparityWilsonFermionD::ImplParams params; params.twists = twists;
|
||||
GparityWilsonFermionD Wil(U,*UGrid,*UrbGrid,mass,params);
|
||||
Wil.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -76,7 +76,7 @@ int main (int argc, char ** argv)
|
||||
p.boundary_phases[2] = 1.0;
|
||||
p.boundary_phases[3] =- 1.0;
|
||||
|
||||
MobiusFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,p);
|
||||
MobiusFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,p);
|
||||
Ddwf.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -82,8 +82,8 @@ int main (int argc, char** argv)
|
||||
RealD mf = 0.01;
|
||||
RealD mb = 1.0;
|
||||
RealD M5 = 1.8;
|
||||
MobiusEOFAFermionR Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionR Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c);
|
||||
MobiusEOFAFermionD Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionD Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c);
|
||||
OneFlavourRationalParams Params(0.95, 100.0, 5000, 1.0e-12, 12);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-12, 5000);
|
||||
ExactOneFlavourRatioPseudoFermionAction<WilsonImplR> Meofa(Lop, Rop, CG, CG, CG, CG, CG, Params, false);
|
||||
|
@@ -34,7 +34,7 @@ using namespace Grid;
|
||||
;
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityMobiusEOFAFermionR FermionAction;
|
||||
typedef GparityMobiusEOFAFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
int main (int argc, char** argv)
|
||||
|
@@ -69,7 +69,7 @@ int main (int argc, char ** argv)
|
||||
////////////////////////////////////
|
||||
RealD mass=0.01;
|
||||
RealD M5=1.8;
|
||||
OverlapWilsonPartialFractionTanhFermionR Dpf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonPartialFractionTanhFermionD Dpf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
Dpf.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -67,7 +67,7 @@ int main (int argc, char ** argv)
|
||||
// Unmodified matrix element
|
||||
////////////////////////////////////
|
||||
RealD mass=-4.0; //kills the diagonal term
|
||||
WilsonFermionR Dw (U, Grid,RBGrid,mass);
|
||||
WilsonFermionD Dw (U, Grid,RBGrid,mass);
|
||||
Dw.M (phi,Mphi);
|
||||
|
||||
ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p
|
||||
|
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
|
||||
////////////////////////////////////
|
||||
RealD mass = 0.1;
|
||||
Real csw = 1.0;
|
||||
WilsonCloverFermionR Dw(U, Grid, RBGrid, mass, csw, csw);
|
||||
WilsonCloverFermionD Dw(U, Grid, RBGrid, mass, csw, csw);
|
||||
Dw.ImportGauge(U);
|
||||
Dw.M(phi, Mphi);
|
||||
ComplexD S = innerProduct(Mphi, Mphi); // Action : pdag MdagM p
|
||||
|
@@ -81,7 +81,7 @@ int main (int argc, char ** argv)
|
||||
omegas.push_back( std::complex<double>(0.0686324988446592,0.0550658530827402) );
|
||||
omegas.push_back( std::complex<double>(0.0686324988446592,-0.0550658530827402) );
|
||||
|
||||
ZMobiusFermionR Ddwf(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,b,c);
|
||||
ZMobiusFermionD Ddwf(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,b,c);
|
||||
|
||||
Ddwf.M (phi,Mphi);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ void copy2fTo1fFermionField(FermionField1f &out, const FermionField2f &in, int g
|
||||
LatticeInteger xcoor_1f(out.Grid()); //5d lattice integer
|
||||
LatticeCoordinate(xcoor_1f,gpdir);
|
||||
|
||||
int L = dim_2f[gpdir];
|
||||
Integer L = dim_2f[gpdir];
|
||||
|
||||
out = where(xcoor_1f < L, f0_fullgrid_dbl, f1_fullgrid_dbl);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ void copy2fTo1fGaugeField(LatticeGaugeField &out, const LatticeGaugeField &in, i
|
||||
LatticeInteger xcoor_1f(out.Grid());
|
||||
LatticeCoordinate(xcoor_1f,gpdir);
|
||||
|
||||
int L = dim_2f[gpdir];
|
||||
Integer L = dim_2f[gpdir];
|
||||
|
||||
out = where(xcoor_1f < L, U_dbl, Uconj_dbl);
|
||||
}
|
||||
@@ -140,11 +140,11 @@ int main(int argc, char **argv) {
|
||||
copy2fTo1fGaugeField(Umu_1f, Umu_2f, mu);
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy2f;
|
||||
typedef GparityDomainWallFermionR FermionAction2f;
|
||||
typedef GparityDomainWallFermionD FermionAction2f;
|
||||
typedef typename FermionAction2f::FermionField FermionField2f;
|
||||
|
||||
typedef WilsonImplR FermionImplPolicy1f;
|
||||
typedef DomainWallFermionR FermionAction1f;
|
||||
typedef DomainWallFermionD FermionAction1f;
|
||||
typedef typename FermionAction1f::FermionField FermionField1f;
|
||||
|
||||
std::cout << "Generating eta 2f" << std::endl;
|
||||
|
@@ -43,7 +43,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef DomainWallFermionR FermionAction;
|
||||
typedef DomainWallFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
@@ -136,16 +136,9 @@ int main(int argc, char **argv) {
|
||||
TheHMC.ReadCommandLine(argc, argv); // these can be parameters from file
|
||||
|
||||
// Reset performance counters
|
||||
NumOp.ZeroCounters();
|
||||
DenOp.ZeroCounters();
|
||||
TheHMC.Run(); // no smearing
|
||||
// TheHMC.Run(SmearingPolicy); // for smearing
|
||||
|
||||
std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl;
|
||||
NumOp.Report();
|
||||
std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl;
|
||||
DenOp.Report();
|
||||
|
||||
Grid_finalize();
|
||||
|
||||
} // main
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
typedef ConjugateHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityDomainWallFermionR FermionAction;
|
||||
typedef GparityDomainWallFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
@@ -132,15 +132,9 @@ int main(int argc, char **argv) {
|
||||
TheHMC.ReadCommandLine(argc, argv); // these can be parameters from file
|
||||
|
||||
// Reset performance counters
|
||||
NumOp.ZeroCounters();
|
||||
DenOp.ZeroCounters();
|
||||
TheHMC.Run(); // no smearing
|
||||
// TheHMC.Run(SmearingPolicy); // for smearing
|
||||
|
||||
std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl;
|
||||
NumOp.Report();
|
||||
std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl;
|
||||
DenOp.Report();
|
||||
|
||||
Grid_finalize();
|
||||
|
||||
|
@@ -83,7 +83,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef MobiusFermionR FermionAction;
|
||||
typedef MobiusFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
// Serialiser
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -211,8 +211,6 @@ int main(int argc, char **argv) {
|
||||
*/
|
||||
|
||||
// Reset performance counters
|
||||
NumOp.ZeroCounters();
|
||||
DenOp.ZeroCounters();
|
||||
|
||||
if (ApplySmearing){
|
||||
SmearingParameters SmPar(Reader);
|
||||
@@ -225,11 +223,6 @@ int main(int argc, char **argv) {
|
||||
TheHMC.Run(); // no smearing
|
||||
}
|
||||
|
||||
std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl;
|
||||
NumOp.Report();
|
||||
std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl;
|
||||
DenOp.Report();
|
||||
|
||||
Grid_finalize();
|
||||
} // main
|
||||
|
||||
|
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef MobiusFermionR FermionAction;
|
||||
typedef MobiusFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
// Serialiser
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -226,8 +226,6 @@ int main(int argc, char **argv) {
|
||||
*/
|
||||
|
||||
// Reset performance counters
|
||||
NumOp.ZeroCounters();
|
||||
DenOp.ZeroCounters();
|
||||
|
||||
if (ApplySmearing){
|
||||
SmearingParameters SmPar(Reader);
|
||||
@@ -240,10 +238,6 @@ int main(int argc, char **argv) {
|
||||
TheHMC.Run(); // no smearing
|
||||
}
|
||||
|
||||
std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl;
|
||||
NumOp.Report();
|
||||
std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl;
|
||||
DenOp.Report();
|
||||
|
||||
Grid_finalize();
|
||||
} // main
|
||||
|
@@ -39,7 +39,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonCloverFermionR FermionAction;
|
||||
typedef WilsonCloverFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -40,7 +40,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
|
||||
typedef ConjugateHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityDomainWallFermionR FermionAction;
|
||||
typedef GparityDomainWallFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
typedef ConjugateHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
|
||||
typedef GparityWilsonImplR FermionImplPolicy;
|
||||
typedef GparityDomainWallFermionR FermionAction;
|
||||
typedef GparityDomainWallFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -39,7 +39,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Typedefs to simplify notation
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef MobiusFermionR FermionAction;
|
||||
typedef MobiusFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -148,14 +148,14 @@ int main(int argc, char **argv) {
|
||||
// Level1.push_back(&StrangePseudoFermion);
|
||||
|
||||
// DJM: setup for EOFA ratio (Shamir)
|
||||
// DomainWallEOFAFermionR Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5);
|
||||
// DomainWallEOFAFermionR Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5);
|
||||
// DomainWallEOFAFermionD Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5);
|
||||
// DomainWallEOFAFermionD Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5);
|
||||
// ExactOneFlavourRatioPseudoFermionAction<FermionImplPolicy> EOFA(Strange_Op_L, Strange_Op_R, CG, OFRp, true);
|
||||
// Level1.push_back(&EOFA);
|
||||
|
||||
// DJM: setup for EOFA ratio (Mobius)
|
||||
MobiusEOFAFermionR Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionR Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c);
|
||||
MobiusEOFAFermionD Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c);
|
||||
MobiusEOFAFermionD Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c);
|
||||
ExactOneFlavourRatioPseudoFermionAction<FermionImplPolicy> EOFA(Strange_Op_L, Strange_Op_R, CG, OFRp, true);
|
||||
Level1.push_back(&EOFA);
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class ScalarActionParameters : Serializable {
|
||||
double, lambda,
|
||||
double, g);
|
||||
|
||||
ScalarActionParameters() = default;
|
||||
ScalarActionParameters() {};
|
||||
|
||||
template <class ReaderClass >
|
||||
ScalarActionParameters(Reader<ReaderClass>& Reader){
|
||||
@@ -45,7 +45,6 @@ class ScalarActionParameters : Serializable {
|
||||
}
|
||||
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
template <class Impl>
|
||||
class MagMeas : public HmcObservable<typename Impl::Field> {
|
||||
|
@@ -28,7 +28,7 @@ directory
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
namespace Grid{
|
||||
struct FermionParameters: Serializable {
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters,
|
||||
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonTwoIndexAntiSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
//typedef Grid::JSONReader Serialiser;
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -210,4 +210,6 @@ int main(int argc, char **argv)
|
||||
Grid_finalize();
|
||||
|
||||
} // main
|
||||
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -29,6 +29,7 @@ directory
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
namespace Grid{
|
||||
struct FermionParameters: Serializable {
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters,
|
||||
@@ -81,7 +82,7 @@ int main(int argc, char **argv)
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonTwoIndexSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonCloverTwoIndexSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonCloverTwoIndexSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
//typedef Grid::JSONReader Serialiser;
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -211,3 +212,6 @@ int main(int argc, char **argv)
|
||||
Grid_finalize();
|
||||
|
||||
} // main
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonCloverFermionR FermionAction;
|
||||
typedef WilsonCloverFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
|
||||
|
@@ -32,6 +32,7 @@ directory
|
||||
#include "Grid/Grid.h"
|
||||
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
namespace Grid{
|
||||
struct FermionParameters: Serializable {
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters,
|
||||
@@ -84,11 +85,11 @@ int main(int argc, char **argv) {
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper;
|
||||
|
||||
typedef WilsonImplR FundImplPolicy;
|
||||
typedef WilsonCloverFermionR FundFermionAction;
|
||||
typedef WilsonCloverFermionD FundFermionAction;
|
||||
typedef typename FundFermionAction::FermionField FundFermionField;
|
||||
|
||||
typedef WilsonTwoIndexAntiSymmetricImplR ASymmImplPolicy;
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionR ASymmFermionAction;
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionD ASymmFermionAction;
|
||||
typedef typename ASymmFermionAction::FermionField ASymmFermionField;
|
||||
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
@@ -222,3 +223,6 @@ int main(int argc, char **argv) {
|
||||
Grid_finalize();
|
||||
|
||||
} // main
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -29,6 +29,7 @@ directory
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
namespace Grid{
|
||||
struct FermionParameters: Serializable {
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters,
|
||||
@@ -81,7 +82,7 @@ int main(int argc, char **argv)
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonAdjImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonCloverAdjFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonCloverAdjFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
|
||||
@@ -211,3 +212,6 @@ int main(int argc, char **argv)
|
||||
|
||||
} // main
|
||||
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -31,9 +31,10 @@ directory
|
||||
/* END LEGAL */
|
||||
#include "Grid/Grid.h"
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
// Here change the allowed (higher) representations
|
||||
typedef Representations< FundamentalRepresentation, AdjointRepresentation > TheRepresentations;
|
||||
@@ -46,7 +47,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper;
|
||||
typedef WilsonAdjImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonAdjFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonAdjFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@@ -127,3 +128,6 @@ int main(int argc, char **argv) {
|
||||
|
||||
} // main
|
||||
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonCloverFermionR FermionAction;
|
||||
typedef WilsonCloverFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -69,8 +69,10 @@ int main(int argc, char **argv)
|
||||
TopologyObsParameters TopParams;
|
||||
TopParams.interval = 5;
|
||||
TopParams.do_smearing = true;
|
||||
TopParams.Smearing.steps = 200;
|
||||
TopParams.Smearing.step_size = 0.01;
|
||||
TopParams.Smearing.init_step_size = 0.01;
|
||||
TopParams.Smearing.tolerance = 1e-5;
|
||||
// TopParams.Smearing.steps = 200;
|
||||
// TopParams.Smearing.step_size = 0.01;
|
||||
TopParams.Smearing.meas_interval = 50;
|
||||
TopParams.Smearing.maxTau = 2.0;
|
||||
TheHMC.Resources.AddObservable<QObs>(TopParams);
|
||||
|
@@ -33,6 +33,7 @@ directory
|
||||
|
||||
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
#ifndef GRID_CUDA
|
||||
@@ -51,9 +52,9 @@ int main(int argc, char **argv) {
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper;
|
||||
|
||||
typedef WilsonAdjImplR AdjImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonAdjFermionR AdjFermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonAdjFermionD AdjFermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonTwoIndexSymmetricImplR SymmImplPolicy;
|
||||
typedef WilsonTwoIndexSymmetricFermionR SymmFermionAction;
|
||||
typedef WilsonTwoIndexSymmetricFermionD SymmFermionAction;
|
||||
|
||||
|
||||
typedef typename AdjFermionAction::FermionField AdjFermionField;
|
||||
@@ -138,3 +139,6 @@ int main(int argc, char **argv) {
|
||||
} // main
|
||||
|
||||
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonTMFermionR FermionAction;
|
||||
typedef WilsonTMFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -29,6 +29,7 @@ directory
|
||||
/* END LEGAL */
|
||||
#include "Grid/Grid.h"
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
int main(int argc, char **argv) {
|
||||
using namespace Grid;
|
||||
;
|
||||
@@ -45,7 +46,7 @@ int main(int argc, char **argv) {
|
||||
typedef GenericHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper;
|
||||
|
||||
typedef WilsonTwoIndexSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions
|
||||
typedef WilsonTwoIndexSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef WilsonTwoIndexSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...)
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
@@ -127,3 +128,6 @@ int main(int argc, char **argv) {
|
||||
} // main
|
||||
|
||||
|
||||
#else
|
||||
int main(int argc, char **argv){}
|
||||
#endif
|
||||
|
@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -41,7 +41,7 @@ int main(int argc, char **argv) {
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
typedef WilsonImplR FermionImplPolicy;
|
||||
typedef WilsonFermionR FermionAction;
|
||||
typedef WilsonFermionD FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
|
@@ -28,19 +28,21 @@ directory
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
#ifdef ENABLE_FERMION_REPS
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
|
||||
|
||||
//typedef WilsonCloverFermionR FermionOp;
|
||||
//typedef typename WilsonFermionR::FermionField FermionField;
|
||||
//typedef WilsonCloverFermionD FermionOp;
|
||||
//typedef typename WilsonFermionD::FermionField FermionField;
|
||||
|
||||
typedef WilsonImplR FundImplPolicy;
|
||||
typedef WilsonCloverFermionR FundFermionAction;
|
||||
typedef WilsonCloverFermionD FundFermionAction;
|
||||
typedef typename FundFermionAction::FermionField FundFermionField;
|
||||
|
||||
typedef WilsonTwoIndexAntiSymmetricImplR ASymmImplPolicy;
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionR ASymmFermionAction;
|
||||
typedef WilsonCloverTwoIndexAntiSymmetricFermionD ASymmFermionAction;
|
||||
typedef typename ASymmFermionAction::FermionField ASymmFermionField;
|
||||
|
||||
|
||||
@@ -175,3 +177,6 @@ NerscHmcCheckpointer<PeriodicGimplR> Checkpoint(CPparams);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
#else
|
||||
int main(int argc,char **argv){ return 0;};
|
||||
#endif
|
||||
|
@@ -188,8 +188,8 @@ int main (int argc, char ** argv) {
|
||||
std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl;
|
||||
|
||||
// ZMobius EO Operator
|
||||
ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
|
||||
// Eigenvector storage
|
||||
LanczosParams fine =Params.FineParams;
|
||||
|
@@ -188,8 +188,8 @@ int main (int argc, char ** argv) {
|
||||
std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl;
|
||||
|
||||
// ZMobius EO Operator
|
||||
ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
|
||||
// Eigenvector storage
|
||||
LanczosParams fine =Params.FineParams;
|
||||
|
@@ -301,8 +301,8 @@ int main (int argc, char ** argv) {
|
||||
std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl;
|
||||
|
||||
// ZMobius EO Operator
|
||||
ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.);
|
||||
SchurDiagTwoOperator<ZMobiusFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
|
||||
// Eigenvector storage
|
||||
LanczosParams fine =Params.FineParams;
|
||||
|
@@ -51,6 +51,8 @@ struct Setup<GparityMobiusFermionF>{
|
||||
template<>
|
||||
struct Setup<DomainWallFermionF>{
|
||||
static DomainWallFermionF* getAction(LatticeGaugeFieldF &Umu,
|
||||
struct Setup<DomainWallFermionD>{
|
||||
static DomainWallFermionD* getAction(LatticeGaugeField &Umu,
|
||||
GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){
|
||||
RealD mass=0.00054;
|
||||
RealD M5=1.8;
|
||||
|
@@ -32,8 +32,8 @@ using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
typedef WilsonFermionR FermionOp;
|
||||
typedef typename WilsonFermionR::FermionField FermionField;
|
||||
typedef WilsonFermionD FermionOp;
|
||||
typedef typename WilsonFermionD::FermionField FermionField;
|
||||
|
||||
|
||||
RealD AllZero(RealD x) { return 0.; }
|
||||
|
@@ -96,13 +96,16 @@ int main(int argc, char **argv) {
|
||||
std::cout << GridLogMessage << "Initial plaquette: "
|
||||
<< WilsonLoops<PeriodicGimplR>::avgPlaquette(Umu) << std::endl;
|
||||
|
||||
WilsonFlow<PeriodicGimplR> WF(WFPar.steps, WFPar.step_size, WFPar.meas_interval);
|
||||
int t=WFPar.maxTau;
|
||||
WilsonFlowAdaptive<PeriodicGimplR> WF(WFPar.step_size, WFPar.maxTau,
|
||||
1.0e-4,
|
||||
WFPar.meas_interval);
|
||||
|
||||
WF.smear_adaptive(Uflow, Umu, WFPar.maxTau);
|
||||
WF.smear(Uflow, Umu);
|
||||
|
||||
RealD WFlow_plaq = WilsonLoops<PeriodicGimplR>::avgPlaquette(Uflow);
|
||||
RealD WFlow_TC = WilsonLoops<PeriodicGimplR>::TopologicalCharge(Uflow);
|
||||
RealD WFlow_T0 = WF.energyDensityPlaquette(Uflow);
|
||||
RealD WFlow_T0 = WF.energyDensityPlaquette(t,Uflow);
|
||||
std::cout << GridLogMessage << "Plaquette "<< conf << " " << WFlow_plaq << std::endl;
|
||||
std::cout << GridLogMessage << "T0 "<< conf << " " << WFlow_T0 << std::endl;
|
||||
std::cout << GridLogMessage << "TopologicalCharge "<< conf << " " << WFlow_TC << std::endl;
|
||||
|
@@ -71,14 +71,14 @@ int main (int argc, char ** argv)
|
||||
RealD mass=0.1;
|
||||
RealD M5=1.8;
|
||||
|
||||
OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
|
||||
ConjugateResidual<LatticeFermion> MCR(1.0e-8,10000);
|
||||
|
||||
MdagMLinearOperator<OverlapWilsonContFracTanhFermionR,LatticeFermion> HermPosDefOp(Dcf);
|
||||
MdagMLinearOperator<OverlapWilsonContFracTanhFermionD,LatticeFermion> HermPosDefOp(Dcf);
|
||||
MCR(HermPosDefOp,src,result);
|
||||
|
||||
HermitianLinearOperator<OverlapWilsonContFracTanhFermionR,LatticeFermion> HermIndefOp(Dcf);
|
||||
HermitianLinearOperator<OverlapWilsonContFracTanhFermionD,LatticeFermion> HermIndefOp(Dcf);
|
||||
MCR(HermIndefOp,src,result);
|
||||
|
||||
Grid_finalize();
|
||||
|
@@ -108,8 +108,8 @@ int main(int argc, char** argv) {
|
||||
RealD mass = -0.30;
|
||||
RealD csw = 1.9192;
|
||||
|
||||
WilsonCloverFermionR Dwc(Umu, *Grid_f, *RBGrid_f, mass, csw, csw);
|
||||
MdagMLinearOperator<WilsonCloverFermionR, LatticeFermion> MdagMOp_Dwc(Dwc);
|
||||
WilsonCloverFermionD Dwc(Umu, *Grid_f, *RBGrid_f, mass, csw, csw);
|
||||
MdagMLinearOperator<WilsonCloverFermionD, LatticeFermion> MdagMOp_Dwc(Dwc);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Type definitions //
|
||||
|
@@ -102,21 +102,21 @@ int main (int argc, char ** argv)
|
||||
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonContFracTanhFermion test"<<std::endl;
|
||||
OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonContFracTanhFermionR>(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonContFracTanhFermionD>(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonContFracZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonContFracZolotarevFermionR Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestCGinversions<OverlapWilsonContFracZolotarevFermionR>(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonContFracZolotarevFermionD Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestCGinversions<OverlapWilsonContFracZolotarevFermionD>(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonPartialFractionTanhFermion test"<<std::endl;
|
||||
OverlapWilsonPartialFractionTanhFermionR Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonPartialFractionTanhFermionR>(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonPartialFractionTanhFermionD>(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonPartialFractionZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonPartialFractionZolotarevFermionR Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestCGinversions<OverlapWilsonPartialFractionZolotarevFermionR>(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
OverlapWilsonPartialFractionZolotarevFermionD Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0);
|
||||
TestCGinversions<OverlapWilsonPartialFractionZolotarevFermionD>(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
|
||||
Grid_finalize();
|
||||
|
@@ -79,7 +79,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
RealD mass = 0.01;
|
||||
RealD M5 = 1.8;
|
||||
DomainWallFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5);
|
||||
DomainWallFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5);
|
||||
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
@@ -88,7 +88,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
GridStopWatch CGTimer;
|
||||
|
||||
SchurDiagMooeeOperator<DomainWallFermionR, LatticeFermion> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<DomainWallFermionD, LatticeFermion> HermOpEO(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-5, 10000, 0);// switch off the assert
|
||||
|
||||
CGTimer.Start();
|
||||
@@ -98,8 +98,5 @@ int main(int argc, char** argv) {
|
||||
std::cout << GridLogMessage << "Total CG time : " << CGTimer.Elapsed()
|
||||
<< std::endl;
|
||||
|
||||
std::cout << GridLogMessage << "######## Dhop calls summary" << std::endl;
|
||||
Ddwf.Report();
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
SchurRedBlackDiagMooeeSolve<LatticeFermion> SchurSolver(CG);
|
||||
|
@@ -70,9 +70,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-6,10000);
|
||||
CG(HermOp,src,result);
|
||||
|
||||
|
@@ -77,12 +77,12 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.5;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
MCR(HermOp,src,result);
|
||||
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> g5HermOp(Ddwf);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionD,LatticeFermion> g5HermOp(Ddwf);
|
||||
MCR(g5HermOp,src,result);
|
||||
|
||||
|
||||
|
@@ -77,12 +77,12 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.5;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with MdagM VPGCR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermOp(Ddwf);
|
||||
TrivialPrecon<LatticeFermion> simple;
|
||||
PrecGeneralisedConjugateResidual<LatticeFermion> PGCR(1.0e-6,10000,HermOp,simple,4,160);
|
||||
|
||||
@@ -92,7 +92,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with g5-VPGCR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> g5HermOp(Ddwf);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionD,LatticeFermion> g5HermOp(Ddwf);
|
||||
PrecGeneralisedConjugateResidual<LatticeFermion> PGCR5(1.0e-6,10000,g5HermOp,simple,4,160);
|
||||
result=Zero();
|
||||
PGCR5(src,result);
|
||||
|
@@ -254,7 +254,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
RealD mass=0.001;
|
||||
RealD M5=1.8;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
|
||||
typedef Aggregation<vSpinColourVector,vTComplex,nbasis> Subspace;
|
||||
typedef CoarsenedMatrix<vSpinColourVector,vTComplex,nbasis> CoarseOperator;
|
||||
@@ -263,7 +263,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Calling Aggregation class to build subspace" <<std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermDefOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionD,LatticeFermion> HermDefOp(Ddwf);
|
||||
|
||||
Subspace Aggregates(Coarse5d,FGrid,0);
|
||||
|
||||
@@ -290,7 +290,7 @@ int main (int argc, char ** argv)
|
||||
typedef CoarsenedMatrix<vSpinColourVector,vTComplex,nbasis> Level1Op;
|
||||
typedef CoarsenedMatrix<siteVector,iScalar<vTComplex>,nbasisc> Level2Op;
|
||||
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> HermIndefOp(Ddwf);
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionD,LatticeFermion> HermIndefOp(Ddwf);
|
||||
|
||||
Level1Op LDOp(*Coarse5d,*Coarse5dRB,1); LDOp.CoarsenOperator(FGrid,HermIndefOp,Aggregates);
|
||||
|
||||
@@ -351,16 +351,16 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Building 3 level Multigrid "<< std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
typedef MultiGridPreconditioner<vSpinColourVector, vTComplex,nbasis, DomainWallFermionR,DeflatedGuesser<CoarseVector> , NormalEquations<CoarseVector> > TwoLevelMG;
|
||||
typedef MultiGridPreconditioner<vSpinColourVector, vTComplex,nbasis, DomainWallFermionD,DeflatedGuesser<CoarseVector> , NormalEquations<CoarseVector> > TwoLevelMG;
|
||||
typedef MultiGridPreconditioner<siteVector,iScalar<vTComplex>,nbasisc,Level1Op, DeflatedGuesser<CoarseCoarseVector>, NormalEquations<CoarseCoarseVector> > CoarseMG;
|
||||
typedef MultiGridPreconditioner<vSpinColourVector, vTComplex,nbasis, DomainWallFermionR,ZeroGuesser<CoarseVector>, LinearFunction<CoarseVector> > ThreeLevelMG;
|
||||
typedef MultiGridPreconditioner<vSpinColourVector, vTComplex,nbasis, DomainWallFermionD,ZeroGuesser<CoarseVector>, LinearFunction<CoarseVector> > ThreeLevelMG;
|
||||
|
||||
// MultiGrid preconditioner acting on the coarse space <-> coarsecoarse space
|
||||
ChebyshevSmoother<CoarseVector, Level1Op > CoarseSmoother(0.1,12.0,3,L1LinOp,LDOp);
|
||||
ChebyshevSmoother<LatticeFermion,DomainWallFermionR> FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf);
|
||||
ChebyshevSmoother<LatticeFermion,DomainWallFermionD> FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf);
|
||||
|
||||
// MirsSmoother<CoarseVector, Level1Op > CoarseCGSmoother(0.1,0.1,4,L1LinOp,LDOp);
|
||||
// MirsSmoother<LatticeFermion,DomainWallFermionR> FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf);
|
||||
// MirsSmoother<LatticeFermion,DomainWallFermionD> FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf);
|
||||
|
||||
CoarseMG Level2Precon (CoarseAggregates, L2Op,
|
||||
L1LinOp,LDOp,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user