mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-20 08:46:55 +01:00
projection on Sp2n algebra, to be used instead of Ta
This commit is contained in:
@ -414,13 +414,6 @@ static void OmegaInvariance(ColourMatrix &in) {
|
||||
Omega = Zero();
|
||||
const int nsp=ncolour/2;
|
||||
|
||||
std::cout << GridLogMessage << "I am a ColourMatrix" << std::endl;
|
||||
|
||||
// for (int i = 0; i < ncolour; i++) wrong?!
|
||||
//{
|
||||
// Omega()()(i, 2*ncolour-1-i) = 1.;
|
||||
// Omega()()(2*ncolour-1-i, i) = -1;
|
||||
// }
|
||||
for (int i = 0; i < nsp; i++) {
|
||||
Omega()()(i, nsp + i) = 1.;
|
||||
Omega()()(nsp + i, i) = -1;
|
||||
@ -454,8 +447,6 @@ static void OmegaInvariance(GaugeField &in) {
|
||||
Omega = Zero();
|
||||
identity = 1.;
|
||||
|
||||
std::cout << GridLogMessage << "I am a GaugeField " << std::endl;
|
||||
|
||||
U = PeekIndex<LorentzIndex>(in, 1);
|
||||
|
||||
OmegaInvariance(U);
|
||||
@ -473,8 +464,6 @@ static void OmegaInvariance(LatticeColourMatrixD &in) {
|
||||
Omega = Zero();
|
||||
identity = 1.;
|
||||
|
||||
std::cout << GridLogMessage << "I am a LatticeColourMatrix " << std::endl;
|
||||
|
||||
for (int i = 0; i < nsp; i++) {
|
||||
Omega()()(i, nsp + i) = 1.;
|
||||
Omega()()(nsp + i, i) = -1;
|
||||
@ -496,3 +485,21 @@ static void OmegaInvariance(LatticeColourMatrixD &in) {
|
||||
}
|
||||
}
|
||||
|
||||
template <ONLY_IF_Sp>
|
||||
static void Omega(LatticeColourMatrixD &in) {
|
||||
const int nsp=ncolour/2;
|
||||
LatticeColourMatrixD OmegaLatt(in.Grid());
|
||||
LatticeColourMatrixD identity(in.Grid());
|
||||
ColourMatrix Omega;
|
||||
|
||||
OmegaLatt = Zero();
|
||||
Omega = Zero();
|
||||
identity = 1.;
|
||||
|
||||
for (int i = 0; i < nsp; i++) {
|
||||
Omega()()(i, nsp + i) = 1.;
|
||||
Omega()()(nsp + i, i) = -1;
|
||||
}
|
||||
OmegaLatt = OmegaLatt + (identity * Omega);
|
||||
in = OmegaLatt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user