mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Tests builds clean.
This commit is contained in:
parent
ade4a126da
commit
7e27a5213a
@ -43,15 +43,6 @@ struct scal {
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
typedef DomainWallFermion<DomainWallVec5dImplR> DomainWallVecFermionR;
|
||||
typedef ZMobiusFermion<ZDomainWallVec5dImplR> ZMobiusVecFermionR;
|
||||
typedef MobiusFermion<DomainWallVec5dImplR> MobiusVecFermionR;
|
||||
typedef MobiusZolotarevFermion<DomainWallVec5dImplR> MobiusZolotarevVecFermionR;
|
||||
typedef ScaledShamirFermion<DomainWallVec5dImplR> ScaledShamirVecFermionR;
|
||||
typedef ShamirZolotarevFermion<DomainWallVec5dImplR> ShamirZolotarevVecFermionR;
|
||||
typedef OverlapWilsonCayleyTanhFermion<DomainWallVec5dImplR> OverlapWilsonCayleyTanhVecFermionR;
|
||||
typedef OverlapWilsonCayleyZolotarevFermion<DomainWallVec5dImplR> OverlapWilsonCayleyZolotarevVecFermionR;
|
||||
|
||||
template<class What>
|
||||
void TestWhat(What & Ddwf,
|
||||
GridCartesian * FGrid, GridRedBlackCartesian * FrbGrid,
|
||||
@ -59,9 +50,6 @@ void TestWhat(What & Ddwf,
|
||||
RealD mass, RealD M5,
|
||||
GridParallelRNG *RNG4, GridParallelRNG *RNG5);
|
||||
|
||||
template<class This,class That>
|
||||
void TestMoo(This & Dw, That &sDw);
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
@ -101,11 +89,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"DomainWallFermion vectorised test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||
DomainWallVecFermionR sDdwf(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5);
|
||||
|
||||
TestMoo(Ddwf,sDdwf);
|
||||
TestWhat<DomainWallFermionR>(Ddwf,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<DomainWallVecFermionR>(sDdwf,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
RealD b=1.5;// Scale factor b+c=2, b-c=1
|
||||
RealD c=0.5;
|
||||
@ -114,75 +98,53 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage <<"MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
MobiusFermionR Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c);
|
||||
MobiusVecFermionR sDmob(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,b,c);
|
||||
TestMoo(Dmob,sDmob);
|
||||
TestWhat<MobiusFermionR>(Dmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<MobiusVecFermionR>(sDmob,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"Z-MobiusFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::vector<ComplexD> gamma(Ls,std::complex<double>(1.0,0.0));
|
||||
ZMobiusFermionR zDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c);
|
||||
ZMobiusVecFermionR szDmob(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,gamma,b,c);
|
||||
TestMoo(zDmob,szDmob);
|
||||
TestWhat<ZMobiusFermionR>(zDmob,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<ZMobiusVecFermionR>(szDmob,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"MobiusZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
MobiusZolotarevFermionR Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
MobiusZolotarevVecFermionR sDzolo(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,b,c,0.1,2.0);
|
||||
|
||||
TestMoo(Dzolo,sDzolo);
|
||||
TestWhat<MobiusZolotarevFermionR>(Dzolo,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<MobiusZolotarevVecFermionR>(sDzolo,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ScaledShamirFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
ScaledShamirFermionR Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0);
|
||||
ScaledShamirVecFermionR sDsham(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,2.0);
|
||||
|
||||
TestMoo(Dsham,sDsham);
|
||||
TestWhat<ScaledShamirFermionR>(Dsham,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<ScaledShamirVecFermionR>(sDsham,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"ShamirZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
ShamirZolotarevFermionR Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
ShamirZolotarevVecFermionR sDshamz(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,0.1,2.0);
|
||||
|
||||
TestMoo(Dshamz,sDshamz);
|
||||
TestWhat<ShamirZolotarevFermionR>(Dshamz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<ShamirZolotarevVecFermionR>(sDshamz,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyTanhFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
OverlapWilsonCayleyTanhFermionR Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0);
|
||||
OverlapWilsonCayleyTanhVecFermionR sDov(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,1.0);
|
||||
|
||||
TestMoo(Dov,sDov);
|
||||
TestWhat<OverlapWilsonCayleyTanhFermionR>(Dov,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<OverlapWilsonCayleyTanhVecFermionR>(sDov,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage <<"OverlapWilsonCayleyZolotarevFermion test"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"**************************************************************"<<std::endl;
|
||||
|
||||
OverlapWilsonCayleyZolotarevFermionR Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0);
|
||||
OverlapWilsonCayleyZolotarevVecFermionR sDovz(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,0.1,2.0);
|
||||
|
||||
TestMoo(Dovz,sDovz);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevFermionR>(Dovz,FGrid,FrbGrid,UGrid,mass,M5,&RNG4,&RNG5);
|
||||
TestWhat<OverlapWilsonCayleyZolotarevVecFermionR>(sDovz,sFGrid,sFrbGrid,sUGrid,mass,M5,&sRNG4,&sRNG5);
|
||||
|
||||
std::cout<<GridLogMessage<<"=============================================================="<<std::endl;
|
||||
|
||||
@ -324,150 +286,3 @@ void TestWhat(What & Ddwf,
|
||||
}
|
||||
|
||||
|
||||
template<class This,class That>
|
||||
void TestMoo(This & Dw, That &sDw)
|
||||
{
|
||||
GridBase *sgrid= sDw.FermionGrid();
|
||||
GridBase *ngrid= Dw.FermionGrid();
|
||||
|
||||
int Ls = Dw.Ls;
|
||||
|
||||
LatticeFermion ssrc(sgrid);
|
||||
LatticeFermion nsrc(ngrid);
|
||||
LatticeFermion zz(ngrid); zz=Zero();
|
||||
LatticeFermion sres(sgrid);
|
||||
LatticeFermion nres(ngrid);
|
||||
LatticeFermion ndiff(ngrid);
|
||||
LatticeFermion sdiff(sgrid);
|
||||
|
||||
Gamma g5( Gamma::Algebra::Gamma5 );
|
||||
|
||||
std::vector<int> seeds({1,2,3,4,5,7,8});
|
||||
GridParallelRNG RNG5(ngrid);
|
||||
RNG5.SeedFixedIntegers(seeds);
|
||||
random(RNG5,nsrc);
|
||||
// nsrc = nsrc + g5*nsrc;
|
||||
|
||||
// Lattice<iScalar<vInteger> > coor(ngrid);
|
||||
// LatticeCoordinate(coor,0);//scoor
|
||||
// nsrc = where(coor==(Integer)0,zz,nsrc);
|
||||
|
||||
std::vector<int> latt4(4);
|
||||
for(int d=0;d<4;d++){
|
||||
latt4[d] = ngrid->_fdimensions[d+1];
|
||||
}
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
SpinColourVector tmp;
|
||||
peekSite(tmp,nsrc,site);
|
||||
pokeSite(tmp,ssrc,site);
|
||||
}}}}}
|
||||
|
||||
sDw.Mooee(ssrc,sres);
|
||||
Dw.Mooee(nsrc,nres);
|
||||
|
||||
sDw.MooeeInternal(ssrc,sdiff,DaggerNo,InverseNo);
|
||||
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
SpinColourVector stmp;
|
||||
SpinColourVector itmp;
|
||||
SpinColourVector dtmp;
|
||||
peekSite(stmp,sres,site);
|
||||
peekSite(itmp,sdiff,site);
|
||||
|
||||
dtmp=itmp-stmp;
|
||||
if ( norm2(dtmp)>1.0e-6) {
|
||||
std::cout<<GridLogMessage<<"=============================================================="<<std::endl;
|
||||
std:: cout << x<<" "<<y<<" "<< z<< " "<<t<<"; s= "<<s<<std::endl;
|
||||
std:: cout << "stmp "<< stmp <<std::endl;
|
||||
std:: cout << "itmp "<< itmp <<std::endl;
|
||||
std::cout<<GridLogMessage<<"=============================================================="<<std::endl;
|
||||
}
|
||||
}}}}}
|
||||
sdiff = sdiff -sres;
|
||||
std::cout<<GridLogMessage<<" norm MooInternal diff "<<norm2(sdiff)<<std::endl;
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
|
||||
SpinColourVector tmp;
|
||||
peekSite(tmp,sres,site);
|
||||
pokeSite(tmp,ndiff,site);
|
||||
}}}}}
|
||||
ndiff=ndiff-nres;
|
||||
std::cout<<GridLogMessage<<" norm Moo diff "<<norm2(ndiff)<<std::endl;
|
||||
|
||||
sDw.MooeeDag(ssrc,sres);
|
||||
Dw.MooeeDag(nsrc,nres);
|
||||
sDw.MooeeInternal(ssrc,sdiff,DaggerYes,InverseNo);
|
||||
|
||||
sdiff = sdiff -sres;
|
||||
std::cout<<GridLogMessage<<" norm MooInternalDag diff "<<norm2(sdiff)<<std::endl;
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
|
||||
SpinColourVector tmp;
|
||||
peekSite(tmp,sres,site);
|
||||
pokeSite(tmp,ndiff,site);
|
||||
}}}}}
|
||||
ndiff=ndiff-nres;
|
||||
std::cout<<GridLogMessage<<" norm MooeeDag diff "<<norm2(ndiff)<<std::endl;
|
||||
|
||||
sDw.MooeeInv(ssrc,sres);
|
||||
Dw.MooeeInv(nsrc,nres);
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
|
||||
SpinColourVector tmp;
|
||||
peekSite(tmp,sres,site);
|
||||
pokeSite(tmp,ndiff,site);
|
||||
}}}}}
|
||||
ndiff=ndiff-nres;
|
||||
std::cout<<GridLogMessage<<" norm MooeeInv diff "<<norm2(ndiff)<<std::endl;
|
||||
|
||||
sDw.MooeeInvDag(ssrc,sres);
|
||||
Dw.MooeeInvDag(nsrc,nres);
|
||||
|
||||
for(int x=0;x<latt4[0];x++){
|
||||
for(int y=0;y<latt4[1];y++){
|
||||
for(int z=0;z<latt4[2];z++){
|
||||
for(int t=0;t<latt4[3];t++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
std::vector<int> site({s,x,y,z,t});
|
||||
SpinColourVector tmp;
|
||||
peekSite(tmp,sres,site);
|
||||
pokeSite(tmp,ndiff,site);
|
||||
}}}}}
|
||||
ndiff=ndiff-nres;
|
||||
std::cout<<GridLogMessage<<" norm MooeeInvDag diff "<<norm2(ndiff)<<std::endl;
|
||||
|
||||
std::cout<<GridLogMessage<<"=============================================================="<<std::endl;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,135 +0,0 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_dwf_even_odd.cc
|
||||
|
||||
Copyright (C) 2015
|
||||
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
Author: paboyle <paboyle@ph.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
|
||||
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 <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
template<class d>
|
||||
struct scal {
|
||||
d internal;
|
||||
};
|
||||
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
typedef WilsonFermion5D<DomainWallVec5dImplR> WilsonFermion5DR;
|
||||
typedef WilsonFermion5D<DomainWallVec5dImplF> WilsonFermion5DF;
|
||||
typedef WilsonFermion5D<DomainWallVec5dImplD> WilsonFermion5DD;
|
||||
|
||||
typedef WilsonFermion5D<WilsonImplR> WilsonFermion5D_OKR;
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
int threads = GridThread::GetThreads();
|
||||
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
||||
|
||||
|
||||
const int Ls=32;
|
||||
|
||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||
|
||||
GridCartesian * sUGrid = SpaceTimeGrid::makeFourDimDWFGrid(GridDefaultLatt(),GridDefaultMpi());
|
||||
GridRedBlackCartesian * sUrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(sUGrid);
|
||||
|
||||
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimDWFGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimDWFRedBlackGrid(Ls,UGrid);
|
||||
|
||||
std::vector<int> seeds4({1,2,3,4});
|
||||
std::vector<int> seeds5({5,6,7,8});
|
||||
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
GridParallelRNG RNG5(FGrid); RNG5.SeedFixedIntegers(seeds5);
|
||||
|
||||
LatticeFermion src (FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
/*
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(RNG4,U[nn]);
|
||||
PokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
}
|
||||
*/
|
||||
|
||||
RealD M5 =1.8;
|
||||
typename WilsonFermion5DR::ImplParams params;
|
||||
|
||||
WilsonFermion5DR Dw(Umu,*FGrid,*FrbGrid,*sUGrid,*sUrbGrid,M5,params);
|
||||
|
||||
Dw.Dhop(src,result,0);
|
||||
|
||||
std::cout << "Norm src = "<<norm2(src)<<" Norm res = "<<norm2(result) << std::endl;
|
||||
|
||||
GridCartesian * FokGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FokrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
|
||||
WilsonFermion5D_OKR Dok(Umu,*FokGrid,*FokrbGrid,*UGrid,*UrbGrid,M5,params);
|
||||
|
||||
LatticeFermion src_ok (FokGrid);
|
||||
LatticeFermion ref_ok(FokGrid);
|
||||
LatticeFermion result_ok(FokGrid);
|
||||
|
||||
|
||||
for(int lidx=0;lidx<FGrid->lSites();lidx++){
|
||||
Coordinate lcoor;
|
||||
FGrid->LocalIndexToLocalCoor(lidx,lcoor);
|
||||
|
||||
SpinColourVector siteSrc;
|
||||
|
||||
peekLocalSite(siteSrc,src,lcoor);
|
||||
pokeLocalSite(siteSrc,src_ok,lcoor);
|
||||
|
||||
peekLocalSite(siteSrc,result,lcoor);
|
||||
pokeLocalSite(siteSrc,result_ok,lcoor);
|
||||
}
|
||||
|
||||
Dok.Dhop(src_ok,ref_ok,0);
|
||||
|
||||
std::cout << "Reference = "<<norm2(src_ok)<<" res = "<<norm2(ref_ok) << std::endl;
|
||||
ref_ok = ref_ok - result_ok;
|
||||
std::cout << "Result = "<<norm2(result_ok)<< std::endl;
|
||||
std::cout << "Reference diff = "<<norm2(ref_ok)<< std::endl;
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@ -45,9 +45,9 @@ int main(int argc, char *argv[])
|
||||
std::cout << GridLogMessage << "Grid initialized" << std::endl;
|
||||
|
||||
// QED stuff
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(4, vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(4, vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian grid(latt_size,simd_layout,mpi_layout);
|
||||
GridParallelRNG pRNG(&grid);
|
||||
PhotonR photon(&grid, PhotonR::Gauge::coulomb, PhotonR::ZmScheme::qedL);
|
||||
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
std::cout << GridLogMessage << "Spatial zero-mode norm 2" << std::endl;
|
||||
sliceSum(a, zm, grid.Nd() - 1);
|
||||
for (unsigned int t = 0; t < latt_size.back(); ++t)
|
||||
for (unsigned int t = 0; t < latt_size.size(); ++t)
|
||||
{
|
||||
std::cout << GridLogMessage << "t = " << t << " " << std::sqrt(norm2(zm[t])) << std::endl;
|
||||
}
|
||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
// Calculate divergence
|
||||
EmComp diva(&grid), amu(&grid);
|
||||
|
||||
diva = zero;
|
||||
diva = Zero();
|
||||
for (unsigned int mu = 0; mu < grid.Nd(); ++mu)
|
||||
{
|
||||
amu = peekLorentz(a, mu);
|
||||
|
@ -54,10 +54,11 @@ int main (int argc, char ** argv)
|
||||
SU3::HotConfiguration(pRNG,U);
|
||||
|
||||
double beta = 1.0;
|
||||
double c1 = 0.331;
|
||||
|
||||
//ConjugatePlaqPlusRectangleActionR Action(beta,c1);
|
||||
ConjugateWilsonGaugeActionR Action(beta);
|
||||
|
||||
// double c1 = 0.331;
|
||||
//ConjugatePlaqPlusRectangleActionR Action(beta,c1);
|
||||
|
||||
//WilsonGaugeActionR Action(beta);
|
||||
|
||||
ComplexD S = Action.S(U);
|
||||
|
@ -93,7 +93,7 @@ int main(int argc, char **argv)
|
||||
RealD dt = 0.00005;
|
||||
RealD Hmom = 0.0;
|
||||
RealD Hmomprime = 0.0;
|
||||
RealD Hmompp = 0.0;
|
||||
// RealD Hmompp = 0.0;
|
||||
LatticeColourMatrix mommu(&Grid);
|
||||
LatticeColourMatrix forcemu(&Grid);
|
||||
LatticeGaugeField mom(&Grid);
|
||||
|
@ -1,153 +0,0 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_hmc_WilsonFermionGauge.cc
|
||||
|
||||
Copyright (C) 2015
|
||||
|
||||
Author: Peter Boyle <pabobyle@ph.ed.ac.uk>
|
||||
Author: neo <cossu@post.kek.jp>
|
||||
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
|
||||
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 <Grid/Grid.h>
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
Grid_init(&argc, &argv);
|
||||
int threads = GridThread::GetThreads();
|
||||
// here make a routine to print all the relevant information on the run
|
||||
std::cout << GridLogMessage << "Grid is setup to use " << threads << " threads" << std::endl;
|
||||
|
||||
// Typedefs to simplify notation
|
||||
typedef GenericHMCRunner<MinimumNorm2> HMCWrapper; // Uses the default minimum norm
|
||||
|
||||
typedef DomainWallVec5dImplR FermionImplPolicy;
|
||||
typedef DomainWallFermion<FermionImplPolicy> FermionAction;
|
||||
typedef typename FermionAction::FermionField FermionField;
|
||||
|
||||
|
||||
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
HMCWrapper TheHMC;
|
||||
|
||||
// Grid from the command line
|
||||
TheHMC.Resources.AddFourDimGrid("gauge");
|
||||
// Possibile to create the module by hand
|
||||
// hardcoding parameters or using a Reader
|
||||
|
||||
|
||||
// Checkpointer definition
|
||||
CheckpointerParameters CPparams;
|
||||
CPparams.config_prefix = "ckpoint_EODWF_lat";
|
||||
CPparams.rng_prefix = "ckpoint_EODWF_rng";
|
||||
CPparams.saveInterval = 5;
|
||||
CPparams.format = "IEEE64BIG";
|
||||
|
||||
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
|
||||
|
||||
RNGModuleParameters RNGpar;
|
||||
RNGpar.serial_seeds = "1 2 3 4 5";
|
||||
RNGpar.parallel_seeds = "6 7 8 9 10";
|
||||
TheHMC.Resources.SetRNGSeeds(RNGpar);
|
||||
|
||||
// Construct observables
|
||||
// here there is too much indirection
|
||||
typedef PlaquetteMod<HMCWrapper::ImplPolicy> PlaqObs;
|
||||
TheHMC.Resources.AddObservable<PlaqObs>();
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Collect actions, here use more encapsulation
|
||||
// need wrappers of the fermionic classes
|
||||
// that have a complex construction
|
||||
// standard
|
||||
RealD beta = 5.6 ;
|
||||
WilsonGaugeActionR Waction(beta);
|
||||
|
||||
|
||||
const int Ls = 8;
|
||||
auto GridPtr = TheHMC.Resources.GetCartesian();
|
||||
auto GridRBPtr = TheHMC.Resources.GetRBCartesian();
|
||||
auto FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,GridPtr);
|
||||
auto FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,GridPtr);
|
||||
auto sUGrid = SpaceTimeGrid::makeFourDimDWFGrid(GridDefaultLatt(),GridDefaultMpi());
|
||||
auto sUrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(sUGrid);
|
||||
|
||||
// temporarily need a gauge field
|
||||
LatticeGaugeField U(GridPtr);
|
||||
|
||||
Real mass = 0.04;
|
||||
Real pv = 1.0;
|
||||
RealD M5 = 1.5;
|
||||
|
||||
FermionAction DenOp(U,*FGrid,*FrbGrid,*sUGrid,*sUrbGrid,mass,M5);
|
||||
FermionAction NumOp(U,*FGrid,*FrbGrid,*sUGrid,*sUrbGrid,pv,M5);
|
||||
|
||||
|
||||
double StoppingCondition = 1.0e-8;
|
||||
double MaxCGIterations = 10000;
|
||||
ConjugateGradient<FermionField> CG(StoppingCondition,MaxCGIterations);
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<FermionImplPolicy> Nf2(NumOp, DenOp,CG,CG);
|
||||
|
||||
// Set smearing (true/false), default: false
|
||||
Nf2.is_smeared = false;
|
||||
|
||||
// Collect actions
|
||||
ActionLevel<HMCWrapper::Field> Level1(1);
|
||||
Level1.push_back(&Nf2);
|
||||
|
||||
ActionLevel<HMCWrapper::Field> Level2(4);
|
||||
Level2.push_back(&Waction);
|
||||
|
||||
TheHMC.TheAction.push_back(Level1);
|
||||
TheHMC.TheAction.push_back(Level2);
|
||||
/////////////////////////////////////////////////////////////
|
||||
// HMC parameters are serialisable
|
||||
TheHMC.Parameters.MD.MDsteps = 20;
|
||||
TheHMC.Parameters.MD.trajL = 1.0;
|
||||
|
||||
TheHMC.ReadCommandLine(argc, argv); // these can be parameters from file
|
||||
|
||||
// Reset performance counters
|
||||
NumOp.ZeroCounters();
|
||||
DenOp.ZeroCounters();
|
||||
TheHMC.Run(); // no smearing
|
||||
|
||||
std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl;
|
||||
NumOp.Report();
|
||||
std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl;
|
||||
DenOp.Report();
|
||||
|
||||
|
||||
|
||||
|
||||
Grid_finalize();
|
||||
|
||||
|
||||
|
||||
|
||||
} // main
|
||||
|
||||
|
@ -1,110 +0,0 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: ./tests/Test_dwf_cg_prec.cc
|
||||
|
||||
Copyright (C) 2016
|
||||
|
||||
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
|
||||
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 <Grid/Grid.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
template <class d>
|
||||
struct scal {
|
||||
d internal;
|
||||
};
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
Grid_init(&argc, &argv);
|
||||
|
||||
const int Ls = 16;
|
||||
|
||||
GridCartesian* UGrid = SpaceTimeGrid::makeFourDimGrid(
|
||||
GridDefaultLatt(), GridDefaultSimd(Nd, vComplex::Nsimd()),
|
||||
GridDefaultMpi());
|
||||
GridRedBlackCartesian* UrbGrid =
|
||||
SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||
|
||||
GridCartesian* sUGrid = SpaceTimeGrid::makeFourDimDWFGrid(GridDefaultLatt(), GridDefaultMpi());
|
||||
GridRedBlackCartesian* sUrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(sUGrid);
|
||||
|
||||
GridCartesian* FGrid = SpaceTimeGrid::makeFiveDimDWFGrid(Ls, UGrid);
|
||||
GridRedBlackCartesian* FrbGrid = SpaceTimeGrid::makeFiveDimDWFRedBlackGrid(Ls, UGrid);
|
||||
|
||||
std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt()
|
||||
<< " Ls: " << Ls << std::endl;
|
||||
|
||||
std::vector<int> seeds4({1, 2, 3, 4});
|
||||
std::vector<int> seeds5({5, 6, 7, 8});
|
||||
GridParallelRNG RNG5(FGrid);
|
||||
RNG5.SeedFixedIntegers(seeds5);
|
||||
GridParallelRNG RNG4(UGrid);
|
||||
RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
std::cout << GridLogMessage << "Generating random fermion field" << std::endl;
|
||||
LatticeFermion src(FGrid);
|
||||
random(RNG5, src);
|
||||
LatticeFermion result(FGrid);
|
||||
result = Zero();
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
std::cout << GridLogMessage << "Generating random gauge field" << std::endl;
|
||||
SU3::HotConfiguration(RNG4, Umu);
|
||||
|
||||
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4, UGrid);
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
U[mu] = PeekIndex<LorentzIndex>(Umu, mu);
|
||||
}
|
||||
|
||||
RealD mass = 0.01;
|
||||
RealD M5 = 1.8;
|
||||
DomainWallFermionVec5dR Ddwf(Umu, *FGrid, *FrbGrid, *sUGrid, *sUrbGrid, mass, M5);
|
||||
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd, src_o, src);
|
||||
result_o = Zero();
|
||||
|
||||
GridStopWatch CGTimer;
|
||||
|
||||
SchurDiagMooeeOperator<DomainWallFermionVec5dR, LatticeFermion> HermOpEO(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8, 10000, 0); // switch off the assert
|
||||
|
||||
Ddwf.ZeroCounters();
|
||||
CGTimer.Start();
|
||||
CG(HermOpEO, src_o, result_o);
|
||||
CGTimer.Stop();
|
||||
|
||||
std::cout << GridLogMessage << "Total CG time : " << CGTimer.Elapsed()
|
||||
<< std::endl;
|
||||
|
||||
std::cout << GridLogMessage << "######## Dhop calls summary" << std::endl;
|
||||
Ddwf.Report();
|
||||
|
||||
Grid_finalize();
|
||||
}
|
@ -30,6 +30,8 @@
|
||||
|
||||
namespace Grid {
|
||||
|
||||
Zero zero;
|
||||
|
||||
// TODO: Can think about having one parameter struct per level and then a
|
||||
// vector of these structs. How well would that work together with the
|
||||
// serialization strategy of Grid?
|
||||
@ -124,7 +126,7 @@ public:
|
||||
Seeds[level][d] = (level)*Nd + d + 1;
|
||||
}
|
||||
|
||||
Grids.push_back(QCD::SpaceTimeGrid::makeFourDimGrid(tmp, Grids[level - 1]->_simd_layout, GridDefaultMpi()));
|
||||
Grids.push_back(SpaceTimeGrid::makeFourDimGrid(tmp, Grids[level - 1]->_simd_layout, GridDefaultMpi()));
|
||||
PRNGs.push_back(GridParallelRNG(Grids[level]));
|
||||
|
||||
PRNGs[level].SeedFixedIntegers(Seeds[level]);
|
||||
@ -227,8 +229,8 @@ public:
|
||||
_SetupCreateSubspaceTimer.Stop();
|
||||
|
||||
_SetupProjectToChiralitiesTimer.Start();
|
||||
FineVector tmp1(_Aggregates.subspace[0]._grid);
|
||||
FineVector tmp2(_Aggregates.subspace[0]._grid);
|
||||
FineVector tmp1(_Aggregates.subspace[0].Grid());
|
||||
FineVector tmp2(_Aggregates.subspace[0].Grid());
|
||||
for(int n = 0; n < nb; n++) {
|
||||
auto tmp1 = _Aggregates.subspace[n];
|
||||
G5C(tmp2, _Aggregates.subspace[n]);
|
||||
@ -253,7 +255,7 @@ public:
|
||||
|
||||
virtual void operator()(FineVector const &in, FineVector &out) {
|
||||
|
||||
conformable(_LevelInfo.Grids[_CurrentLevel], in._grid);
|
||||
conformable(_LevelInfo.Grids[_CurrentLevel], in.Grid());
|
||||
conformable(in, out);
|
||||
|
||||
// TODO: implement a W-cycle
|
||||
@ -273,7 +275,7 @@ public:
|
||||
CoarseVector coarseSol(_LevelInfo.Grids[_NextCoarserLevel]);
|
||||
coarseSol = zero;
|
||||
|
||||
FineVector fineTmp(in._grid);
|
||||
FineVector fineTmp(in.Grid());
|
||||
|
||||
auto maxSmootherIter = _MultiGridParams.smootherMaxOuterIter[_CurrentLevel] * _MultiGridParams.smootherMaxInnerIter[_CurrentLevel];
|
||||
|
||||
@ -330,7 +332,7 @@ public:
|
||||
CoarseVector coarseSol(_LevelInfo.Grids[_NextCoarserLevel]);
|
||||
coarseSol = zero;
|
||||
|
||||
FineVector fineTmp(in._grid);
|
||||
FineVector fineTmp(in.Grid());
|
||||
|
||||
auto smootherMaxIter = _MultiGridParams.smootherMaxOuterIter[_CurrentLevel] * _MultiGridParams.smootherMaxInnerIter[_CurrentLevel];
|
||||
auto kCycleMaxIter = _MultiGridParams.kCycleMaxOuterIter[_CurrentLevel] * _MultiGridParams.kCycleMaxInnerIter[_CurrentLevel];
|
||||
@ -605,7 +607,7 @@ public:
|
||||
|
||||
_SolveTotalTimer.Start();
|
||||
|
||||
conformable(_LevelInfo.Grids[_CurrentLevel], in._grid);
|
||||
conformable(_LevelInfo.Grids[_CurrentLevel], in.Grid());
|
||||
conformable(in, out);
|
||||
|
||||
auto coarseSolverMaxIter = _MultiGridParams.coarseSolverMaxOuterIter * _MultiGridParams.coarseSolverMaxInnerIter;
|
||||
|
@ -39,9 +39,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -39,9 +39,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -39,9 +39,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -39,9 +39,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -39,9 +39,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
using namespace Grid::QCD;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
@ -46,7 +45,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
// clang-format off
|
||||
LatticeFermion src(FGrid); gaussian(fPRNG, src);
|
||||
LatticeFermion result(FGrid); result = zero;
|
||||
LatticeFermion result(FGrid); result = Zero();
|
||||
LatticeGaugeField Umu(FGrid); SU3::HotConfiguration(fPRNG, Umu);
|
||||
// clang-format on
|
||||
|
||||
|
@ -50,8 +50,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
// clang-format off
|
||||
LatticeFermionD src_d(FGrid_d); gaussian(fPRNG, src_d);
|
||||
LatticeFermionD resultMGD_d(FGrid_d); resultMGD_d = zero;
|
||||
LatticeFermionD resultMGF_d(FGrid_d); resultMGF_d = zero;
|
||||
LatticeFermionD resultMGD_d(FGrid_d); resultMGD_d = Zero();
|
||||
LatticeFermionD resultMGF_d(FGrid_d); resultMGF_d = Zero();
|
||||
LatticeGaugeFieldD Umu_d(FGrid_d); SU3::HotConfiguration(fPRNG, Umu_d);
|
||||
LatticeGaugeFieldF Umu_f(FGrid_f); precisionChange(Umu_f, Umu_d);
|
||||
// clang-format on
|
||||
@ -141,8 +141,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
// clang-format off
|
||||
LatticeFermionF src_f(FGrid_f); precisionChange(src_f, src_d);
|
||||
LatticeFermionF resMGF_f(FGrid_f); resMGF_f = zero;
|
||||
LatticeFermionD resMGD_d(FGrid_d); resMGD_d = zero;
|
||||
LatticeFermionF resMGF_f(FGrid_f); resMGF_f = Zero();
|
||||
LatticeFermionD resMGD_d(FGrid_d); resMGD_d = Zero();
|
||||
// clang-format on
|
||||
|
||||
(*MGPreconDw_f)(src_f, resMGF_f);
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -35,9 +35,9 @@ int main (int argc, char ** argv)
|
||||
{
|
||||
Grid_init(&argc,&argv);
|
||||
|
||||
std::vector<int> latt_size = GridDefaultLatt();
|
||||
std::vector<int> simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
std::vector<int> mpi_layout = GridDefaultMpi();
|
||||
Coordinate latt_size = GridDefaultLatt();
|
||||
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
|
||||
Coordinate mpi_layout = GridDefaultMpi();
|
||||
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBGrid(&Grid);
|
||||
|
||||
@ -50,7 +50,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
Loading…
Reference in New Issue
Block a user