1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-08-03 13:17:06 +01:00

Added unit tests on the representation transformations

Status: Passing all tests
This commit is contained in:
Guido Cossu
2016-08-08 16:54:22 +01:00
parent 49b5c49851
commit 147e2025b9
9 changed files with 143 additions and 14 deletions

View File

@@ -672,6 +672,20 @@ class SU {
}
}
// Projects the algebra components a lattice matrix (of dimension ncol*ncol -1 )
// inverse operation: FundamentalLieAlgebraMatrix
static void projectOnAlgebra(LatticeAlgebraVector &h_out, const LatticeMatrix &in, Real scale = 1.0) {
conformable(h_out, in);
h_out = zero;
Matrix Ta;
for (int a = 0; a < AdjointDimension; a++) {
generator(a, Ta);
auto tmp = - 2.0 * (trace(timesI(Ta) * in)) * scale;// 2.0 for the normalization of the trace in the fundamental rep
pokeColour(h_out, tmp, a);
}
std::cout << "h_out " << h_out << std::endl;
}
template <typename GaugeField>