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

deal with post-merge trauma

This commit is contained in:
Alessandro Lupo
2023-06-13 17:21:01 +01:00
parent e09dfbf1c2
commit c797cbe737
7 changed files with 35 additions and 45 deletions

View File

@ -176,7 +176,6 @@ class GaugeGroup {
GridBase *grid = out.Grid();
typedef typename LatticeMatrixType::vector_type vector_type;
typedef typename LatticeMatrixType::scalar_type scalar_type;
typedef iSinglet<vector_type> vTComplexType;

View File

@ -566,43 +566,40 @@ static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupNam
/*
* Fundamental rep gauge xform
*/
template <typename Fundamental, typename GaugeMat, ONLY_IF_SU>
static void GaugeTransformFundamental(Fundamental &ferm, GaugeMat &g) {
template<typename Fundamental,typename GaugeMat>
static void GaugeTransformFundamental( Fundamental &ferm, GaugeMat &g){
GridBase *grid = ferm._grid;
conformable(grid, g._grid);
ferm = g * ferm;
conformable(grid,g._grid);
ferm = g*ferm;
}
/*
* Adjoint rep gauge xform
*/
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU>
static void GaugeTransform(GaugeField &Umu, GaugeMat &g) {
template<typename Gimpl>
static void GaugeTransform(typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
GridBase *grid = Umu.Grid();
conformable(grid, g.Grid());
conformable(grid,g.Grid());
GaugeMat U(grid);
GaugeMat ag(grid);
ag = adj(g);
typename Gimpl::GaugeLinkField U(grid);
typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
for (int mu = 0; mu < Nd; mu++) {
U = PeekIndex<LorentzIndex>(Umu, mu);
U = g * U * Cshift(ag, mu, 1);
PokeIndex<LorentzIndex>(Umu, U, mu);
for(int mu=0;mu<Nd;mu++){
U= PeekIndex<LorentzIndex>(Umu,mu);
U = g*U*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
PokeIndex<LorentzIndex>(Umu,U,mu);
}
}
template <typename GaugeMat, ONLY_IF_SU>
static void GaugeTransform(std::vector<GaugeMat> &U, GaugeMat &g) {
template<typename Gimpl>
static void GaugeTransform( std::vector<typename Gimpl::GaugeLinkField> &U, typename Gimpl::GaugeLinkField &g){
GridBase *grid = g.Grid();
GaugeMat ag(grid);
ag = adj(g);
for (int mu = 0; mu < Nd; mu++) {
U[mu] = g * U[mu] * Cshift(ag, mu, 1);
typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
for(int mu=0;mu<Nd;mu++){
U[mu] = g*U[mu]*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
}
}
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU>
static void RandomGaugeTransform(GridParallelRNG &pRNG, GaugeField &Umu,
GaugeMat &g) {
LieRandomize(pRNG, g, 1.0);
GaugeTransform(Umu, g);
template<typename Gimpl>
static void RandomGaugeTransform(GridParallelRNG &pRNG, typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
LieRandomize(pRNG,g,1.0);
GaugeTransform<Gimpl>(Umu,g);
}