1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Rework/global edit to enforce type templating of fermion operators.

Allows multi-precision work and paves the way for alternate BC's and such like
allowing for example G-parity which is important for K pipi programme.
In particular, can drive an extra flavour index into the fermion fields
using template types.
This commit is contained in:
Peter Boyle
2015-08-10 20:47:44 +01:00
parent a01aa156b9
commit 84a66476ab
65 changed files with 1935 additions and 1579 deletions

View File

@ -7,13 +7,16 @@ namespace Grid {
namespace QCD {
class MobiusFermion : public CayleyFermion5D
template<class Impl>
class MobiusFermion : public CayleyFermion5D<Impl>
{
public:
#include <qcd/action/fermion/FermionImplTypedefs.h>
public:
virtual void Instantiatable(void) {};
// Constructors
MobiusFermion(LatticeGaugeField &_Umu,
MobiusFermion(GaugeField &_Umu,
GridCartesian &FiveDimGrid,
GridRedBlackCartesian &FiveDimRedBlackGrid,
GridCartesian &FourDimGrid,
@ -21,7 +24,7 @@ namespace Grid {
RealD _mass,RealD _M5,
RealD b, RealD c) :
CayleyFermion5D(_Umu,
CayleyFermion5D<Impl>(_Umu,
FiveDimGrid,
FiveDimRedBlackGrid,
FourDimGrid,
@ -30,12 +33,12 @@ namespace Grid {
{
RealD eps = 1.0;
std::cout<<GridLogMessage << "MobiusFermion (b="<<b<<",c="<<c<<") with Ls= "<<Ls<<" Tanh approx"<<std::endl;
std::cout<<GridLogMessage << "MobiusFermion (b="<<b<<",c="<<c<<") with Ls= "<<this->Ls<<" Tanh approx"<<std::endl;
Approx::zolotarev_data *zdata = Approx::higham(eps,this->Ls);// eps is ignored for higham
assert(zdata->n==this->Ls);
// Call base setter
this->CayleyFermion5D::SetCoefficientsTanh(zdata,b,c);
this->SetCoefficientsTanh(zdata,b,c);
Approx::zolotarev_free(zdata);