2016-07-12 13:36:10 +01:00
|
|
|
/*
|
|
|
|
* Policy classes for the HMC
|
|
|
|
* Author: Guido Cossu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ADJOINT_H
|
|
|
|
#define ADJOINT_H
|
|
|
|
|
|
|
|
|
|
|
|
namespace Grid {
|
|
|
|
namespace QCD {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is an helper class for the HMC
|
|
|
|
* Should contain only the data for the adjoint representation
|
|
|
|
* and the facility to convert from the fundamental -> adjoint
|
|
|
|
*/
|
|
|
|
|
|
|
|
template <int ncolour>
|
|
|
|
class AdjointRep {
|
|
|
|
public:
|
2016-07-13 17:51:18 +01:00
|
|
|
// typdef to be used by the Representations class in HMC to get the
|
|
|
|
// types for the higher representation fields
|
2016-07-15 13:39:47 +01:00
|
|
|
typedef typename SU_Adjoint<ncolour>::LatticeAdjMatrix LatticeMatrix;
|
|
|
|
typedef typename SU_Adjoint<ncolour>::LatticeAdjField LatticeField;
|
2016-07-12 13:36:10 +01:00
|
|
|
const int Dimension = ncolour * ncolour - 1;
|
|
|
|
|
2016-07-13 17:51:18 +01:00
|
|
|
LatticeField U;
|
|
|
|
|
|
|
|
|
|
|
|
explicit AdjointRep(GridBase* grid) : U(grid) {}
|
2016-07-15 13:39:47 +01:00
|
|
|
void update_representation(const LatticeGaugeField& Uin) {
|
2016-07-12 13:36:10 +01:00
|
|
|
// Uin is in the fundamental representation
|
|
|
|
// get the U in AdjointRep
|
|
|
|
// (U_adj)_B = tr[e^a U e^b U^dag]
|
|
|
|
// e^a = t^a/sqrt(T_F)
|
|
|
|
// where t^a is the generator in the fundamental
|
|
|
|
// T_F is 1/2 for the fundamental representation
|
|
|
|
conformable(U, Uin);
|
|
|
|
U = zero;
|
|
|
|
LatticeGaugeField tmp(Uin._grid);
|
|
|
|
|
2016-07-13 17:51:18 +01:00
|
|
|
Vector<typename SU<ncolour>::Matrix> ta(ncolour * ncolour - 1);
|
2016-07-12 13:36:10 +01:00
|
|
|
|
2016-07-13 17:51:18 +01:00
|
|
|
// FIXME probably not very efficient to get all the generators
|
|
|
|
// everytime
|
2016-07-12 13:36:10 +01:00
|
|
|
for (int a = 0; a < Dimension; a++) SU<ncolour>::generator(a, ta[a]);
|
|
|
|
|
|
|
|
for (int a = 0; a < Dimension; a++) {
|
2016-07-13 17:51:18 +01:00
|
|
|
tmp = 2.0 * adj(Uin) * ta[a] * Uin;
|
2016-07-12 13:36:10 +01:00
|
|
|
for (int b = 0; b < (ncolour * ncolour - 1); b++) {
|
|
|
|
auto Tr = TensorRemove(trace(tmp * ta[b]));
|
2016-07-13 17:51:18 +01:00
|
|
|
pokeColour(U, Tr, a, b);
|
2016-07-12 13:36:10 +01:00
|
|
|
}
|
|
|
|
}
|
2016-07-13 17:51:18 +01:00
|
|
|
|
2016-07-12 13:36:10 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef AdjointRep<Nc> AdjointRepresentation;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|