mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Namespace, indent
This commit is contained in:
parent
044a292281
commit
e5535f4d72
@ -26,75 +26,75 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
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_ABSTRACT_EOFA_FERMION_H
|
#ifndef GRID_QCD_ABSTRACT_EOFA_FERMION_H
|
||||||
#define GRID_QCD_ABSTRACT_EOFA_FERMION_H
|
#define GRID_QCD_ABSTRACT_EOFA_FERMION_H
|
||||||
|
|
||||||
#include <Grid/qcd/action/fermion/CayleyFermion5D.h>
|
#include <Grid/qcd/action/fermion/CayleyFermion5D.h>
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD {
|
|
||||||
|
|
||||||
// DJM: Abstract base class for EOFA fermion types.
|
// DJM: Abstract base class for EOFA fermion types.
|
||||||
// Defines layout of additional EOFA-specific parameters and operators.
|
// Defines layout of additional EOFA-specific parameters and operators.
|
||||||
// Use to construct EOFA pseudofermion actions that are agnostic to
|
// Use to construct EOFA pseudofermion actions that are agnostic to
|
||||||
// Shamir / Mobius / etc., and ensure that no one can construct EOFA
|
// Shamir / Mobius / etc., and ensure that no one can construct EOFA
|
||||||
// pseudofermion action with non-EOFA fermion type.
|
// pseudofermion action with non-EOFA fermion type.
|
||||||
template<class Impl>
|
template<class Impl>
|
||||||
class AbstractEOFAFermion : public CayleyFermion5D<Impl> {
|
class AbstractEOFAFermion : public CayleyFermion5D<Impl> {
|
||||||
public:
|
public:
|
||||||
INHERIT_IMPL_TYPES(Impl);
|
INHERIT_IMPL_TYPES(Impl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Fermion operator: D(mq1) + shift*\gamma_{5}*R_{5}*\Delta_{\pm}(mq2,mq3)*P_{\pm}
|
// Fermion operator: D(mq1) + shift*\gamma_{5}*R_{5}*\Delta_{\pm}(mq2,mq3)*P_{\pm}
|
||||||
RealD mq1;
|
RealD mq1;
|
||||||
RealD mq2;
|
RealD mq2;
|
||||||
RealD mq3;
|
RealD mq3;
|
||||||
RealD shift;
|
RealD shift;
|
||||||
int pm;
|
int pm;
|
||||||
|
|
||||||
RealD alpha; // Mobius scale
|
RealD alpha; // Mobius scale
|
||||||
RealD k; // EOFA normalization constant
|
RealD k; // EOFA normalization constant
|
||||||
|
|
||||||
virtual void Instantiatable(void) = 0;
|
virtual void Instantiatable(void) = 0;
|
||||||
|
|
||||||
// EOFA-specific operations
|
// EOFA-specific operations
|
||||||
// Force user to implement in derived classes
|
// Force user to implement in derived classes
|
||||||
virtual void Omega (const FermionField& in, FermionField& out, int sign, int dag) = 0;
|
virtual void Omega (const FermionField& in, FermionField& out, int sign, int dag) = 0;
|
||||||
virtual void Dtilde (const FermionField& in, FermionField& out) = 0;
|
virtual void Dtilde (const FermionField& in, FermionField& out) = 0;
|
||||||
virtual void DtildeInv(const FermionField& in, FermionField& out) = 0;
|
virtual void DtildeInv(const FermionField& in, FermionField& out) = 0;
|
||||||
|
|
||||||
// Implement derivatives in base class:
|
// Implement derivatives in base class:
|
||||||
// for EOFA both DWF and Mobius just need d(Dw)/dU
|
// for EOFA both DWF and Mobius just need d(Dw)/dU
|
||||||
virtual void MDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
virtual void MDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
||||||
this->DhopDeriv(mat, U, V, dag);
|
this->DhopDeriv(mat, U, V, dag);
|
||||||
};
|
|
||||||
virtual void MoeDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
|
||||||
this->DhopDerivOE(mat, U, V, dag);
|
|
||||||
};
|
|
||||||
virtual void MeoDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
|
||||||
this->DhopDerivEO(mat, U, V, dag);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Recompute 5D coefficients for different value of shift constant
|
|
||||||
// (needed for heatbath loop over poles)
|
|
||||||
virtual void RefreshShiftCoefficients(RealD new_shift) = 0;
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
AbstractEOFAFermion(GaugeField& _Umu, GridCartesian& FiveDimGrid, GridRedBlackCartesian& FiveDimRedBlackGrid,
|
|
||||||
GridCartesian& FourDimGrid, GridRedBlackCartesian& FourDimRedBlackGrid,
|
|
||||||
RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int _pm,
|
|
||||||
RealD _M5, RealD _b, RealD _c, const ImplParams& p=ImplParams())
|
|
||||||
: CayleyFermion5D<Impl>(_Umu, FiveDimGrid, FiveDimRedBlackGrid, FourDimGrid, FourDimRedBlackGrid,
|
|
||||||
_mq1, _M5, p), mq1(_mq1), mq2(_mq2), mq3(_mq3), shift(_shift), pm(_pm)
|
|
||||||
{
|
|
||||||
int Ls = this->Ls;
|
|
||||||
this->alpha = _b + _c;
|
|
||||||
this->k = this->alpha * (_mq3-_mq2) * std::pow(this->alpha+1.0,2*Ls) /
|
|
||||||
( std::pow(this->alpha+1.0,Ls) + _mq2*std::pow(this->alpha-1.0,Ls) ) /
|
|
||||||
( std::pow(this->alpha+1.0,Ls) + _mq3*std::pow(this->alpha-1.0,Ls) );
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}}
|
virtual void MoeDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
||||||
|
this->DhopDerivOE(mat, U, V, dag);
|
||||||
|
};
|
||||||
|
virtual void MeoDeriv(GaugeField& mat, const FermionField& U, const FermionField& V, int dag){
|
||||||
|
this->DhopDerivEO(mat, U, V, dag);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Recompute 5D coefficients for different value of shift constant
|
||||||
|
// (needed for heatbath loop over poles)
|
||||||
|
virtual void RefreshShiftCoefficients(RealD new_shift) = 0;
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
AbstractEOFAFermion(GaugeField& _Umu, GridCartesian& FiveDimGrid, GridRedBlackCartesian& FiveDimRedBlackGrid,
|
||||||
|
GridCartesian& FourDimGrid, GridRedBlackCartesian& FourDimRedBlackGrid,
|
||||||
|
RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int _pm,
|
||||||
|
RealD _M5, RealD _b, RealD _c, const ImplParams& p=ImplParams())
|
||||||
|
: CayleyFermion5D<Impl>(_Umu, FiveDimGrid, FiveDimRedBlackGrid, FourDimGrid, FourDimRedBlackGrid,
|
||||||
|
_mq1, _M5, p), mq1(_mq1), mq2(_mq2), mq3(_mq3), shift(_shift), pm(_pm)
|
||||||
|
{
|
||||||
|
int Ls = this->Ls;
|
||||||
|
this->alpha = _b + _c;
|
||||||
|
this->k = this->alpha * (_mq3-_mq2) * std::pow(this->alpha+1.0,2*Ls) /
|
||||||
|
( std::pow(this->alpha+1.0,Ls) + _mq2*std::pow(this->alpha-1.0,Ls) ) /
|
||||||
|
( std::pow(this->alpha+1.0,Ls) + _mq3*std::pow(this->alpha-1.0,Ls) );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user