mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Simplifying Cayley cases.
This commit is contained in:
parent
020346c848
commit
a2e199df50
@ -26,13 +26,13 @@ Author: Peter Boyle <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_CAYLEY_FERMION_H
|
#pragma once
|
||||||
#define GRID_QCD_CAYLEY_FERMION_H
|
|
||||||
|
|
||||||
#include <Grid/qcd/action/fermion/WilsonFermion5D.h>
|
#include <Grid/qcd/action/fermion/WilsonFermion5D.h>
|
||||||
|
|
||||||
NAMESPACE_BEGIN(Grid);
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
|
||||||
|
#if 0
|
||||||
template<typename T> struct switcheroo {
|
template<typename T> struct switcheroo {
|
||||||
static inline int iscomplex() { return 0; }
|
static inline int iscomplex() { return 0; }
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ template<> struct switcheroo<ComplexF> {
|
|||||||
return a*b;
|
return a*b;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class Impl>
|
template<class Impl>
|
||||||
class CayleyFermion5D : public WilsonFermion5D<Impl>
|
class CayleyFermion5D : public WilsonFermion5D<Impl>
|
||||||
@ -81,27 +81,27 @@ public:
|
|||||||
virtual void M5D (const FermionField &psi, FermionField &chi);
|
virtual void M5D (const FermionField &psi, FermionField &chi);
|
||||||
virtual void M5Ddag(const FermionField &psi, FermionField &chi);
|
virtual void M5Ddag(const FermionField &psi, FermionField &chi);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
// Physical surface field utilities
|
// Physical surface field utilities
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
virtual void Dminus(const FermionField &psi, FermionField &chi);
|
virtual void Dminus(const FermionField &psi, FermionField &chi);
|
||||||
virtual void DminusDag(const FermionField &psi, FermionField &chi);
|
virtual void DminusDag(const FermionField &psi, FermionField &chi);
|
||||||
virtual void ExportPhysicalFermionSolution(const FermionField &solution5d,FermionField &exported4d);
|
virtual void ExportPhysicalFermionSolution(const FermionField &solution5d,FermionField &exported4d);
|
||||||
virtual void ExportPhysicalFermionSource(const FermionField &solution5d, FermionField &exported4d);
|
virtual void ExportPhysicalFermionSource(const FermionField &solution5d, FermionField &exported4d);
|
||||||
virtual void ImportPhysicalFermionSource(const FermionField &input4d,FermionField &imported5d);
|
virtual void ImportPhysicalFermionSource(const FermionField &input4d,FermionField &imported5d);
|
||||||
virtual void ImportUnphysicalFermion(const FermionField &solution5d, FermionField &exported4d);
|
virtual void ImportUnphysicalFermion(const FermionField &solution5d, FermionField &exported4d);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
|
||||||
// Support for MADWF tricks
|
|
||||||
///////////////////////////////////////////////////////////////
|
|
||||||
RealD Mass(void) { return mass; };
|
|
||||||
void SetMass(RealD _mass) {
|
|
||||||
mass=_mass;
|
|
||||||
SetCoefficientsInternal(_zolo_hi,_gamma,_b,_c); // Reset coeffs
|
|
||||||
} ;
|
|
||||||
void P(const FermionField &psi, FermionField &chi);
|
|
||||||
void Pdag(const FermionField &psi, FermionField &chi);
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
// Support for MADWF tricks
|
||||||
|
///////////////////////////////////////////////////////////////
|
||||||
|
RealD Mass(void) { return mass; };
|
||||||
|
void SetMass(RealD _mass) {
|
||||||
|
mass=_mass;
|
||||||
|
SetCoefficientsInternal(_zolo_hi,_gamma,_b,_c); // Reset coeffs
|
||||||
|
} ;
|
||||||
|
void P(const FermionField &psi, FermionField &chi);
|
||||||
|
void Pdag(const FermionField &psi, FermionField &chi);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
// Instantiate different versions depending on Impl
|
// Instantiate different versions depending on Impl
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
Vector<Coeff_t> &lower,
|
Vector<Coeff_t> &lower,
|
||||||
Vector<Coeff_t> &diag,
|
Vector<Coeff_t> &diag,
|
||||||
Vector<Coeff_t> &upper);
|
Vector<Coeff_t> &upper);
|
||||||
|
#if 0
|
||||||
void MooeeInternal(const FermionField &in, FermionField &out,int dag,int inv);
|
void MooeeInternal(const FermionField &in, FermionField &out,int dag,int inv);
|
||||||
void MooeeInternalCompute(int dag, int inv, Vector<iSinglet<Simd> > & Matp, Vector<iSinglet<Simd> > & Matm);
|
void MooeeInternalCompute(int dag, int inv, Vector<iSinglet<Simd> > & Matp, Vector<iSinglet<Simd> > & Matm);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
int LLs, int site,
|
int LLs, int site,
|
||||||
Vector<iSinglet<Simd> > &Matp,
|
Vector<iSinglet<Simd> > &Matp,
|
||||||
Vector<iSinglet<Simd> > &Matm);
|
Vector<iSinglet<Simd> > &Matm);
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual void Instantiatable(void)=0;
|
virtual void Instantiatable(void)=0;
|
||||||
|
|
||||||
@ -148,11 +148,11 @@ public:
|
|||||||
// protected:
|
// protected:
|
||||||
RealD mass;
|
RealD mass;
|
||||||
|
|
||||||
// Save arguments to SetCoefficientsInternal
|
// Save arguments to SetCoefficientsInternal
|
||||||
Vector<Coeff_t> _gamma;
|
Vector<Coeff_t> _gamma;
|
||||||
RealD _zolo_hi;
|
RealD _zolo_hi;
|
||||||
RealD _b;
|
RealD _b;
|
||||||
RealD _c;
|
RealD _c;
|
||||||
|
|
||||||
// Cayley form Moebius (tanh and zolotarev)
|
// Cayley form Moebius (tanh and zolotarev)
|
||||||
Vector<Coeff_t> omega;
|
Vector<Coeff_t> omega;
|
||||||
@ -187,8 +187,6 @@ public:
|
|||||||
GridRedBlackCartesian &FourDimRedBlackGrid,
|
GridRedBlackCartesian &FourDimRedBlackGrid,
|
||||||
RealD _mass,RealD _M5,const ImplParams &p= ImplParams());
|
RealD _mass,RealD _M5,const ImplParams &p= ImplParams());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CayleyReport(void);
|
void CayleyReport(void);
|
||||||
void CayleyZeroCounters(void);
|
void CayleyZeroCounters(void);
|
||||||
|
|
||||||
@ -208,21 +206,3 @@ protected:
|
|||||||
|
|
||||||
NAMESPACE_END(Grid);
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
#define INSTANTIATE_DPERP(A) \
|
|
||||||
template void CayleyFermion5D< A >::M5D(const FermionField &psi,const FermionField &phi,FermionField &chi, \
|
|
||||||
Vector<Coeff_t> &lower,Vector<Coeff_t> &diag,Vector<Coeff_t> &upper); \
|
|
||||||
template void CayleyFermion5D< A >::M5Ddag(const FermionField &psi,const FermionField &phi,FermionField &chi, \
|
|
||||||
Vector<Coeff_t> &lower,Vector<Coeff_t> &diag,Vector<Coeff_t> &upper); \
|
|
||||||
template void CayleyFermion5D< A >::MooeeInv (const FermionField &psi, FermionField &chi); \
|
|
||||||
template void CayleyFermion5D< A >::MooeeInvDag (const FermionField &psi, FermionField &chi);
|
|
||||||
|
|
||||||
#ifdef GRID_NVCC
|
|
||||||
#define CAYLEY_DPERP_GPU
|
|
||||||
#else
|
|
||||||
#undef CAYLEY_DPERP_DENSE
|
|
||||||
#define CAYLEY_DPERP_CACHE
|
|
||||||
#undef CAYLEY_DPERP_LINALG
|
|
||||||
#endif
|
|
||||||
#define CAYLEY_DPERP_VEC
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user