mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Scaled Shamir and Scaled Shamir Zolotarev aliases for special cases of Mobius.
This commit is contained in:
parent
5916386242
commit
343d039b37
@ -41,7 +41,8 @@
|
||||
#include <qcd/action/fermion/DomainWallFermion.h>
|
||||
#include <qcd/action/fermion/MobiusFermion.h>
|
||||
#include <qcd/action/fermion/MobiusZolotarevFermion.h>
|
||||
//#include <qcd/action/fermion/ScaledShamirCayleyTanh.h>
|
||||
#include <qcd/action/fermion/ScaledShamirFermion.h>
|
||||
#include <qcd/action/fermion/ScaledShamirZolotarevFermion.h>
|
||||
|
||||
|
||||
// Chroma interface defining FermionAction
|
||||
|
@ -1,51 +0,0 @@
|
||||
#ifndef GRID_QCD_DOMAIN_WALL_FERMION_H
|
||||
#define GRID_QCD_DOMAIN_WALL_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class ScaledShamirFermion : public CayleyFermion5D
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
ScaledShamirFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5, RealD scale) :
|
||||
|
||||
CayleyFermion5D(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,
|
||||
RealD b,
|
||||
RealD c)
|
||||
|
||||
{
|
||||
RealD eps = 1.0;
|
||||
|
||||
Approx::zolotarev_data *zdata = Approx::grid_higham(eps,this->Ls);// eps is ignored for higham
|
||||
assert(zdata->n==this->Ls);
|
||||
|
||||
//b+c = scale;
|
||||
//b-c = 1
|
||||
//b = 0.5(scale+1);
|
||||
//c = 0.5(scale-1);
|
||||
|
||||
// Call base setter
|
||||
this->CayleyFermion5D::SetCoefficients(1.0,zdata,0.5*(scale+1.0),0.5*(scale-1.0));
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
37
lib/qcd/action/fermion/ScaledShamirFermion.h
Normal file
37
lib/qcd/action/fermion/ScaledShamirFermion.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef GRID_QCD_SCALED_SHAMIR_FERMION_H
|
||||
#define GRID_QCD_SCALED_SHAMIR_FERMION_H
|
||||
|
||||
#include <Grid.h>
|
||||
|
||||
namespace Grid {
|
||||
|
||||
namespace QCD {
|
||||
|
||||
class ScaledShamirFermion : public MobiusFermion
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
ScaledShamirFermion(LatticeGaugeField &_Umu,
|
||||
GridCartesian &FiveDimGrid,
|
||||
GridRedBlackCartesian &FiveDimRedBlackGrid,
|
||||
GridCartesian &FourDimGrid,
|
||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||
RealD _mass,RealD _M5,
|
||||
RealD scale) :
|
||||
|
||||
// b+c=scale, b-c = 1 <=> 2b = scale+1; 2c = scale-1
|
||||
MobiusFermion(_Umu,
|
||||
FiveDimGrid,
|
||||
FiveDimRedBlackGrid,
|
||||
FourDimGrid,
|
||||
FourDimRedBlackGrid,_mass,_M5,0.5*(scale+1.0),0.5*(scale-1.0))
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
39
lib/qcd/action/fermion/ScaledShamirZolotarevFermion.h
Normal file
39
lib/qcd/action/fermion/ScaledShamirZolotarevFermion.h
Normal file
@ -0,0 +1,39 @@
|
||||
#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
|
@ -56,9 +56,15 @@ int main (int argc, char ** argv)
|
||||
MobiusFermion Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
TestWhat<MobiusFermion>(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5);
|
||||
|
||||
MobiusZolotarevFermion Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,4.0);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user