diff --git a/Grid/qcd/utils/GaugeGroup.h b/Grid/qcd/utils/GaugeGroup.h index 0e8fbabe..22e124c6 100644 --- a/Grid/qcd/utils/GaugeGroup.h +++ b/Grid/qcd/utils/GaugeGroup.h @@ -303,7 +303,6 @@ class GaugeGroup { template static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out) { taProj(in, out, group_name()); - //out = Ta(in); } template @@ -334,32 +333,20 @@ class GaugeGroup { ProjectOnGaugeGroup(Umu, group_name()); } - template - static void ProjectOnGaugeGroup(iScalar &r) { + template + static void ProjectOnGaugeGroup(iScalar &r) { ProjectOnGaugeGroup(r, group_name()); - } - - template - static void ProjectOnGaugeGroup(iVector &r) { - r = ProjectOnGaugeGroup(r, group_name()); - } - - template ::TensorLevel == 0 >::type * =nullptr> - static void ProjectOnGaugeGroup(iMatrix &arg) { - arg = ProjectOnGaugeGroup(arg, group_name()); - } - - -/* - template // reunitarise, resimplectify... - static void ProjectOnGaugeGroup(iVector >, Nd> &U) { - ProjectOnGaugeGroup(U, group_name()); } - - template // reunitarise, resimplectify... - static void ProjectOnGaugeGroup(iScalar > > &Umu) { - ProjectOnGaugeGroup(Umu, group_name()); - }*/ + + template + static void ProjectOnGaugeGroup(iVector &r) { + r = ProjectOnGaugeGroup(r, group_name()); + } + + template ::TensorLevel == 0 >::type * =nullptr> + static void ProjectOnGaugeGroup(iMatrix &arg) { + arg = ProjectOnGaugeGroup(arg, group_name()); + } template // reunitarise, resimplectify... previously ProjectSUn static void ProjectGn(Lattice > > > &Umu) { @@ -413,7 +400,6 @@ LatticeComplexD Determinant( return ret; } - template static void ProjectSUn( Lattice > > > &Umu) { diff --git a/Grid/qcd/utils/SUn.impl b/Grid/qcd/utils/SUn.impl index a5d2e2f1..3d2c3ec0 100644 --- a/Grid/qcd/utils/SUn.impl +++ b/Grid/qcd/utils/SUn.impl @@ -538,24 +538,6 @@ static void ProjectOnGaugeGroup(iMatrix &arg, GroupName::SU) { arg = ProjectOnGroup(arg); } - - - -/* -template // non-lattice objects -static void ProjectOnGaugeGroup(iScalar > > &Umu, GroupName::SU) { - Umu = ProjectOnGroup(Umu); - } - -template -static void ProjectOnGaugeGroup(iVector >, Nd> &U, GroupName::SU) { - // Reunitarise - for (int mu = 0; mu < Nd; mu++) { - auto Umu = PeekIndex(U, mu); - Umu = ProjectOnGroup(Umu); - } -}*/ - template static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::SU) { out = Ta(in); diff --git a/Grid/qcd/utils/Sp2n.impl b/Grid/qcd/utils/Sp2n.impl index 59b56b1f..d862b2b7 100644 --- a/Grid/qcd/utils/Sp2n.impl +++ b/Grid/qcd/utils/Sp2n.impl @@ -282,21 +282,6 @@ static void ProjectOnGaugeGroup(iMatrix &arg, GroupName::Sp) { arg = ProjectOnSpGroup(arg); } -/* -template // non-lattice objects -static void ProjectOnGaugeGroup(iScalar > > &Umu, GroupName::Sp) { - Umu = ProjectOnSpGroup(Umu); - } - -template -static void ProjectOnGaugeGroup(iVector >, Nd> &U, GroupName::Sp) { - // Reunitarise - for (int mu = 0; mu < Nd; mu++) { - auto Umu = PeekIndex(U, mu); - Umu = ProjectOnSpGroup(Umu); - } -}*/ - template static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::Sp) { out = SpTa(in); diff --git a/Grid/tensors/Tensor_Ta.h b/Grid/tensors/Tensor_Ta.h index c4e7a840..01b58adb 100644 --- a/Grid/tensors/Tensor_Ta.h +++ b/Grid/tensors/Tensor_Ta.h @@ -84,47 +84,44 @@ template accelerator_inline iVector SpTa(const iVect } template::TensorLevel == 0 >::type * =nullptr> accelerator_inline iMatrix SpTa(const iMatrix &arg) { - // Generalises Ta to Sp2n - // Applies the following projections - // P_{antihermitian} P_{antihermitian-Sp-algebra} P_{traceless} - // where the ordering matters - // P_{traceless} subtracts the trace - // P_{antihermitian-Sp-algebra} provides the block structure of the algebra based on U = exp(T) i.e. anti-hermitian generators - // P_{antihermitian} does in-adj(in) / 2 - iMatrix ret(arg); - double factor = (1.0/(double)N); - vtype nrm; - nrm = 0.5; + // Generalises Ta to Sp2n + // Applies the following projections + // P_{antihermitian} P_{antihermitian-Sp-algebra} P_{traceless} + // where the ordering matters + // P_{traceless} subtracts the trace + // P_{antihermitian-Sp-algebra} provides the block structure of the algebra based on U = exp(T) i.e. anti-hermitian generators + // P_{antihermitian} does in-adj(in) / 2 + iMatrix ret(arg); + double factor = (1.0/(double)N); + vtype nrm; + nrm = 0.5; - ret = arg - (trace(arg)*factor); + ret = arg - (trace(arg)*factor); - for(int c1=0;c1 accelerator_inline iScalar ProjectOnGroup(const iScalar&r) { iScalar ret; diff --git a/tests/core/Test_lie_generators.cc b/tests/core/Test_lie_generators.cc index 5b044061..7a86fd6a 100644 --- a/tests/core/Test_lie_generators.cc +++ b/tests/core/Test_lie_generators.cc @@ -47,7 +47,7 @@ using namespace Grid; int main(int argc, char** argv) { Grid_init(&argc, &argv); - + std::vector latt({4, 4, 4, 8}); GridCartesian* grid = SpaceTimeGrid::makeFourDimGrid( latt, GridDefaultSimd(Nd, vComplex::Nsimd()), GridDefaultMpi()); diff --git a/tests/core/Test_reunitarise.cc b/tests/core/Test_reunitarise.cc index 110ebabf..dd2f2041 100644 --- a/tests/core/Test_reunitarise.cc +++ b/tests/core/Test_reunitarise.cc @@ -36,7 +36,7 @@ using namespace Grid; int main (int argc, char ** argv) { Grid_init(&argc,&argv); - + std::vector latt({8,8,8,8}); GridCartesian * grid = SpaceTimeGrid::makeFourDimGrid(latt, GridDefaultSimd(Nd,vComplexD::Nsimd()), diff --git a/tests/sp2n/Test_sp2n_lie_gen.cc b/tests/sp2n/Test_sp2n_lie_gen.cc index 5c6430a3..bac7d084 100644 --- a/tests/sp2n/Test_sp2n_lie_gen.cc +++ b/tests/sp2n/Test_sp2n_lie_gen.cc @@ -10,14 +10,14 @@ int main(int argc, char** argv) { //latt, GridDefaultSimd(Nd, vComplex::Nsimd()), GridDefaultMpi()); //GridRedBlackCartesian* rbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(grid); - std::cout << GridLogMessage << "*********************************************" + std::cout << GridLogMessage << "*********************************************" << std::endl; - std::cout << GridLogMessage << "* Generators for Sp(2)" << std::endl; - std::cout << GridLogMessage << "*********************************************" + std::cout << GridLogMessage << "* Generators for Sp(2)" << std::endl; + std::cout << GridLogMessage << "*********************************************" << std::endl; - Sp2::printGenerators(); - Sp2::testGenerators(); + Sp2::printGenerators(); + Sp2::testGenerators(); std::cout << GridLogMessage << "*********************************************" << std::endl; @@ -46,6 +46,5 @@ int main(int argc, char** argv) { Sp8::printGenerators(); Sp8::testGenerators(); - Grid_finalize(); }