mirror of
https://github.com/paboyle/Grid.git
synced 2026-05-23 18:44:17 +01:00
Alternate multigrids
This commit is contained in:
@@ -368,7 +368,7 @@ int main (int argc, char ** argv)
|
|||||||
TrivialPrecon<CoarseVector> simple;
|
TrivialPrecon<CoarseVector> simple;
|
||||||
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOpPV);
|
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOpPV);
|
||||||
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(3.0e-2, 100, LinOpCoarse,simple,10,10);
|
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-2, 200, LinOpCoarse,simple,30,30);
|
||||||
L2PGCR.Level(3);
|
L2PGCR.Level(3);
|
||||||
c_res=Zero();
|
c_res=Zero();
|
||||||
L2PGCR(c_src,c_res);
|
L2PGCR(c_src,c_res);
|
||||||
@@ -400,7 +400,7 @@ int main (int argc, char ** argv)
|
|||||||
LinOpCoarse,
|
LinOpCoarse,
|
||||||
L2PGCR);
|
L2PGCR);
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,PVdagM,TwoLevelPrecon,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,PVdagM,TwoLevelPrecon,30,30);
|
||||||
L1PGCR.Level(1);
|
L1PGCR.Level(1);
|
||||||
|
|
||||||
f_res=Zero();
|
f_res=Zero();
|
||||||
|
|||||||
@@ -337,8 +337,8 @@ int main (int argc, char ** argv)
|
|||||||
500);
|
500);
|
||||||
|
|
||||||
// Breeds left singular vectors with call to HermOp (U)
|
// Breeds left singular vectors with call to HermOp (U)
|
||||||
// U.CreateSubspaceChebyshev(RNG5,MdagPV,
|
// U.CreateSubspaceChebyshev(RNG5,PVdagM,
|
||||||
U.CreateSubspaceChebyshev(RNG5,PVdagM,
|
U.CreateSubspaceChebyshev(RNG5,MdagPV,
|
||||||
nbasis,
|
nbasis,
|
||||||
4000.0,0.003,
|
4000.0,0.003,
|
||||||
500);
|
500);
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ int main (int argc, char ** argv)
|
|||||||
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
|
||||||
DomainWallFermionD Dpv(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5);
|
DomainWallFermionD Dpv(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5);
|
||||||
|
|
||||||
const int nbasis = 40;
|
const int nbasis = 60;
|
||||||
const int cb = 0 ;
|
const int cb = 0 ;
|
||||||
|
|
||||||
NextToNearestStencilGeometry5D geom(Coarse5d);
|
NextToNearestStencilGeometry5D geom(Coarse5d);
|
||||||
@@ -346,7 +346,7 @@ int main (int argc, char ** argv)
|
|||||||
// Warning: This routine calls PVdagM.Op, not PVdagM.HermOp
|
// Warning: This routine calls PVdagM.Op, not PVdagM.HermOp
|
||||||
typedef Aggregation<vSpinColourVector,vTComplex,nbasis> Subspace;
|
typedef Aggregation<vSpinColourVector,vTComplex,nbasis> Subspace;
|
||||||
Subspace V(Coarse5d,FGrid,cb);
|
Subspace V(Coarse5d,FGrid,cb);
|
||||||
Subspace U(Coarse5d,FGrid,cb);
|
// Subspace U(Coarse5d,FGrid,cb);
|
||||||
|
|
||||||
// Breeds right singular vectors with call to HermOp
|
// Breeds right singular vectors with call to HermOp
|
||||||
V.CreateSubspaceChebyshev(RNG5,PVdagM,
|
V.CreateSubspaceChebyshev(RNG5,PVdagM,
|
||||||
@@ -359,7 +359,7 @@ int main (int argc, char ** argv)
|
|||||||
// nbasis,
|
// nbasis,
|
||||||
// 4000.0,0.003,
|
// 4000.0,0.003,
|
||||||
// 300);
|
// 300);
|
||||||
U.subspace=V.subspace;
|
// U.subspace=V.subspace;
|
||||||
|
|
||||||
// typedef Aggregation<vSpinColourVector,vTComplex,2*nbasis> CombinedSubspace;
|
// typedef Aggregation<vSpinColourVector,vTComplex,2*nbasis> CombinedSubspace;
|
||||||
// CombinedSubspace CombinedUV(Coarse5d,FGrid,cb);
|
// CombinedSubspace CombinedUV(Coarse5d,FGrid,cb);
|
||||||
@@ -373,7 +373,7 @@ int main (int argc, char ** argv)
|
|||||||
typedef GeneralCoarsenedMatrix<vSpinColourVector,vTComplex,nbasis> LittleDiracOperator;
|
typedef GeneralCoarsenedMatrix<vSpinColourVector,vTComplex,nbasis> LittleDiracOperator;
|
||||||
typedef LittleDiracOperator::CoarseVector CoarseVector;
|
typedef LittleDiracOperator::CoarseVector CoarseVector;
|
||||||
LittleDiracOperator LittleDiracOpPV(geom,FGrid,Coarse5d);
|
LittleDiracOperator LittleDiracOpPV(geom,FGrid,Coarse5d);
|
||||||
LittleDiracOpPV.CoarsenOperator(PVdagM,U,V);
|
LittleDiracOpPV.CoarsenOperator(PVdagM,V,V);
|
||||||
|
|
||||||
std::cout<<GridLogMessage<<std::endl;
|
std::cout<<GridLogMessage<<std::endl;
|
||||||
std::cout<<GridLogMessage<<"*******************************************"<<std::endl;
|
std::cout<<GridLogMessage<<"*******************************************"<<std::endl;
|
||||||
@@ -400,7 +400,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"prom "<<norm2(prom)<<std::endl;
|
std::cout<<GridLogMessage<<"prom "<<norm2(prom)<<std::endl;
|
||||||
|
|
||||||
PVdagM.Op(prom,tmp);
|
PVdagM.Op(prom,tmp);
|
||||||
blockProject(c_proj,tmp,U.subspace);
|
blockProject(c_proj,tmp,V.subspace);
|
||||||
std::cout<<GridLogMessage<<" Called Big Dirac Op "<<norm2(tmp)<<std::endl;
|
std::cout<<GridLogMessage<<" Called Big Dirac Op "<<norm2(tmp)<<std::endl;
|
||||||
|
|
||||||
LittleDiracOpPV.M(c_src,c_res);
|
LittleDiracOpPV.M(c_src,c_res);
|
||||||
@@ -456,7 +456,7 @@ int main (int argc, char ** argv)
|
|||||||
typedef MGPreconditionerSVD<vSpinColourVector, vTComplex,nbasis> TwoLevelMG;
|
typedef MGPreconditionerSVD<vSpinColourVector, vTComplex,nbasis> TwoLevelMG;
|
||||||
|
|
||||||
// TwoLevelMG TwoLevelPrecon(CombinedUV,CombinedUV,
|
// TwoLevelMG TwoLevelPrecon(CombinedUV,CombinedUV,
|
||||||
TwoLevelMG TwoLevelPrecon(U,V,
|
TwoLevelMG TwoLevelPrecon(V,V,
|
||||||
PVdagM,
|
PVdagM,
|
||||||
simple_fine,
|
simple_fine,
|
||||||
SmootherGCR,
|
SmootherGCR,
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ int main (int argc, char ** argv)
|
|||||||
Coordinate clatt = GridDefaultLatt();
|
Coordinate clatt = GridDefaultLatt();
|
||||||
for(int d=0;d<clatt.size();d++){
|
for(int d=0;d<clatt.size();d++){
|
||||||
clatt[d] = clatt[d]/2;
|
clatt[d] = clatt[d]/2;
|
||||||
// clatt[d] = clatt[d]/4;
|
//clatt[d] = clatt[d]/4;
|
||||||
}
|
}
|
||||||
GridCartesian *Coarse4d = SpaceTimeGrid::makeFourDimGrid(clatt, GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());;
|
GridCartesian *Coarse4d = SpaceTimeGrid::makeFourDimGrid(clatt, GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());;
|
||||||
|
|
||||||
@@ -162,19 +162,22 @@ int main (int argc, char ** argv)
|
|||||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||||
GridParallelRNG CRNG(Coarse4d);CRNG.SeedFixedIntegers(cseeds);
|
GridParallelRNG CRNG(Coarse4d);CRNG.SeedFixedIntegers(cseeds);
|
||||||
|
|
||||||
LatticeFermion src(FGrid); random(RNG4,src);
|
Complex one(1.0);
|
||||||
|
|
||||||
|
LatticeFermion src(FGrid); src=one;
|
||||||
LatticeFermion result(FGrid); result=Zero();
|
LatticeFermion result(FGrid); result=Zero();
|
||||||
LatticeFermion ref(FGrid); ref=Zero();
|
LatticeFermion ref(FGrid); ref=Zero();
|
||||||
LatticeFermion tmp(FGrid);
|
LatticeFermion tmp(FGrid);
|
||||||
LatticeFermion err(FGrid);
|
LatticeFermion err(FGrid);
|
||||||
|
LatticeFermion precsrc(FGrid);
|
||||||
LatticeGaugeField Umu(UGrid);
|
LatticeGaugeField Umu(UGrid);
|
||||||
|
|
||||||
FieldMetaData header;
|
FieldMetaData header;
|
||||||
std::string file("ckpoint_lat.1000");
|
std::string file("ckpoint_lat");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
|
||||||
RealD csw =1.0;
|
RealD csw =0.0;
|
||||||
RealD mass=-0.6222;
|
RealD mass=-0.92;
|
||||||
|
|
||||||
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
||||||
|
|
||||||
@@ -196,7 +199,7 @@ int main (int argc, char ** argv)
|
|||||||
Subspace Aggregates(Coarse4d,FGrid,cb);
|
Subspace Aggregates(Coarse4d,FGrid,cb);
|
||||||
|
|
||||||
NonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> LinOpDw(Dw);
|
NonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> LinOpDw(Dw);
|
||||||
ShiftedNonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> ShiftedLinOpDw(Dw,0.5);
|
ShiftedNonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> ShiftedLinOpDw(Dw,0.01);
|
||||||
|
|
||||||
Aggregates.CreateSubspaceGCR(RNG4,
|
Aggregates.CreateSubspaceGCR(RNG4,
|
||||||
LinOpDw,
|
LinOpDw,
|
||||||
@@ -225,7 +228,6 @@ int main (int argc, char ** argv)
|
|||||||
std::vector<LatticeFermion> subspace(2*nbasis,FGrid);
|
std::vector<LatticeFermion> subspace(2*nbasis,FGrid);
|
||||||
subspace=CombinedUV.subspace;
|
subspace=CombinedUV.subspace;
|
||||||
|
|
||||||
Complex one(1.0);
|
|
||||||
c_src = one; // 1 in every element for vector 1.
|
c_src = one; // 1 in every element for vector 1.
|
||||||
blockPromote(c_src,err,subspace);
|
blockPromote(c_src,err,subspace);
|
||||||
|
|
||||||
@@ -260,6 +262,15 @@ int main (int argc, char ** argv)
|
|||||||
**********
|
**********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// CG
|
||||||
|
{
|
||||||
|
MdagMLinearOperator<WilsonFermionD,LatticeFermion> HermOp(Dw);
|
||||||
|
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||||
|
Dw.Mdag(src,precsrc);
|
||||||
|
CG(HermOp,precsrc,result);
|
||||||
|
result=Zero();
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// Coarse grid solver test
|
// Coarse grid solver test
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
@@ -269,8 +280,12 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<CoarseVector> simple;
|
TrivialPrecon<CoarseVector> simple;
|
||||||
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
||||||
|
ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LittleDiracOp,0.001);
|
||||||
|
// ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LittleDiracOp,0.01);
|
||||||
|
// ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LinOpCoarse,0.001);
|
||||||
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(3.0e-2, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-1, 100, LinOpCoarse,simple,30,30);
|
||||||
|
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(2.0e-1, 50, ShiftedLinOpCoarse,simple,50,50);
|
||||||
L2PGCR.Level(3);
|
L2PGCR.Level(3);
|
||||||
c_res=Zero();
|
c_res=Zero();
|
||||||
L2PGCR(c_src,c_res);
|
L2PGCR(c_src,c_res);
|
||||||
@@ -283,7 +298,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<LatticeFermionD> simple_fine;
|
TrivialPrecon<LatticeFermionD> simple_fine;
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.1,1,ShiftedLinOpDw,simple_fine,4,4);
|
||||||
SmootherGCR.Level(2);
|
SmootherGCR.Level(2);
|
||||||
|
|
||||||
LatticeFermionD f_src(FGrid);
|
LatticeFermionD f_src(FGrid);
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ int main (int argc, char ** argv)
|
|||||||
{
|
{
|
||||||
Grid_init(&argc,&argv);
|
Grid_init(&argc,&argv);
|
||||||
|
|
||||||
|
const int Ls=16;
|
||||||
|
|
||||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
||||||
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||||
@@ -151,8 +152,8 @@ int main (int argc, char ** argv)
|
|||||||
// Construct a coarsened grid
|
// Construct a coarsened grid
|
||||||
Coordinate clatt = GridDefaultLatt();
|
Coordinate clatt = GridDefaultLatt();
|
||||||
for(int d=0;d<clatt.size();d++){
|
for(int d=0;d<clatt.size();d++){
|
||||||
// clatt[d] = clatt[d]/2;
|
clatt[d] = clatt[d]/2;
|
||||||
clatt[d] = clatt[d]/4;
|
// clatt[d] = clatt[d]/4;
|
||||||
}
|
}
|
||||||
GridCartesian *Coarse4d = SpaceTimeGrid::makeFourDimGrid(clatt, GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());;
|
GridCartesian *Coarse4d = SpaceTimeGrid::makeFourDimGrid(clatt, GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());;
|
||||||
|
|
||||||
@@ -161,23 +162,26 @@ int main (int argc, char ** argv)
|
|||||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||||
GridParallelRNG CRNG(Coarse4d);CRNG.SeedFixedIntegers(cseeds);
|
GridParallelRNG CRNG(Coarse4d);CRNG.SeedFixedIntegers(cseeds);
|
||||||
|
|
||||||
LatticeFermion src(FGrid); random(RNG4,src);
|
Complex one(1.0);
|
||||||
|
|
||||||
|
LatticeFermion src(FGrid); src=one;
|
||||||
LatticeFermion result(FGrid); result=Zero();
|
LatticeFermion result(FGrid); result=Zero();
|
||||||
LatticeFermion ref(FGrid); ref=Zero();
|
LatticeFermion ref(FGrid); ref=Zero();
|
||||||
LatticeFermion tmp(FGrid);
|
LatticeFermion tmp(FGrid);
|
||||||
LatticeFermion err(FGrid);
|
LatticeFermion err(FGrid);
|
||||||
|
LatticeFermion precsrc(FGrid);
|
||||||
LatticeGaugeField Umu(UGrid);
|
LatticeGaugeField Umu(UGrid);
|
||||||
|
|
||||||
FieldMetaData header;
|
FieldMetaData header;
|
||||||
std::string file("ckpoint_lat.1000");
|
std::string file("ckpoint_lat");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
|
||||||
RealD csw =1.0;
|
RealD csw =0.0;
|
||||||
RealD mass=-0.6222;
|
RealD mass=-0.92;
|
||||||
|
|
||||||
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
||||||
|
|
||||||
const int nbasis = 60;
|
const int nbasis = 40;
|
||||||
const int cb = 0 ;
|
const int cb = 0 ;
|
||||||
LatticeFermion prom(FGrid);
|
LatticeFermion prom(FGrid);
|
||||||
|
|
||||||
@@ -195,12 +199,13 @@ int main (int argc, char ** argv)
|
|||||||
Subspace Aggregates(Coarse4d,FGrid,cb);
|
Subspace Aggregates(Coarse4d,FGrid,cb);
|
||||||
|
|
||||||
NonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> LinOpDw(Dw);
|
NonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> LinOpDw(Dw);
|
||||||
ShiftedNonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> ShiftedLinOpDw(Dw,0.1);
|
ShiftedNonHermitianLinearOperator<WilsonCloverFermionD,LatticeFermion> ShiftedLinOpDw(Dw,0.01);
|
||||||
|
|
||||||
Aggregates.CreateSubspaceGCR(RNG4,
|
Aggregates.CreateSubspaceGCR(RNG4,
|
||||||
LinOpDw,
|
LinOpDw,
|
||||||
nbasis);
|
nbasis);
|
||||||
|
|
||||||
|
|
||||||
LittleDiracOperator LittleDiracOp(geom,FGrid,Coarse4d);
|
LittleDiracOperator LittleDiracOp(geom,FGrid,Coarse4d);
|
||||||
LittleDiracOp.CoarsenOperator(LinOpDw,Aggregates);
|
LittleDiracOp.CoarsenOperator(LinOpDw,Aggregates);
|
||||||
|
|
||||||
@@ -216,7 +221,6 @@ int main (int argc, char ** argv)
|
|||||||
std::vector<LatticeFermion> subspace(nbasis,FGrid);
|
std::vector<LatticeFermion> subspace(nbasis,FGrid);
|
||||||
subspace=Aggregates.subspace;
|
subspace=Aggregates.subspace;
|
||||||
|
|
||||||
Complex one(1.0);
|
|
||||||
c_src = one; // 1 in every element for vector 1.
|
c_src = one; // 1 in every element for vector 1.
|
||||||
blockPromote(c_src,err,subspace);
|
blockPromote(c_src,err,subspace);
|
||||||
|
|
||||||
@@ -251,6 +255,15 @@ int main (int argc, char ** argv)
|
|||||||
**********
|
**********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// CG
|
||||||
|
{
|
||||||
|
MdagMLinearOperator<WilsonFermionD,LatticeFermion> HermOp(Dw);
|
||||||
|
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||||
|
Dw.Mdag(src,precsrc);
|
||||||
|
CG(HermOp,precsrc,result);
|
||||||
|
result=Zero();
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// Coarse grid solver test
|
// Coarse grid solver test
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
@@ -260,8 +273,12 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<CoarseVector> simple;
|
TrivialPrecon<CoarseVector> simple;
|
||||||
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
||||||
|
ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LittleDiracOp,0.001);
|
||||||
|
// ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LittleDiracOp,0.01);
|
||||||
|
// ShiftedNonHermitianLinearOperator<LittleDiracOperator,CoarseVector> ShiftedLinOpCoarse(LinOpCoarse,0.001);
|
||||||
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-2, 200, LinOpCoarse,simple,10,10);
|
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-1, 100, LinOpCoarse,simple,30,30);
|
||||||
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(2.0e-1, 50, ShiftedLinOpCoarse,simple,50,50);
|
||||||
L2PGCR.Level(3);
|
L2PGCR.Level(3);
|
||||||
c_res=Zero();
|
c_res=Zero();
|
||||||
L2PGCR(c_src,c_res);
|
L2PGCR(c_src,c_res);
|
||||||
@@ -274,7 +291,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<LatticeFermionD> simple_fine;
|
TrivialPrecon<LatticeFermionD> simple_fine;
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.1,1,ShiftedLinOpDw,simple_fine,6,6);
|
||||||
SmootherGCR.Level(2);
|
SmootherGCR.Level(2);
|
||||||
|
|
||||||
LatticeFermionD f_src(FGrid);
|
LatticeFermionD f_src(FGrid);
|
||||||
|
|||||||
@@ -170,11 +170,11 @@ int main (int argc, char ** argv)
|
|||||||
LatticeGaugeField Umu(UGrid);
|
LatticeGaugeField Umu(UGrid);
|
||||||
|
|
||||||
FieldMetaData header;
|
FieldMetaData header;
|
||||||
std::string file("ckpoint_lat.1000");
|
std::string file("ckpoint_lat");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
|
||||||
RealD csw =1.0;
|
RealD csw =0.0;
|
||||||
RealD mass=-0.6222;
|
RealD mass=-0.92;
|
||||||
|
|
||||||
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ int main (int argc, char ** argv)
|
|||||||
TrivialPrecon<CoarseVector> simple;
|
TrivialPrecon<CoarseVector> simple;
|
||||||
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
||||||
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(3.0e-2, 100, LinOpCoarse,simple,10,10);
|
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-2, 100, LinOpCoarse,simple,30,30);
|
||||||
L2PGCR.Level(3);
|
L2PGCR.Level(3);
|
||||||
c_res=Zero();
|
c_res=Zero();
|
||||||
L2PGCR(c_src,c_res);
|
L2PGCR(c_src,c_res);
|
||||||
@@ -285,7 +285,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<LatticeFermionD> simple_fine;
|
TrivialPrecon<LatticeFermionD> simple_fine;
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,4,4);
|
||||||
SmootherGCR.Level(2);
|
SmootherGCR.Level(2);
|
||||||
|
|
||||||
LatticeFermionD f_src(FGrid);
|
LatticeFermionD f_src(FGrid);
|
||||||
@@ -304,7 +304,7 @@ int main (int argc, char ** argv)
|
|||||||
LinOpCoarse,
|
LinOpCoarse,
|
||||||
L2PGCR);
|
L2PGCR);
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,LinOpDw,TwoLevelPrecon,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,LinOpDw,TwoLevelPrecon,32,32);
|
||||||
L1PGCR.Level(1);
|
L1PGCR.Level(1);
|
||||||
|
|
||||||
f_res=Zero();
|
f_res=Zero();
|
||||||
|
|||||||
@@ -170,11 +170,11 @@ int main (int argc, char ** argv)
|
|||||||
LatticeGaugeField Umu(UGrid);
|
LatticeGaugeField Umu(UGrid);
|
||||||
|
|
||||||
FieldMetaData header;
|
FieldMetaData header;
|
||||||
std::string file("ckpoint_lat.1000");
|
std::string file("ckpoint_lat");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
|
||||||
RealD csw =1.0;
|
RealD csw =0.0;
|
||||||
RealD mass=-0.6222;
|
RealD mass=-0.92;
|
||||||
|
|
||||||
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
WilsonCloverFermionD Dw(Umu,*UGrid,*UrbGrid,mass,csw,csw);
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ int main (int argc, char ** argv)
|
|||||||
TrivialPrecon<CoarseVector> simple;
|
TrivialPrecon<CoarseVector> simple;
|
||||||
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
NonHermitianLinearOperator<LittleDiracOperator,CoarseVector> LinOpCoarse(LittleDiracOp);
|
||||||
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
// PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-4, 100, LinOpCoarse,simple,10,10);
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(3.0e-2, 100, LinOpCoarse,simple,10,10);
|
PrecGeneralisedConjugateResidualNonHermitian<CoarseVector> L2PGCR(1.0e-2, 100, LinOpCoarse,simple,30,30);
|
||||||
L2PGCR.Level(3);
|
L2PGCR.Level(3);
|
||||||
c_res=Zero();
|
c_res=Zero();
|
||||||
L2PGCR(c_src,c_res);
|
L2PGCR(c_src,c_res);
|
||||||
@@ -277,7 +277,7 @@ int main (int argc, char ** argv)
|
|||||||
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
std::cout<<GridLogMessage<<"******************* "<<std::endl;
|
||||||
TrivialPrecon<LatticeFermionD> simple_fine;
|
TrivialPrecon<LatticeFermionD> simple_fine;
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermionD> SmootherGCR(0.01,1,ShiftedLinOpDw,simple_fine,6,6);
|
||||||
SmootherGCR.Level(2);
|
SmootherGCR.Level(2);
|
||||||
|
|
||||||
LatticeFermionD f_src(FGrid);
|
LatticeFermionD f_src(FGrid);
|
||||||
@@ -296,7 +296,7 @@ int main (int argc, char ** argv)
|
|||||||
LinOpCoarse,
|
LinOpCoarse,
|
||||||
L2PGCR);
|
L2PGCR);
|
||||||
|
|
||||||
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,LinOpDw,TwoLevelPrecon,16,16);
|
PrecGeneralisedConjugateResidualNonHermitian<LatticeFermion> L1PGCR(1.0e-8,1000,LinOpDw,TwoLevelPrecon,32,32);
|
||||||
L1PGCR.Level(1);
|
L1PGCR.Level(1);
|
||||||
|
|
||||||
f_res=Zero();
|
f_res=Zero();
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GRID_ASSERT(s==nshift);
|
assert(s==nshift);
|
||||||
coalescedWrite(gStaple_v[ss],stencil_ss);
|
coalescedWrite(gStaple_v[ss],stencil_ss);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user