mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-11 22:50:45 +01:00
More in the clover fermion class
This commit is contained in:
parent
a04eb7df5d
commit
5fdc05782b
@ -1,12 +1,13 @@
|
|||||||
/*************************************************************************************
|
/*************************************************************************************
|
||||||
|
|
||||||
Grid physics library, www.github.com/paboyle/Grid
|
Grid physics library, www.github.com/paboyle/Grid
|
||||||
|
|
||||||
Source file: ./lib/qcd/action/fermion/WilsonTMFermion.h
|
Source file: ./lib/qcd/action/fermion/WilsonTMFermion.h
|
||||||
|
|
||||||
Copyright (C) 2015
|
Copyright (C) 2017
|
||||||
|
|
||||||
Author: paboyle <paboyle@ph.ed.ac.uk>
|
Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||||
|
Author: Guido Cossu <guido.cossu@ed.ac.uk>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -24,53 +25,47 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
|
|
||||||
See the full license in the file "LICENSE" in the top level distribution directory
|
See the full license in the file "LICENSE" in the top level distribution directory
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
#ifndef GRID_QCD_WILSON_TM_FERMION_H
|
#ifndef GRID_QCD_WILSON_CLOVER_FERMION_H
|
||||||
#define GRID_QCD_WILSON_TM_FERMION_H
|
#define GRID_QCD_WILSON_CLOVER_FERMION_H
|
||||||
|
|
||||||
#include <Grid/Grid.h>
|
#include <Grid/Grid.h>
|
||||||
|
|
||||||
namespace Grid {
|
namespace Grid {
|
||||||
|
namespace QCD {
|
||||||
|
|
||||||
namespace QCD {
|
template <class Impl>
|
||||||
|
class WilsonCloverFermion : public WilsonFermion<Impl> {
|
||||||
|
public:
|
||||||
|
INHERIT_IMPL_TYPES(Impl);
|
||||||
|
|
||||||
template<class Impl>
|
public:
|
||||||
class WilsonTMFermion : public WilsonFermion<Impl>
|
virtual void Instantiatable(void){};
|
||||||
{
|
// Constructors
|
||||||
public:
|
WilsonCloverFermion(GaugeField &_Umu, GridCartesian &Fgrid,
|
||||||
INHERIT_IMPL_TYPES(Impl);
|
GridRedBlackCartesian &Hgrid,
|
||||||
public:
|
RealD _mass,
|
||||||
|
RealD _csw,
|
||||||
|
const ImplParams &p = ImplParams()) : WilsonFermion<Impl>(_Umu,
|
||||||
|
Fgrid,
|
||||||
|
Hgrid,
|
||||||
|
_mass, p)
|
||||||
|
{
|
||||||
|
csw = _csw;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Instantiatable(void) {};
|
virtual RealD M(const FermionField& in, FermionField& out);
|
||||||
// Constructors
|
virtual RealD Mdag(const FermionField& in, FermionField& out);
|
||||||
WilsonTMFermion(GaugeField &_Umu,
|
|
||||||
GridCartesian &Fgrid,
|
|
||||||
GridRedBlackCartesian &Hgrid,
|
|
||||||
RealD _mass,
|
|
||||||
RealD _mu,
|
|
||||||
const ImplParams &p= ImplParams()
|
|
||||||
) :
|
|
||||||
WilsonFermion<Impl>(_Umu,
|
|
||||||
Fgrid,
|
|
||||||
Hgrid,
|
|
||||||
_mass,p)
|
|
||||||
|
|
||||||
{
|
virtual void Mooee(const FermionField &in, FermionField &out);
|
||||||
mu = _mu;
|
virtual void MooeeDag(const FermionField &in, FermionField &out);
|
||||||
}
|
virtual void MooeeInv(const FermionField &in, FermionField &out);
|
||||||
|
virtual void MooeeInvDag(const FermionField &in, FermionField &out);
|
||||||
|
|
||||||
|
private:
|
||||||
|
RealD csw; // Clover coefficient
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// allow override for twisted mass and clover
|
#endif // GRID_QCD_WILSON_CLOVER_FERMION_H
|
||||||
virtual void Mooee(const FermionField &in, FermionField &out) ;
|
|
||||||
virtual void MooeeDag(const FermionField &in, FermionField &out) ;
|
|
||||||
virtual void MooeeInv(const FermionField &in, FermionField &out) ;
|
|
||||||
virtual void MooeeInvDag(const FermionField &in, FermionField &out) ;
|
|
||||||
|
|
||||||
private:
|
|
||||||
RealD mu; // TwistedMass parameter
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -65,8 +65,8 @@ class WilsonFermion : public WilsonKernels<Impl>, public WilsonFermionStatic {
|
|||||||
// override multiply; cut number routines if pass dagger argument
|
// override multiply; cut number routines if pass dagger argument
|
||||||
// and also make interface more uniformly consistent
|
// and also make interface more uniformly consistent
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
RealD M(const FermionField &in, FermionField &out);
|
virtual RealD M(const FermionField &in, FermionField &out);
|
||||||
RealD Mdag(const FermionField &in, FermionField &out);
|
virtual RealD Mdag(const FermionField &in, FermionField &out);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
// half checkerboard operations
|
// half checkerboard operations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user