1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-07-13 19:47:06 +01:00

prettiest tests

This commit is contained in:
Alessandro Lupo
2023-07-02 13:25:57 +01:00
parent 559257bbe9
commit 34b11864b6
3 changed files with 129 additions and 104 deletions

View File

@ -300,3 +300,18 @@ static void Omega(LatticeColourMatrixD &in) {
OmegaLatt = OmegaLatt + (identity * Omega);
in = OmegaLatt;
}
template <ONLY_IF_Sp, class vtype, int N>
static void Omega(iScalar<iScalar<iMatrix<vtype, N> > > &in) {
const int nsp=ncolour/2;
iScalar<iScalar<iMatrix<vtype, N> > > Omega;
Omega = Zero();
for (int i = 0; i < nsp; i++) {
Omega()()(i, nsp + i) = 1.;
Omega()()(nsp + i, i) = -1;
}
in = Omega;
}