mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
minor stylistic changes
This commit is contained in:
parent
4ea29b8f0f
commit
178376f24b
@ -133,19 +133,6 @@ public:
|
||||
|
||||
static inline Field projectForce(Field &P)
|
||||
{
|
||||
/* // this works
|
||||
iScalar<iScalar<iMatrix<Complex, Nc> > > gen;
|
||||
auto Psum = P;
|
||||
Psum = Zero();
|
||||
for (int a = 0; a < Group::AlgebraDimension; a++)
|
||||
{
|
||||
Group::generator(a, gen);
|
||||
auto coeff = 2. * trace(P * gen);
|
||||
Psum += coeff * gen;
|
||||
|
||||
|
||||
return Psum;}*/
|
||||
//this doesnt
|
||||
Field ret(P.Grid());
|
||||
Group::taProj(P, ret);
|
||||
return ret;
|
||||
@ -159,7 +146,7 @@ public:
|
||||
autoView(P_v,P,AcceleratorRead);
|
||||
accelerator_for(ss, P.Grid()->oSites(),1,{
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
U_v[ss](mu) = Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu); //
|
||||
U_v[ss](mu) = Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu);
|
||||
Group::ProjectOnGaugeGroup(U_v[ss](mu));
|
||||
}
|
||||
});
|
||||
|
@ -123,6 +123,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << "Determinant defect before projection " <<norm2(detU)<<std::endl;
|
||||
tmp = U*adj(U) - ident;
|
||||
std::cout << "Unitarity check before projection " << norm2(tmp)<<std::endl;
|
||||
|
||||
#if Nc==3
|
||||
ProjectSU3(U);
|
||||
detU= Determinant(U) ;
|
||||
@ -140,8 +141,3 @@ int main (int argc, char ** argv)
|
||||
|
||||
Grid_finalize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@ int main (int argc, char **argv)
|
||||
|
||||
identity = 1.0;
|
||||
RealD epsilon = 0.01;
|
||||
RealD Delta = 666.;
|
||||
Complex i(0., 1.);
|
||||
RealD u = 0.;
|
||||
double vol = Umu.Grid()->gSites();
|
||||
@ -118,7 +119,7 @@ int main (int argc, char **argv)
|
||||
|
||||
|
||||
std::cout << GridLogMessage << "Testing ProjectOnGaugeGroup" << std::endl;
|
||||
U = U + 2932.111*identity;
|
||||
U = U + Delta*identity;
|
||||
std::cout << GridLogMessage << "Apply ProjectOnGaugeGroup to deformed matrix" << std::endl;
|
||||
Sp<Nc>::ProjectOnGaugeGroup(U);
|
||||
aux = U*adj(U) - identity;
|
||||
@ -162,7 +163,7 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
std::cout << GridLogMessage << "Testing ProjectGn" << std::endl;
|
||||
U = U + 2932.111*identity;
|
||||
U = U + Delta*identity;
|
||||
std::cout << GridLogMessage << "Apply ProjectGn to deformed matrix" << std::endl;
|
||||
Sp<Nc>::ProjectGn(U);
|
||||
aux = U*adj(U) - identity;
|
||||
@ -214,7 +215,7 @@ int main (int argc, char **argv)
|
||||
std::cout << GridLogMessage << "Testing SpTa" << std::endl;
|
||||
|
||||
U = PeekIndex<LorentzIndex>(Umu,1);
|
||||
U = U + 666.*identity;
|
||||
U = U + Delta*identity;
|
||||
std::cout << GridLogMessage << "Matrix deformed " << std::endl;
|
||||
std::cout << GridLogMessage << "Apply SpTa to deformed matrix" << std::endl;
|
||||
U = SpTa(U);
|
||||
@ -279,7 +280,7 @@ int main (int argc, char **argv)
|
||||
|
||||
// test taProj
|
||||
std::cout << GridLogMessage << "Testing taProj" << std::endl;
|
||||
U = U + 666.*identity;
|
||||
U = U + Delta*identity;
|
||||
std::cout << GridLogMessage << "Matrix deformed " << std::endl;
|
||||
std::cout << GridLogMessage << "Apply taProj to deformed matrix" << std::endl;
|
||||
Sp<Nc>::taProj(U, Up);
|
||||
@ -334,9 +335,6 @@ int main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Grid_finalize();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user