mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
tests: wilson clover cg tests now include compact variant as well as
exponential wilson clover operators
This commit is contained in:
parent
013dc2ef33
commit
239e2c1ee6
@ -71,7 +71,12 @@ int main (int argc, char ** argv)
|
||||
RealD mass = -0.1;
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
RealD cF = 1.0;
|
||||
WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
|
||||
|
||||
// HermitianOperator<WilsonFermion,LatticeFermion> HermOp(Dw);
|
||||
// ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
@ -80,12 +85,28 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src_o(&RBGrid);
|
||||
LatticeFermion result_o(&RBGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o=Zero();
|
||||
|
||||
SchurDiagMooeeOperator<WilsonCloverFermionR,LatticeFermion> HermOpEO(Dw);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl;
|
||||
SchurDiagMooeeOperator<WilsonCloverFermionR,LatticeFermion> HermOpEO(Dw);
|
||||
result_o=Zero();
|
||||
CG(HermOpEO,src_o,result_o);
|
||||
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl;
|
||||
SchurDiagMooeeOperator<CompactWilsonCloverFermionR,LatticeFermion> HermOpEO_compact(Dw_compact);
|
||||
result_o=Zero();
|
||||
CG(HermOpEO_compact,src_o,result_o);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl;
|
||||
SchurDiagMooeeOperator<WilsonExpCloverFermionR,LatticeFermion> HermOpEO_exp(Dwe);
|
||||
result_o=Zero();
|
||||
CG(HermOpEO_exp,src_o,result_o);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl;
|
||||
SchurDiagMooeeOperator<CompactWilsonExpCloverFermionR,LatticeFermion> HermOpEO_exp_compact(Dwe_compact);
|
||||
result_o=Zero();
|
||||
CG(HermOpEO_exp_compact,src_o,result_o);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@ -60,18 +60,36 @@ int main (int argc, char ** argv)
|
||||
LatticeGaugeField Umu(&Grid); SU<Nc>::HotConfiguration(pRNG,Umu);
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeFermion resid(&Grid);
|
||||
|
||||
RealD mass = -0.1;
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
LatticeFermion result(&Grid);
|
||||
LatticeFermion resid(&Grid);
|
||||
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
SchurRedBlackDiagMooeeSolve<LatticeFermion> SchurSolver(CG);
|
||||
|
||||
RealD mass = -0.1;
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
RealD cF = 1.0;
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl;
|
||||
WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
result=Zero();
|
||||
SchurSolver(Dw,src,result);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl;
|
||||
CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
result=Zero();
|
||||
SchurSolver(Dw_compact,src,result);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl;
|
||||
WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
result=Zero();
|
||||
SchurSolver(Dwe,src,result);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl;
|
||||
CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
result=Zero();
|
||||
SchurSolver(Dwe_compact,src,result);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
@ -59,7 +59,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);
|
||||
LatticeGaugeField Umu(&Grid); SU<Nc>::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
@ -70,11 +70,34 @@ int main (int argc, char ** argv)
|
||||
RealD mass = -0.1;
|
||||
RealD csw_r = 1.0;
|
||||
RealD csw_t = 1.0;
|
||||
RealD cF = 1.0;
|
||||
WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t);
|
||||
CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0);
|
||||
|
||||
MdagMLinearOperator<WilsonFermionR,LatticeFermion> HermOp(Dw);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl;
|
||||
MdagMLinearOperator<WilsonCloverFermionR,LatticeFermion> HermOp(Dw);
|
||||
result=Zero();
|
||||
CG(HermOp,src,result);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl;
|
||||
MdagMLinearOperator<CompactWilsonCloverFermionR,LatticeFermion> HermOp_compact(Dw_compact);
|
||||
result=Zero();
|
||||
CG(HermOp_compact,src,result);
|
||||
|
||||
|
||||
std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl;
|
||||
MdagMLinearOperator<WilsonExpCloverFermionR,LatticeFermion> HermOp_exp(Dwe);
|
||||
result=Zero();
|
||||
CG(HermOp_exp,src,result);
|
||||
|
||||
std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl;
|
||||
MdagMLinearOperator<CompactWilsonExpCloverFermionR,LatticeFermion> HermOp_exp_compact(Dwe_compact);
|
||||
result=Zero();
|
||||
CG(HermOp_exp_compact,src,result);
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user