mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
More debug test
This commit is contained in:
parent
031c94e02e
commit
6579dd30ff
@ -276,7 +276,6 @@ public:
|
||||
p.clovCoeffT = QDP::Real(1.0);
|
||||
Real u0 = QDP::Real(1.0);
|
||||
|
||||
|
||||
Chroma::Handle<Chroma::FermBC<T4, U, U>> fbc(new Chroma::SimpleFermBC<T4, U, U>(bcs));
|
||||
Chroma::Handle<Chroma::CreateFermState<T4, U, U>> cfs(new Chroma::CreateSimpleFermState<T4, U, U>(fbc));
|
||||
Chroma::UnprecCloverFermAct S_f(cfs, p);
|
||||
@ -352,15 +351,14 @@ int main(int argc, char **argv)
|
||||
std::cout << "Norm of difference " << Grid::norm2(difference) << std::endl;
|
||||
|
||||
// Isolate Clover term
|
||||
calc_grid(Wilson, Ug, src, only_wilson, dag);// Wilson term
|
||||
calc_grid(Wilson, Ug, src, only_wilson, dag); // Wilson term
|
||||
res_grid -= only_wilson;
|
||||
res_chroma -= only_wilson;
|
||||
|
||||
std::cout << "Chroma:" << res_chroma << std::endl;
|
||||
std::cout << "Grid :" << res_grid << std::endl;
|
||||
|
||||
|
||||
|
||||
difference = (res_grid-res_chroma);
|
||||
std::cout << "Difference :" << difference << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -371,7 +369,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void calc_chroma(ChromaAction action, GaugeField &lat, FermionField &src, FermionField &res, int dag)
|
||||
{
|
||||
QDP::multi1d<QDP::LatticeColorMatrix> u(4);
|
||||
@ -435,6 +432,8 @@ void make_gauge(GaugeField &Umu, FermionField &src)
|
||||
Grid::QCD::SpinColourVector F;
|
||||
Grid::Complex c;
|
||||
|
||||
|
||||
|
||||
std::vector<int> x(4); // 4d fermions
|
||||
std::vector<int> gd = src._grid->GlobalDimensions();
|
||||
|
||||
@ -446,15 +445,20 @@ void make_gauge(GaugeField &Umu, FermionField &src)
|
||||
{
|
||||
for (x[3] = 0; x[3] < gd[3]; x[3]++)
|
||||
{
|
||||
for (int sp = 0; sp < 1; sp++)
|
||||
for (int sp = 0; sp < 4; sp++)
|
||||
{
|
||||
for (int j = 1; j < 2; j++)// colours
|
||||
for (int j = 0; j < 3; j++) // colours
|
||||
{
|
||||
c = Grid::Complex(1.0, 0.0);
|
||||
F()(sp)(j) = c;
|
||||
F()(sp)(j) = Grid::Complex(0.0,0.0);
|
||||
if (((sp == 0)|| (sp==3)) && (j==0))
|
||||
{
|
||||
c = Grid::Complex(1.0, 0.0);
|
||||
F()(sp)(j) = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
Grid::pokeSite(F, src, x);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user