mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-21 01:02:02 +01:00
expand ProjecOnGaugeGroup, change ProjectOnSp2nAlgebra into SpTa, fixing some of its issues
This commit is contained in:
@ -300,9 +300,10 @@ class GaugeGroup {
|
||||
ColdConfiguration(out);
|
||||
}
|
||||
|
||||
template <typename LatticeMatrixType, ONLY_IF_SU>
|
||||
template <typename LatticeMatrixType>
|
||||
static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out) {
|
||||
out = Ta(in);
|
||||
taProj(in, out, group_name());
|
||||
//out = Ta(in);
|
||||
}
|
||||
|
||||
template <typename LatticeMatrixType>
|
||||
@ -333,6 +334,32 @@ class GaugeGroup {
|
||||
ProjectOnGaugeGroup(Umu, group_name());
|
||||
}
|
||||
|
||||
template <class vtype>
|
||||
static void ProjectOnGaugeGroup(iScalar<vtype> &r) {
|
||||
ProjectOnGaugeGroup(r, group_name());
|
||||
}
|
||||
|
||||
template <class vtype, int N>
|
||||
static void ProjectOnGaugeGroup(iVector<vtype,N> &r) {
|
||||
r = ProjectOnGaugeGroup(r, group_name());
|
||||
}
|
||||
|
||||
template <class vtype,int N, typename std::enable_if< GridTypeMapper<vtype>::TensorLevel == 0 >::type * =nullptr>
|
||||
static void ProjectOnGaugeGroup(iMatrix<vtype,N> &arg) {
|
||||
arg = ProjectOnGaugeGroup(arg, group_name());
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
template <int N> // reunitarise, resimplectify...
|
||||
static void ProjectOnGaugeGroup(iVector<iScalar<iMatrix<vComplexD, N> >, Nd> &U) {
|
||||
ProjectOnGaugeGroup(U, group_name());
|
||||
}
|
||||
|
||||
template <int N> // reunitarise, resimplectify...
|
||||
static void ProjectOnGaugeGroup(iScalar<iScalar<iMatrix<vComplexD, N> > > &Umu) {
|
||||
ProjectOnGaugeGroup(Umu, group_name());
|
||||
}*/
|
||||
|
||||
template <int N> // reunitarise, resimplectify... previously ProjectSUn
|
||||
static void ProjectGn(Lattice<iScalar<iScalar<iMatrix<vComplexD, N> > > > &Umu) {
|
||||
@ -349,7 +376,7 @@ class GaugeGroup {
|
||||
}
|
||||
|
||||
template <int N> // reunitarise, resimplectify... previously ProjectSUn
|
||||
static void ProjectGn(Lattice<iVector<iScalar<iMatrix<vComplexD, N> >, Nd> > &U, GroupName::SU) {
|
||||
static void ProjectGn(Lattice<iVector<iScalar<iMatrix<vComplexD, N> >, Nd> > &U) {
|
||||
// Reunitarise
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
auto Umu = PeekIndex<LorentzIndex>(U, mu);
|
||||
|
@ -508,6 +508,7 @@ static void testGenerators(GroupName::SU) {
|
||||
std::cout << GridLogMessage << std::endl;
|
||||
}
|
||||
|
||||
|
||||
template <int N>
|
||||
static void ProjectOnGaugeGroup(Lattice<iScalar<iScalar<iMatrix<vComplexD, N> > > > &Umu, GroupName::SU) {
|
||||
Umu = ProjectOnGroup(Umu);
|
||||
@ -522,6 +523,44 @@ static void ProjectOnGaugeGroup(Lattice<iVector<iScalar<iMatrix<vComplexD, N> >,
|
||||
}
|
||||
}
|
||||
|
||||
template <class vtype>
|
||||
static void ProjectOnGaugeGroup(iScalar<vtype> &r, GroupName::SU) {
|
||||
r = ProjectOnGroup(r);
|
||||
}
|
||||
|
||||
template <class vtype, int N>
|
||||
static void ProjectOnGaugeGroup(iVector<vtype,N> &r, GroupName::SU) {
|
||||
r = ProjectOnGroup(r);
|
||||
}
|
||||
|
||||
template <class vtype,int N, typename std::enable_if< GridTypeMapper<vtype>::TensorLevel == 0 >::type * =nullptr>
|
||||
static void ProjectOnGaugeGroup(iMatrix<vtype,N> &arg, GroupName::SU) {
|
||||
arg = ProjectOnGroup(arg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
template <int N> // non-lattice objects
|
||||
static void ProjectOnGaugeGroup(iScalar<iScalar<iMatrix<vComplexD, N> > > &Umu, GroupName::SU) {
|
||||
Umu = ProjectOnGroup(Umu);
|
||||
}
|
||||
|
||||
template <int N>
|
||||
static void ProjectOnGaugeGroup(iVector<iScalar<iMatrix<vComplexD, N> >, Nd> &U, GroupName::SU) {
|
||||
// Reunitarise
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
auto Umu = PeekIndex<LorentzIndex>(U, mu);
|
||||
Umu = ProjectOnGroup(Umu);
|
||||
}
|
||||
}*/
|
||||
|
||||
template <typename LatticeMatrixType>
|
||||
static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::SU) {
|
||||
out = Ta(in);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fundamental rep gauge xform
|
||||
*/
|
||||
|
@ -267,6 +267,41 @@ static void ProjectOnGaugeGroup(Lattice<iVector<iScalar<iMatrix<vComplexD, N> >,
|
||||
}
|
||||
}
|
||||
|
||||
template <class vtype>
|
||||
static void ProjectOnGaugeGroup(iScalar<vtype> &r, GroupName::Sp) {
|
||||
r = ProjectOnSpGroup(r);
|
||||
}
|
||||
|
||||
template <class vtype, int N>
|
||||
static void ProjectOnGaugeGroup(iVector<vtype,N> &r, GroupName::Sp) {
|
||||
r = ProjectOnSpGroup(r);
|
||||
}
|
||||
|
||||
template <class vtype,int N, typename std::enable_if< GridTypeMapper<vtype>::TensorLevel == 0 >::type * =nullptr>
|
||||
static void ProjectOnGaugeGroup(iMatrix<vtype,N> &arg, GroupName::Sp) {
|
||||
arg = ProjectOnSpGroup(arg);
|
||||
}
|
||||
|
||||
/*
|
||||
template <int N> // non-lattice objects
|
||||
static void ProjectOnGaugeGroup(iScalar<iScalar<iMatrix<vComplexD, N> > > &Umu, GroupName::Sp) {
|
||||
Umu = ProjectOnSpGroup(Umu);
|
||||
}
|
||||
|
||||
template <int N>
|
||||
static void ProjectOnGaugeGroup(iVector<iScalar<iMatrix<vComplexD, N> >, Nd> &U, GroupName::Sp) {
|
||||
// Reunitarise
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
auto Umu = PeekIndex<LorentzIndex>(U, mu);
|
||||
Umu = ProjectOnSpGroup(Umu);
|
||||
}
|
||||
}*/
|
||||
|
||||
template <typename LatticeMatrixType>
|
||||
static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupName::Sp) {
|
||||
out = SpTa(in);
|
||||
}
|
||||
|
||||
public:
|
||||
template <ONLY_IF_Sp>
|
||||
static void OmegaInvariance(ColourMatrix &in) {
|
||||
|
Reference in New Issue
Block a user