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

Remove code duplication: Iterating through vectors

This commit is contained in:
Julian Lenz
2023-04-21 08:08:06 +01:00
parent 5aabe074fe
commit 5e28fe56d2
3 changed files with 4 additions and 20 deletions

View File

@ -326,7 +326,10 @@ class GaugeGroup {
template <int N> // reunitarise, resimplectify...
static void ProjectOnGaugeGroup(Lattice<iVector<iScalar<iMatrix<vComplexD, N> >, Nd> > &U) {
ProjectOnGaugeGroup(U, group_name());
for (int mu = 0; mu < Nd; mu++) {
auto Umu = PeekIndex<LorentzIndex>(U, mu);
ProjectOnGaugeGroup(Umu);
}
}
template <int N> // reunitarise, resimplectify...