37 static constexpr
float value() {
return 1.0e-5; }
42 static constexpr
double value() {
return 1.0e-13; }
47 template<
typename Q,
typename C,
typename R,
typename S>
57 QDP::StopWatch swatch;
77 for(
int i=0;
i < Nc; ++
i)
78 for(
int j=0;
j < Nc; ++
j)
79 (
a[
i][
j])[mstag] = peekColor(xa,
i,
j);
89 sigmasq[mstag] = sqrt(localNorm2(
a[0][0]));
93 (
a[0][0])[mstag] /= sigmasq;
100 sigmasq[mstag] = fabs(1-sigmasq);
108 numbad = toInt(
sum(where(sigmasq > fuzz, LatticeInteger(1), LatticeInteger(0))));
115 bad[mstag] = sigmasq > fuzz;
116 numbad = toInt(
sum(where(
bad, LatticeInteger(1), LatticeInteger(0)),
131 for(
int c = 0;
c < Nc; ++
c)
132 (row[
c])[mstag] =
a[
c][Nc-1];
137 t1[mstag] = localNorm2(
a[0][0]);
138 for(
int c = 1;
c < Nc; ++
c)
139 t1[mstag] += localNorm2(
a[
c][0]);
140 t1[mstag] = sqrt(t1);
146 for(
int c = 0;
c < Nc; ++
c)
147 (
a[
c][0])[mstag] *= t4;
150 (
a[1][1])[mstag] = adj(
a[0][0]);
151 (
a[0][1])[mstag] = -adj(
a[1][0]);
160 sigmasq[mstag] = pow(1-t1,2);
164 for(
int c = 0;
c < Nc; ++
c)
165 sigmasq[mstag] += localNorm2(row[
c] -
a[
c][Nc-1]);
167 sigmasq[mstag] = sqrt(sigmasq);
176 numbad = toInt(
sum(where(sigmasq > fuzz, LatticeInteger(1), LatticeInteger(0))));
183 bad[mstag] = sigmasq > fuzz;
184 numbad = toInt(
sum(where(
bad, LatticeInteger(1), LatticeInteger(0)),
200 for(
int c = 0;
c < Nc; ++
c)
201 (row[
c])[mstag] =
a[
c][Nc-1];
207 t1[mstag] = localNorm2(
a[0][0]);
208 for(
int c = 1;
c < Nc; ++
c)
209 t1[mstag] += localNorm2(
a[
c][0]);
210 t1[mstag] = sqrt(t1);
216 for(
int c = 0;
c < Nc; ++
c)
217 (
a[
c][0])[mstag] *= t4;
221 t2[mstag] = adj(
a[0][0]) *
a[0][1];
222 for(
int c = 1;
c < Nc; ++
c)
223 t2[mstag] += adj(
a[
c][0]) *
a[
c][1];
227 for(
int c = 0;
c < Nc; ++
c)
228 (
a[
c][1])[mstag] -= t2 *
a[
c][0];
232 t3[mstag] = localNorm2(
a[0][1]);
233 for(
int c = 1;
c < Nc; ++
c)
234 t3[mstag] += localNorm2(
a[
c][1]);
235 t3[mstag] = sqrt(t3);
240 for(
int c = 0;
c < Nc; ++
c)
241 (
a[
c][1])[mstag] *= t4;
246 (
a[0][2])[mstag] = adj(
a[1][0]) * adj(
a[2][1]) -
247 adj(
a[2][0]) * adj(
a[1][1]);
250 (
a[1][2])[mstag] = adj(
a[2][0]) * adj(
a[0][1]) -
251 adj(
a[0][0]) * adj(
a[2][1]);
254 (
a[2][2])[mstag] = adj(
a[0][0]) * adj(
a[1][1]) -
255 adj(
a[1][0]) * adj(
a[0][1]);
264 sigmasq[mstag] = pow(1-t1,2) + localNorm2(t2) + pow(1-t3,2);
268 for(
int c = 0;
c < Nc; ++
c)
269 sigmasq[mstag] += localNorm2(row[
c] -
a[
c][Nc-1]);
271 sigmasq[mstag] = sqrt(sigmasq);
280 numbad = toInt(
sum(where(sigmasq > fuzz, LatticeInteger(1),
288 bad[mstag] = sigmasq > fuzz;
289 numbad = toInt(
sum(where(
bad,LatticeInteger(1), LatticeInteger(0)),
306 for(
int c = 0;
c < Nc; ++
c)
307 (row[
c])[mstag] =
a[
c][Nc-1];
312 t1[mstag] = localNorm2(
a[0][0]);
313 for(
int c = 1;
c < Nc; ++
c)
314 t1[mstag] += localNorm2(
a[
c][0]);
315 t1[mstag] = sqrt(t1);
322 sigmasq[mstag] = pow(1-t1,2);
328 for(
int c = 0;
c < Nc; ++
c)
329 (
a[
c][0])[mstag] *= t3;
332 for(
int j = 1;
j < Nc;
j++ )
334 for(
int i = 0;
i <
j;
i++ )
337 t2[mstag] = adj(
a[0][
i]) *
a[0][
j];
338 for(
int c = 1;
c < Nc; ++
c)
340 t2[mstag] += adj(
a[
c][
i]) *
a[
c][
j];
345 sigmasq[mstag] += localNorm2(t2);
349 for(
int c = 0;
c < Nc; ++
c)
351 (
a[
c][
j])[mstag] -= t2 *
a[
c][
i];
357 t1[mstag] = localNorm2(
a[0][
j]);
358 for(
int c = 1;
c < Nc; ++
c)
359 t1[mstag] += localNorm2(
a[
c][
j]);
360 t1[mstag] = sqrt(t1);
365 for(
int c = 0;
c < Nc; ++
c)
366 (
a[
c][
j])[mstag] *= t3;
373 sigmasq[mstag] += pow(1-t1,2);
380 for(
int j = 0;
j < Nc;
j++)
381 for(
int i = 0;
i < Nc;
i++)
382 (
b[
j][
i])[mstag] =
a[
j][
i];
384 for(
int j = 0;
j < Nc;
j++)
386 for(
int i = 0;
i <=
j;
i++)
389 for(
int c = 0;
c <
i;
c++)
390 t2[mstag] -=
b[
c][
i] *
b[
j][
c];
392 (
b[
j][
i])[mstag] = t2;
395 for(
int i = (
j+1);
i < Nc;
i++)
398 for(
int c = 0;
c <
j;
c++)
399 t2[mstag] -=
b[
c][
i] *
b[
j][
c];
401 (
b[
j][
i])[mstag] = adj(
b[
j][
j]) * t2 / localNorm2(
b[
j][
j]);
406 t2[mstag] =
b[0][0] *
b[1][1];
407 for(
int c = 2;
c < Nc;
c++)
408 t2[mstag] *=
b[
c][
c];
411 t4[mstag] = atan2(imag(t2), real(t1));
412 t2[mstag] = cmplx(cos(t4), -sin(t4));
413 for(
int c = 0;
c < Nc; ++
c)
414 (
a[
c][Nc-1])[mstag] *= t2;
422 for(
int c = 0;
c < Nc; ++
c)
423 sigmasq[mstag] += localNorm2(row[
c] -
a[
c][Nc-1]);
425 sigmasq[mstag] = sqrt(sigmasq);
428 numbad = toInt(
sum(where(sigmasq > fuzz, LatticeInteger(1),
429 LatticeInteger(0))));
436 numbad = toInt(
sum(where(sigmasq > fuzz, LatticeInteger(1),
437 LatticeInteger(0))));
443 bad[mstag] = sigmasq > fuzz;
456 for(
int i=0;
i < Nc; ++
i)
457 for(
int j=0;
j < Nc; ++
j)
458 pokeColor(xa[mstag],
a[
i][
j],
i,
j);
474 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad,
REUNITARIZE, all);
488 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad,
REUNITARIZE, all);
503 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad,
REUNITARIZE, mstag);
517 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad,
REUNITARIZE, mstag);
533 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad,
REUNITARIZE, all);
547 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad,
REUNITARIZE, all);
563 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad,
REUNITARIZE, mstag);
578 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad,
REUNITARIZE, mstag);
589 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad, ruflag, all);
598 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad, ruflag, all);
608 reunit_t<LatticeColorMatrixF3, LatticeComplexF, LatticeRealF, Subset>(xa,
bad,
numbad, ruflag, mstag);
619 reunit_t<LatticeColorMatrixD3, LatticeComplexD, LatticeRealD, Subset>(xa,
bad,
numbad, ruflag, mstag);
Primary include file for CHROMA library code.
SpinMatrix C()
C = Gamma(10)
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
LinOpSysSolverMGProtoClover::Q Q
void reunit(LatticeColorMatrixF3 &xa)
void reunit_t(Q &xa, LatticeBoolean &bad, int &numbad, enum Reunitarize ruflag, const S &mstag)
Reunitarize in place a color matrix to SU(N)
static constexpr double value()
static constexpr float value()