mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Overlap Wilson Cayley tanh & zolo
This commit is contained in:
parent
26e9b04fab
commit
8fe3d4f971
@ -30,19 +30,36 @@
|
||||
//#include <qcd/action/fermion/CloverFermion.h>
|
||||
|
||||
////////////////////////////////////////////
|
||||
// 5D formulations
|
||||
// 5D formulations...
|
||||
////////////////////////////////////////////
|
||||
|
||||
#include <qcd/action/fermion/WilsonFermion5D.h> // used by all 5d overlap types
|
||||
|
||||
//////////
|
||||
// Cayley
|
||||
//////////
|
||||
#include <qcd/action/fermion/CayleyFermion5D.h>
|
||||
#include <qcd/action/fermion/ContinuedFractionFermion5D.h>
|
||||
//#include <qcd/action/fermion/PartialFraction.h>
|
||||
|
||||
#include <qcd/action/fermion/DomainWallFermion.h>
|
||||
#include <qcd/action/fermion/DomainWallFermion.h>
|
||||
|
||||
#include <qcd/action/fermion/MobiusFermion.h>
|
||||
#include <qcd/action/fermion/MobiusZolotarevFermion.h>
|
||||
#include <qcd/action/fermion/ScaledShamirFermion.h>
|
||||
#include <qcd/action/fermion/ScaledShamirZolotarevFermion.h>
|
||||
#include <qcd/action/fermion/OverlapWilsonCayleyTanhFermion.h>
|
||||
|
||||
#include <qcd/action/fermion/MobiusZolotarevFermion.h>
|
||||
#include <qcd/action/fermion/ShamirZolotarevFermion.h>
|
||||
#include <qcd/action/fermion/OverlapWilsonCayleyZolotarevFermion.h>
|
||||
|
||||
//////////////////////
|
||||
// Continued fraction
|
||||
//////////////////////
|
||||
#include <qcd/action/fermion/ContinuedFractionFermion5D.h>
|
||||
|
||||
//////////////////////
|
||||
// Partial fraction
|
||||
//////////////////////
|
||||
#include <qcd/action/fermion/PartialFractionFermion5D.h>
|
||||
|
||||
|
||||
// Chroma interface defining FermionAction
|
||||
|
@ -34,6 +34,7 @@ namespace Grid {
|
||||
assert(zdata->n==this->Ls);
|
||||
|
||||
std::cout << "MobiusZolotarevFermion (b="<<b<<",c="<<c<<") with Ls= "<<Ls<<" Zolotarev range ["<<lo<<","<<hi<<"]"<<std::endl;
|
||||
std::cout << "MobiusZolotarevFermion : note there is a degeneracy between (b+c) and Zolo param hi"<<std::endl;
|
||||
|
||||
// Call base setter
|
||||
this->CayleyFermion5D::SetCoefficients(1.0,zdata,b,c);
|
||||
|
34
lib/qcd/action/fermion/OverlapWilsonCayleyTanhFermion.h
Normal file
34
lib/qcd/action/fermion/OverlapWilsonCayleyTanhFermion.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||
#define OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class OverlapWilsonCayleyTanhFermion : public MobiusFermion
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
OverlapWilsonCayleyTanhFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
RealD scale) :
|
||||
|
||||
// b+c=scale, b-c = 0 <=> b =c = scale/2
|
||||
MobiusFermion(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,0.5*scale,0.5*scale)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
37
lib/qcd/action/fermion/OverlapWilsonCayleyZolotarevFermion.h
Normal file
37
lib/qcd/action/fermion/OverlapWilsonCayleyZolotarevFermion.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef OVERLAP_WILSON_CAYLEY_ZOLOTAREV_FERMION_H
|
||||
#define OVERLAP_WILSON_CAYLEY_ZOLOTAREV_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class OverlapWilsonCayleyZolotarevFermion : public MobiusZolotarevFermion
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
OverlapWilsonCayleyZolotarevFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
RealD lo, RealD hi) :
|
||||
// b+c=1.0, b-c = 0 <=> b =c = 1/2
|
||||
MobiusZolotarevFermion(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,0.5,0.5,lo,hi)
|
||||
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -25,10 +25,10 @@ namespace Grid {
|
||||
|
||||
virtual void PartialFractionCoefficients(void);
|
||||
|
||||
zolotarev_data *zdata;
|
||||
Approx::zolotarev_data *zdata;
|
||||
|
||||
// Part frac
|
||||
double R=(1+this->mass)/(1-this->mass);
|
||||
double R;
|
||||
std::vector<double> p;
|
||||
std::vector<double> q;
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
#ifndef GRID_QCD_SCALED_SHAMIR_ZOLOTAREV_FERMION_H
|
||||
#define GRID_QCD_SCALED_SHAMIR_ZOLOTAREV_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class ScaledShamirZolotarevFermion : public MobiusZolotarevFermion
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
ScaledShamirZolotarevFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
RealD scale,
|
||||
RealD lo, RealD hi) :
|
||||
|
||||
MobiusZolotarevFermion(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,0.5*(scale+1.0),0.5*(scale-1.0),lo,hi)
|
||||
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
39
lib/qcd/action/fermion/ShamirZolotarevFermion.h
Normal file
39
lib/qcd/action/fermion/ShamirZolotarevFermion.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef GRID_QCD_SHAMIR_ZOLOTAREV_FERMION_H
|
||||
#define GRID_QCD_SHAMIR_ZOLOTAREV_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class ShamirZolotarevFermion : public MobiusZolotarevFermion
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
ShamirZolotarevFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
RealD lo, RealD hi) :
|
||||
|
||||
// b+c = 1; b-c = 1 => b=1, c=0
|
||||
MobiusZolotarevFermion(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,1.0,0.0,lo,hi)
|
||||
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -89,9 +89,17 @@ int main (int argc, char ** argv)
|
||||
ScaledShamirFermion Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestCGinversions<ScaledShamirFermion>(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"ScaledShamirZolotarevFermion test"<<std::endl;
|
||||
ScaledShamirZolotarevFermion Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0,0.1,2.0);
|
||||
TestCGinversions<ScaledShamirZolotarevFermion>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
std::cout <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
ShamirZolotarevFermion Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<ShamirZolotarevFermion>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermion Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestCGinversions<OverlapWilsonCayleyTanhFermion>(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyZolotarevFermion Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestCGinversions<OverlapWilsonCayleyZolotarevFermion>(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@ -48,23 +48,36 @@ int main (int argc, char ** argv)
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD M5 =1.8;
|
||||
std::cout <<"DomainWallFermion test"<<std::endl;
|
||||
DomainWallFermion Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
TestWhat<DomainWallFermion>(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::cout <<"MobiusFermion test"<<std::endl;
|
||||
MobiusFermion Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermion>(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"MobiusZolotarevFermion test"<<std::endl;
|
||||
MobiusZolotarevFermion Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
TestWhat<MobiusZolotarevFermion>(Dzolo,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"ScaledShamirFermion test"<<std::endl;
|
||||
ScaledShamirFermion Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
TestWhat<ScaledShamirFermion>(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
ScaledShamirZolotarevFermion Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0,0.1,2.0);
|
||||
TestWhat<ScaledShamirZolotarevFermion>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
ShamirZolotarevFermion Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<ShamirZolotarevFermion>(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermion Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
TestWhat<OverlapWilsonCayleyTanhFermion>(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
std::cout <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
OverlapWilsonCayleyZolotarevFermion Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermion>(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user