mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-18 07:47:06 +01:00
Populating Clover fermions methods
This commit is contained in:
@ -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.cc
|
||||
Source file: ./lib/qcd/action/fermion/WilsonCloverFermion.cc
|
||||
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -24,75 +25,82 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
#include <Grid/qcd/spin/Dirac.h>
|
||||
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
|
||||
/*
|
||||
* BF sequence
|
||||
*
|
||||
void bfmbase<Float>::MooeeInv(Fermion_t psi,
|
||||
Fermion_t chi,
|
||||
int dag, int cb)
|
||||
template <class Impl>
|
||||
void WilsonCloverFermion<Impl>::AddCloverTerm(const FermionField& in,
|
||||
FermionField& out){
|
||||
FermionField tmp(out._grid);
|
||||
tmp = zero;
|
||||
// the product sigma_munu Fmunu is hermitian
|
||||
tmp += Bx*(Gamma(Gamma::Algebra::SigmaYZ)*in);
|
||||
tmp += By*(Gamma(Gamma::Algebra::MinusSigmaXZ)*in);
|
||||
tmp += Bz*(Gamma(Gamma::Algebra::SigmaXY)*in);
|
||||
tmp += Ex*(Gamma(Gamma::Algebra::MinusSigmaXT)*in);
|
||||
tmp += Ey*(Gamma(Gamma::Algebra::MinusSigmaYT)*in);
|
||||
tmp += Ez*(Gamma(Gamma::Algebra::MinusSigmaZT)*in);
|
||||
out += tmp*csw; // check signs
|
||||
|
||||
double m = this->mass;
|
||||
double tm = this->twistedmass;
|
||||
double mtil = 4.0+this->mass;
|
||||
}
|
||||
|
||||
double sq = mtil*mtil + tm*tm;
|
||||
|
||||
double a = mtil/sq;
|
||||
double b = -tm /sq;
|
||||
if(dag) b=-b;
|
||||
axpibg5x(chi,psi,a,b);
|
||||
|
||||
void bfmbase<Float>::Mooee(Fermion_t psi,
|
||||
Fermion_t chi,
|
||||
int dag,int cb)
|
||||
double a = 4.0+this->mass;
|
||||
double b = this->twistedmass;
|
||||
if(dag) b=-b;
|
||||
axpibg5x(chi,psi,a,b);
|
||||
*/
|
||||
|
||||
template<class Impl>
|
||||
void WilsonTMFermion<Impl>::Mooee(const FermionField &in, FermionField &out) {
|
||||
RealD a = 4.0+this->mass;
|
||||
RealD b = this->mu;
|
||||
template <class Impl>
|
||||
RealD WilsonCloverFermion<Impl>::M(const FermionField& in, FermionField& out) {
|
||||
// Wilson term
|
||||
out.checkerboard = in.checkerboard;
|
||||
axpibg5x(out,in,a,b);
|
||||
}
|
||||
template<class Impl>
|
||||
void WilsonTMFermion<Impl>::MooeeDag(const FermionField &in, FermionField &out) {
|
||||
RealD a = 4.0+this->mass;
|
||||
RealD b = -this->mu;
|
||||
out.checkerboard = in.checkerboard;
|
||||
axpibg5x(out,in,a,b);
|
||||
}
|
||||
template<class Impl>
|
||||
void WilsonTMFermion<Impl>::MooeeInv(const FermionField &in, FermionField &out) {
|
||||
RealD m = this->mass;
|
||||
RealD tm = this->mu;
|
||||
RealD mtil = 4.0+this->mass;
|
||||
RealD sq = mtil*mtil+tm*tm;
|
||||
RealD a = mtil/sq;
|
||||
RealD b = -tm /sq;
|
||||
axpibg5x(out,in,a,b);
|
||||
}
|
||||
template<class Impl>
|
||||
void WilsonTMFermion<Impl>::MooeeInvDag(const FermionField &in, FermionField &out) {
|
||||
RealD m = this->mass;
|
||||
RealD tm = this->mu;
|
||||
RealD mtil = 4.0+this->mass;
|
||||
RealD sq = mtil*mtil+tm*tm;
|
||||
RealD a = mtil/sq;
|
||||
RealD b = tm /sq;
|
||||
axpibg5x(out,in,a,b);
|
||||
this->Dhop(in, out, DaggerNo);
|
||||
// Clover term
|
||||
// apply the sigma and Fmunu
|
||||
AddCloverTerm(in, out);
|
||||
// overall factor
|
||||
return axpy_norm(out, 4 + this->mass, in, out);
|
||||
}
|
||||
|
||||
FermOpTemplateInstantiate(WilsonTMFermion);
|
||||
template <class Impl>
|
||||
RealD WilsonCloverFermion<Impl>::Mdag(const FermionField& in, FermionField& out) {
|
||||
// Wilson term
|
||||
out.checkerboard = in.checkerboard;
|
||||
this->Dhop(in, out, DaggerYes);
|
||||
// Clover term
|
||||
// apply the sigma and Fmunu
|
||||
AddCloverTerm(in, out);
|
||||
return axpy_norm(out, 4 + this->mass, in, out);
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
void WilsonCloverFermion<Impl>::ImportGauge(const GaugeField& _Umu) {
|
||||
this->ImportGauge(_Umu);
|
||||
// Compute the field strength terms
|
||||
|
||||
// Invert the Moo, Mee terms (?)
|
||||
}
|
||||
|
||||
|
||||
template<class Impl>
|
||||
void WilsonCloverFermion<Impl>::Mooee(const FermionField &in, FermionField &out) {
|
||||
out.checkerboard = in.checkerboard;
|
||||
|
||||
}
|
||||
|
||||
template<class Impl>
|
||||
void WilsonCloverFermion<Impl>::MooeeDag(const FermionField &in, FermionField &out) {
|
||||
assert(0); // not implemented yet
|
||||
}
|
||||
template<class Impl>
|
||||
void WilsonCloverFermion<Impl>::MooeeInv(const FermionField &in, FermionField &out) {
|
||||
assert(0); // not implemented yet
|
||||
}
|
||||
template<class Impl>
|
||||
void WilsonCloverFermion<Impl>::MooeeInvDag(const FermionField &in, FermionField &out) {
|
||||
assert(0); // not implemented yet
|
||||
}
|
||||
|
||||
FermOpTemplateInstantiate(WilsonCloverFermion);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user