1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Removed iSUnMatrix, etc.

This commit is contained in:
Julian Lenz 2022-11-30 15:09:03 +00:00
parent fa71b46a41
commit a13820656a
5 changed files with 21 additions and 29 deletions

View File

@ -150,7 +150,7 @@ public:
P = Ta(P);
//const int nsp = Nc / 2;
Sp<Nc>::iSp2nMatrix<Complex> gen;
Sp<Nc>::iGroupMatrix<Complex> gen;
auto Psum = P;

View File

@ -99,14 +99,6 @@ class GaugeGroup {
template <typename vtype>
using iAlgebraVector = iScalar<iScalar<iVector<vtype, AdjointDimension> > >;
static int su2subgroups(void) { return su2subgroups(group_name()); }
template <typename vtype>
using iSUnMatrix = iGroupMatrix<vtype>;
template <typename vtype>
using iSUnAlgebraVector = iAlgebraVector<vtype>;
template <typename vtype>
using iSp2nMatrix = iGroupMatrix<vtype>;
template <typename vtype>
using iSp2nAlgebraVector = iAlgebraVector<vtype>;
//////////////////////////////////////////////////////////////////////////////////////////////////
// Types can be accessed as SU<2>::Matrix , SU<2>::vSUnMatrix,
@ -156,7 +148,7 @@ class GaugeGroup {
public:
template <class cplx>
static void generator(int lieIndex, iSp2nMatrix<cplx> &ta) {
static void generator(int lieIndex, iGroupMatrix<cplx> &ta) {
return generator(lieIndex, ta, group_name());
}

View File

@ -57,7 +57,7 @@ static int su2subgroups(GroupName::SU) { return (ncolour * (ncolour - 1)) / 2; }
//
////////////////////////////////////////////////////////////////////////
template <class cplx>
static void generator(int lieIndex, iSUnMatrix<cplx> &ta, GroupName::SU) {
static void generator(int lieIndex, iGroupMatrix<cplx> &ta, GroupName::SU) {
// map lie index to which type of generator
int diagIndex;
int su2Index;
@ -77,7 +77,7 @@ static void generator(int lieIndex, iSUnMatrix<cplx> &ta, GroupName::SU) {
}
template <class cplx, ONLY_IF_SU>
static void generatorSigmaY(int su2Index, iSUnMatrix<cplx> &ta) {
static void generatorSigmaY(int su2Index, iGroupMatrix<cplx> &ta) {
ta = Zero();
int i1, i2;
su2SubGroupIndex(i1, i2, su2Index);
@ -87,7 +87,7 @@ static void generatorSigmaY(int su2Index, iSUnMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_SU>
static void generatorSigmaX(int su2Index, iSUnMatrix<cplx> &ta) {
static void generatorSigmaX(int su2Index, iGroupMatrix<cplx> &ta) {
ta = Zero();
cplx i(0.0, 1.0);
int i1, i2;
@ -98,7 +98,7 @@ static void generatorSigmaX(int su2Index, iSUnMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_SU>
static void generatorDiagonal(int diagIndex, iSUnMatrix<cplx> &ta) {
static void generatorDiagonal(int diagIndex, iGroupMatrix<cplx> &ta) {
// diag ({1, 1, ..., 1}(k-times), -k, 0, 0, ...)
ta = Zero();
int k = diagIndex + 1; // diagIndex starts from 0
@ -130,7 +130,7 @@ public:
template <class vcplx, ONLY_IF_SU>
static void su2Extract(Lattice<iSinglet<vcplx> > &Determinant,
Lattice<iSU2Matrix<vcplx> > &subgroup,
const Lattice<iSUnMatrix<vcplx> > &source,
const Lattice<iGroupMatrix<vcplx> > &source,
int su2_index) {
GridBase *grid(source.Grid());
conformable(subgroup, source);
@ -164,7 +164,7 @@ static void su2Extract(Lattice<iSinglet<vcplx> > &Determinant,
//////////////////////////////////////////////////////////////////////////////////////////
template <class vcplx, ONLY_IF_SU>
static void su2Insert(const Lattice<iSU2Matrix<vcplx> > &subgroup,
Lattice<iSUnMatrix<vcplx> > &dest, int su2_index) {
Lattice<iGroupMatrix<vcplx> > &dest, int su2_index) {
GridBase *grid(dest.Grid());
conformable(subgroup, dest);
int i0, i1;

View File

@ -175,10 +175,10 @@ public:
template <class cplx>
static void generator(int Index, iSp2nTwoIndexMatrix<cplx> &i2indTa) {
Vector<typename Sp<ncolour>::template iSp2nMatrix<cplx> > ta(
Vector<iSp2nMatrix<cplx> > ta(
NumGenerators);
Vector<typename Sp<ncolour>::template iSp2nMatrix<cplx> > eij(Dimension);
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp;
Vector<iSp2nMatrix<cplx> > eij(Dimension);
iSp2nMatrix<cplx> tmp;
i2indTa = Zero();
for (int a = 0; a < NumGenerators; a++)
@ -189,7 +189,7 @@ public:
for (int a = 0; a < Dimension; a++) {
tmp = transpose(ta[Index]) * adj(eij[a]) + adj(eij[a]) * ta[Index];
for (int b = 0; b < Dimension; b++) {
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp1 =
iSp2nMatrix<cplx> tmp1 =
tmp * eij[b];
Complex iTr = TensorRemove(timesI(trace(tmp1)));
i2indTa()()(a, b) = iTr;

View File

@ -13,7 +13,7 @@ static int su2subgroups(GroupName::Sp) { return (ncolour/2 * (ncolour/2 - 1)) /
// abcd are N(N-1)/2 each while wz are N each
template <class cplx, ONLY_IF_Sp>
static void generator(int lieIndex, iSp2nMatrix<cplx> &ta, GroupName::Sp) {
static void generator(int lieIndex, iGroupMatrix<cplx> &ta, GroupName::Sp) {
// map lie index into type of generators: diagonal, abcd type, wz type
const int nsp = ncolour/2;
@ -76,7 +76,7 @@ static void generator(int lieIndex, iSp2nMatrix<cplx> &ta, GroupName::Sp) {
} // end of generator
template <class cplx, ONLY_IF_Sp>
static void generatorDiagtype(int diagIndex, iSp2nMatrix<cplx> &ta) {
static void generatorDiagtype(int diagIndex, iGroupMatrix<cplx> &ta) {
// ta(i,i) = - ta(i+N,i+N) = 1/2 for each i index of the cartan subalgebra
const int nsp=ncolour/2;
@ -88,7 +88,7 @@ static void generatorDiagtype(int diagIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorAtype(int aIndex, iSp2nMatrix<cplx> &ta) {
static void generatorAtype(int aIndex, iGroupMatrix<cplx> &ta) {
// ta(i,j) = ta(j,i) = -ta(i+N,j+N) = -ta(j+N,i+N) = 1 / 2 sqrt(2)
// with i<j and i=0,...,N-2
// follows that j=i+1, ... , N
@ -107,7 +107,7 @@ static void generatorAtype(int aIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorBtype(int bIndex, iSp2nMatrix<cplx> &ta) {
static void generatorBtype(int bIndex, iGroupMatrix<cplx> &ta) {
// ta(i,j) = -ta(j,i) = ta(i+N,j+N) = -ta(j+N,i+N) = i / 1/ 2 sqrt(2)
// with i<j and i=0,...,N-2
// follows that j=i+1, ... , N-1
@ -128,7 +128,7 @@ static void generatorBtype(int bIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorCtype(int cIndex, iSp2nMatrix<cplx> &ta) {
static void generatorCtype(int cIndex, iGroupMatrix<cplx> &ta) {
// ta(i,j+N) = ta(j,i+N) = ta(i+N,j) = ta(j+N,i) = 1 / 2 sqrt(2)
const int nsp=ncolour/2;
@ -146,7 +146,7 @@ static void generatorCtype(int cIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorDtype(int dIndex, iSp2nMatrix<cplx> &ta) {
static void generatorDtype(int dIndex, iGroupMatrix<cplx> &ta) {
// ta(i,j+N) = ta(j,i+N) = -ta(i+N,j) = -ta(j+N,i) = i / 2 sqrt(2)
const int nsp=ncolour/2;
@ -165,7 +165,7 @@ static void generatorDtype(int dIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorWtype(int wIndex, iSp2nMatrix<cplx> &ta) {
static void generatorWtype(int wIndex, iGroupMatrix<cplx> &ta) {
// ta(i,i+N) = ta(i+N,i) = 1/2
const int nsp=ncolour/2;
@ -179,7 +179,7 @@ static void generatorWtype(int wIndex, iSp2nMatrix<cplx> &ta) {
}
template <class cplx, ONLY_IF_Sp>
static void generatorZtype(int zIndex, iSp2nMatrix<cplx> &ta) {
static void generatorZtype(int zIndex, iGroupMatrix<cplx> &ta) {
// ta(i,i+N) = - ta(i+N,i) = i/2
const int nsp=ncolour/2;
@ -277,7 +277,7 @@ static void OmegaInvariance(ColourMatrix &in) {
template <typename GaugeField, ONLY_IF_Sp>
static void OmegaInvariance(GaugeField &in) {
typedef typename GaugeField::vector_type vector_type;
typedef iSp2nMatrix<vector_type> vMatrixType;
typedef iGroupMatrix<vector_type> vMatrixType;
typedef Lattice<vMatrixType> LatticeMatrixType;
LatticeMatrixType U(in.Grid());