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:
@@ -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>
|
||||
|
Reference in New Issue
Block a user