From 02e983a0cd5b13a34238598824867e50f47fece2 Mon Sep 17 00:00:00 2001 From: paboyle Date: Wed, 31 Aug 2016 00:26:02 +0100 Subject: [PATCH] Momentum space prop and free prop convolution --- lib/qcd/action/fermion/FermionOperator.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/qcd/action/fermion/FermionOperator.h b/lib/qcd/action/fermion/FermionOperator.h index ea5583eb..daee2e5b 100644 --- a/lib/qcd/action/fermion/FermionOperator.h +++ b/lib/qcd/action/fermion/FermionOperator.h @@ -91,6 +91,19 @@ namespace Grid { virtual void Mdiag (const FermionField &in, FermionField &out) { Mooee(in,out);}; // Same as Mooee applied to both CB's virtual void Mdir (const FermionField &in, FermionField &out,int dir,int disp)=0; // case by case Wilson, Clover, Cayley, ContFrac, PartFrac + + virtual void MomentumSpacePropagator(FermionField &out,const FermionField &in) { assert(0);}; + virtual void FreePropagator(const FermionField &in,FermionField &out) { + FFT theFFT((GridCartesian *) in._grid); + + FermionField in_k(in._grid); + FermionField prop_k(in._grid); + + theFFT.FFT_all_dim(in_k,in,FFT::forward); + this->MomentumSpacePropagator(prop_k,in_k); + theFFT.FFT_all_dim(out,prop_k,FFT::backward); + }; + /////////////////////////////////////////////// // Updates gauge field during HMC ///////////////////////////////////////////////