mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 03:05:55 +01:00
Implementing the Hw kernel continued fraction 5d overlap cases
This commit is contained in:
parent
802e94e9ca
commit
1ad689e4d5
@ -55,6 +55,8 @@
|
|||||||
// Continued fraction
|
// Continued fraction
|
||||||
//////////////////////
|
//////////////////////
|
||||||
#include <qcd/action/fermion/ContinuedFractionFermion5D.h>
|
#include <qcd/action/fermion/ContinuedFractionFermion5D.h>
|
||||||
|
#include <qcd/action/fermion/OverlapWilsonContfracTanhFermion.h>
|
||||||
|
#include <qcd/action/fermion/OverlapWilsonContfracZolotarevFermion.h>
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
// Partial fraction
|
// Partial fraction
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
namespace Grid {
|
namespace Grid {
|
||||||
namespace QCD {
|
namespace QCD {
|
||||||
|
|
||||||
void ContinuedFractionFermion5D::SetCoefficientsTanh(Approx::zolotarev_data *zdata,RealD b,RealD c)
|
void ContinuedFractionFermion5D::SetCoefficientsTanh(Approx::zolotarev_data *zdata,RealD scale)
|
||||||
{
|
{
|
||||||
SetCoefficientsZolotarev(1.0,zdata,b,c);
|
SetCoefficientsZolotarev(1.0/scale,zdata);
|
||||||
}
|
}
|
||||||
void ContinuedFractionFermion5D::SetCoefficientsZolotarev(RealD zolo_hi,Approx::zolotarev_data *zdata,RealD b,RealD c)
|
void ContinuedFractionFermion5D::SetCoefficientsZolotarev(RealD zolo_hi,Approx::zolotarev_data *zdata)
|
||||||
{
|
{
|
||||||
R=(1+this->mass)/(1-this->mass);
|
R=(1+this->mass)/(1-this->mass);
|
||||||
|
|
||||||
@ -164,9 +164,6 @@ namespace Grid {
|
|||||||
mass(_mass)
|
mass(_mass)
|
||||||
{
|
{
|
||||||
assert((Ls&0x1)==1); // Odd Ls required
|
assert((Ls&0x1)==1); // Odd Ls required
|
||||||
int nrational=Ls-1;// Even rational order
|
|
||||||
zdata = Approx::grid_higham(1.0,nrational);// eps is ignored for higham
|
|
||||||
SetCoefficientsTanh(zdata,1.0,0.0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace Grid {
|
|||||||
virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out);
|
virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out);
|
||||||
|
|
||||||
// virtual void Instantiatable(void)=0;
|
// virtual void Instantiatable(void)=0;
|
||||||
virtual void Instantiatable(void) {};
|
virtual void Instantiatable(void) =0;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
ContinuedFractionFermion5D(LatticeGaugeField &_Umu,
|
ContinuedFractionFermion5D(LatticeGaugeField &_Umu,
|
||||||
@ -34,8 +34,8 @@ namespace Grid {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void SetCoefficientsTanh(Approx::zolotarev_data *zdata,RealD b,RealD c);
|
void SetCoefficientsTanh(Approx::zolotarev_data *zdata,RealD scale);
|
||||||
void SetCoefficientsZolotarev(RealD zolo_hi,Approx::zolotarev_data *zdata,RealD b,RealD c);
|
void SetCoefficientsZolotarev(RealD zolo_hi,Approx::zolotarev_data *zdata);;
|
||||||
|
|
||||||
Approx::zolotarev_data *zdata;
|
Approx::zolotarev_data *zdata;
|
||||||
|
|
||||||
|
39
lib/qcd/action/fermion/OverlapWilsonContfracTanhFermion.h
Normal file
39
lib/qcd/action/fermion/OverlapWilsonContfracTanhFermion.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#ifndef OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||||
|
#define OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||||
|
|
||||||
|
#include <Grid.h>
|
||||||
|
|
||||||
|
namespace Grid {
|
||||||
|
|
||||||
|
namespace QCD {
|
||||||
|
|
||||||
|
class OverlapWilsonContFracTanhFermion : public ContinuedFractionFermion5D
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void Instantiatable(void){};
|
||||||
|
// Constructors
|
||||||
|
OverlapWilsonContFracTanhFermion(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
|
||||||
|
ContinuedFractionFermion5D(_Umu,
|
||||||
|
FiveDimGrid,
|
||||||
|
FiveDimRedBlackGrid,
|
||||||
|
FourDimGrid,
|
||||||
|
FourDimRedBlackGrid,_mass)
|
||||||
|
{
|
||||||
|
assert((Ls&0x1)==1); // Odd Ls required
|
||||||
|
int nrational=Ls-1;// Even rational order
|
||||||
|
zdata = Approx::grid_higham(1.0,nrational);// eps is ignored for higham
|
||||||
|
SetCoefficientsTanh(zdata,scale);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,44 @@
|
|||||||
|
#ifndef OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||||
|
#define OVERLAP_WILSON_CAYLEY_TANH_FERMION_H
|
||||||
|
|
||||||
|
#include <Grid.h>
|
||||||
|
|
||||||
|
namespace Grid {
|
||||||
|
|
||||||
|
namespace QCD {
|
||||||
|
|
||||||
|
class OverlapWilsonContFracZolotarevFermion : public ContinuedFractionFermion5D
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void Instantiatable(void){};
|
||||||
|
// Constructors
|
||||||
|
OverlapWilsonContFracZolotarevFermion(LatticeGaugeField &_Umu,
|
||||||
|
GridCartesian &FiveDimGrid,
|
||||||
|
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||||
|
GridCartesian &FourDimGrid,
|
||||||
|
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||||
|
RealD _mass,RealD _M5,
|
||||||
|
RealD lo,RealD hi):
|
||||||
|
|
||||||
|
// b+c=scale, b-c = 0 <=> b =c = scale/2
|
||||||
|
ContinuedFractionFermion5D(_Umu,
|
||||||
|
FiveDimGrid,
|
||||||
|
FiveDimRedBlackGrid,
|
||||||
|
FourDimGrid,
|
||||||
|
FourDimRedBlackGrid,_mass)
|
||||||
|
{
|
||||||
|
assert((Ls&0x1)==1); // Odd Ls required
|
||||||
|
|
||||||
|
int nrational=Ls-1;// Even rational order
|
||||||
|
RealD eps = lo/hi;
|
||||||
|
|
||||||
|
Approx::zolotarev_data *zdata = Approx::grid_zolotarev(eps,nrational,0);
|
||||||
|
|
||||||
|
SetCoefficientsZolotarev(hi,zdata);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user