/************************************************************************************* grid` physics library, www.github.com/paboyle/Grid Source file: ./tests/Test_cshift.cc Copyright (C) 2015 Author: Azusa Yamaguchi Author: Peter Boyle 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory *************************************************************************************/ /* END LEGAL */ #include using namespace Grid; ; int main (int argc, char ** argv) { Grid_init(&argc,&argv); int threads = GridThread::GetThreads(); std::cout< seeds({1,2,3,4}); GridSerialRNG sRNG; sRNG.SeedFixedIntegers(seeds); // naughty seeding GridParallelRNG pRNG(&GRID); pRNG.SeedFixedIntegers(seeds); LatticeGaugeFieldD Umu(&GRID); SU::ColdConfiguration(pRNG,Umu); // Unit gauge // Umu=Zero(); //////////////////////////////////////////////////// // Wilson test //////////////////////////////////////////////////// { LatticeFermionD src(&GRID); gaussian(pRNG,src); LatticeFermionD tmp(&GRID); LatticeFermionD ref(&GRID); RealD mass=0.01; WilsonFermionD Dw(Umu,GRID,RBGRID,mass); Dw.M(src,tmp); std::cout << "Dw src = " < 1/2 gmu (eip - emip) = i sinp gmu Kinetic = Kinetic + sin(kmu)*ci*(Gamma(Gmu[mu])*src5_p); } // NB implicit sum over mu // // 1-1/2 Dw = 1 - 1/2 ( eip+emip) // = - 1/2 (ei - 2 + emi) // = - 1/4 2 (eih - eimh)(eih - eimh) // = 2 sink/2 ink/2 = sk2 W = one - M5 + sk2; Kinetic = Kinetic + W * src5_p; LatticeCoordinate(scoor,sdir); tmp5 = Cshift(src5_p,sdir,+1); tmp5 = (tmp5 - G5*tmp5)*0.5; tmp5 = where(scoor==Integer(Ls-1),mass*tmp5,-tmp5); Kinetic = Kinetic + tmp5; tmp5 = Cshift(src5_p,sdir,-1); tmp5 = (tmp5 + G5*tmp5)*0.5; tmp5 = where(scoor==Integer(0),mass*tmp5,-tmp5); Kinetic = Kinetic + tmp5; std::cout<<"Momentum space Ddwf "<< norm2(Kinetic)< HermOp(Ddwf); ConjugateGradient CG(1.0e-16,10000); CG(HermOp,src5,result5); //////////////////////////////////////////////////////////////////////// // Domain wall physical field propagator //////////////////////////////////////////////////////////////////////// /* psi = chiralProjectMinus(psi_5[0]); psi += chiralProjectPlus(psi_5[Ls-1]); */ ExtractSlice(tmp,result5,0 ,sdir); result4 = (tmp-G5*tmp)*0.5; ExtractSlice(tmp,result5,Ls-1,sdir); result4 = result4+(tmp+G5*tmp)*0.5; std::cout << " Taking difference" < pion_prop; sliceSum(twopoint,pion_prop,Nd-1); for(int t=0;t HermOp(Dov); ConjugateGradient CG(1.0e-16,10000); CG(HermOp,src5,result5); //////////////////////////////////////////////////////////////////////// // Domain wall physical field propagator //////////////////////////////////////////////////////////////////////// /* psi = chiralProjectMinus(psi_5[0]); psi += chiralProjectPlus(psi_5[Ls-1]); */ ExtractSlice(tmp,result5,0 ,sdir); result4 = (tmp-G5*tmp)*0.5; ExtractSlice(tmp,result5,Ls-1,sdir); result4 = result4+(tmp+G5*tmp)*0.5; std::cout << " Taking difference" < QEDGimplTypesD; typedef Photon QEDGaction; QEDGaction Maxwell(QEDGaction::FEYNMAN_L); QEDGaction::GaugeField Prop(&GRID);Prop=Zero(); QEDGaction::GaugeField Source(&GRID);Source=Zero(); Maxwell.FreePropagator (Source,Prop); std::cout << " MaxwellFree propagator\n"; */ } Grid_finalize(); }