From 86b02c3cd8d1b023e60bc55d69fd11f565d7e3a8 Mon Sep 17 00:00:00 2001 From: Alessandro Lupo Date: Tue, 2 May 2023 13:31:17 +0100 Subject: [PATCH] cleaning up requested by Julian --- Grid/qcd/utils/GaugeGroup.h | 5 ++--- Grid/qcd/utils/SUnAdjoint.h | 3 +-- Grid/qcd/utils/SUnTwoIndex.h | 3 +-- Grid/tensors/Tensor_Ta.h | 5 ++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Grid/qcd/utils/GaugeGroup.h b/Grid/qcd/utils/GaugeGroup.h index 22e124c6..d04488de 100644 --- a/Grid/qcd/utils/GaugeGroup.h +++ b/Grid/qcd/utils/GaugeGroup.h @@ -340,12 +340,12 @@ class GaugeGroup { template static void ProjectOnGaugeGroup(iVector &r) { - r = ProjectOnGaugeGroup(r, group_name()); + ProjectOnGaugeGroup(r, group_name()); } template ::TensorLevel == 0 >::type * =nullptr> static void ProjectOnGaugeGroup(iMatrix &arg) { - arg = ProjectOnGaugeGroup(arg, group_name()); + ProjectOnGaugeGroup(arg, group_name()); } template // reunitarise, resimplectify... previously ProjectSUn @@ -428,7 +428,6 @@ static void ProjectSUn( } } -// Explicit specialisation for SU(3). // Explicit specialisation for SU(3). static void ProjectSU3( Lattice > > > &Umu) { diff --git a/Grid/qcd/utils/SUnAdjoint.h b/Grid/qcd/utils/SUnAdjoint.h index 3a5954ca..acbb9da3 100644 --- a/Grid/qcd/utils/SUnAdjoint.h +++ b/Grid/qcd/utils/SUnAdjoint.h @@ -68,8 +68,7 @@ public: for (int a = 0; a < Dimension; a++) { tmp = ta[a] * ta[Index] - ta[Index] * ta[a]; for (int b = 0; b < (ncolour * ncolour - 1); b++) { - iSUnMatrix tmp1 = - 2.0 * tmp * ta[b]; // 2.0 from the normalization + iSUnMatrix tmp1 = 2.0 * tmp * ta[b]; // 2.0 from the normalization Complex iTr = TensorRemove(timesI(trace(tmp1))); //iAdjTa()()(b, a) = iTr; iAdjTa()()(a, b) = iTr; diff --git a/Grid/qcd/utils/SUnTwoIndex.h b/Grid/qcd/utils/SUnTwoIndex.h index 5e283de7..a7640d65 100644 --- a/Grid/qcd/utils/SUnTwoIndex.h +++ b/Grid/qcd/utils/SUnTwoIndex.h @@ -126,8 +126,7 @@ public: template static void generator(int Index, iSUnTwoIndexMatrix &i2indTa) { - Vector > ta( - ncolour * ncolour - 1); + Vector > ta(ncolour * ncolour - 1); Vector > eij(Dimension); iSUnMatrix tmp; i2indTa = Zero(); diff --git a/Grid/tensors/Tensor_Ta.h b/Grid/tensors/Tensor_Ta.h index 01b58adb..15120ffd 100644 --- a/Grid/tensors/Tensor_Ta.h +++ b/Grid/tensors/Tensor_Ta.h @@ -66,8 +66,6 @@ template accelerator_inline iMatrix Ta(const iMatrix return ret; } -// for sp2n can't be as simple as Ta. We do a Gram-Schmidt - template accelerator_inline iScalar SpTa(const iScalar&r) { iScalar ret; @@ -82,7 +80,8 @@ template accelerator_inline iVector SpTa(const iVect } return ret; } -template::TensorLevel == 0 >::type * =nullptr> accelerator_inline iMatrix SpTa(const iMatrix &arg) +template::TensorLevel == 0 >::type * =nullptr> +accelerator_inline iMatrix SpTa(const iMatrix &arg) { // Generalises Ta to Sp2n // Applies the following projections