1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00
This commit is contained in:
Julian Lenz 2022-11-30 14:27:19 +00:00
parent b8b3ae6ac1
commit fa71b46a41
4 changed files with 18 additions and 10 deletions

View File

@ -91,8 +91,6 @@ class GaugeGroup {
compute_adjoint_dimension<group_name>(ncolour); compute_adjoint_dimension<group_name>(ncolour);
static const int AlgebraDimension = static const int AlgebraDimension =
compute_adjoint_dimension<group_name>(ncolour); compute_adjoint_dimension<group_name>(ncolour);
// Don't know how to only enable this for Sp:
static const int nsp = ncolour / 2;
template <typename vtype> template <typename vtype>
using iSU2Matrix = iScalar<iScalar<iMatrix<vtype, 2> > >; using iSU2Matrix = iScalar<iScalar<iMatrix<vtype, 2> > >;

View File

@ -1,6 +1,6 @@
private: private:
static int su2subgroups(GroupName::Sp) { return (nsp * (nsp - 1)) / 2; } static int su2subgroups(GroupName::Sp) { return (ncolour/2 * (ncolour/2 - 1)) / 2; }
// Sp(2N) has N(2N+1) = 2N^2+N generators // Sp(2N) has N(2N+1) = 2N^2+N generators
// //
@ -16,14 +16,15 @@ template <class cplx, ONLY_IF_Sp>
static void generator(int lieIndex, iSp2nMatrix<cplx> &ta, GroupName::Sp) { static void generator(int lieIndex, iSp2nMatrix<cplx> &ta, GroupName::Sp) {
// map lie index into type of generators: diagonal, abcd type, wz type // map lie index into type of generators: diagonal, abcd type, wz type
const int nsp = ncolour/2;
int diagIndex; int diagIndex;
int aIndex, bIndex, cIndex, dIndex; int aIndex, bIndex, cIndex, dIndex;
int wIndex, zIndex; // a,b,c,d are N(N-1)/2 and w,z are N int wIndex, zIndex; // a,b,c,d are N(N-1)/2 and w,z are N
int mod = nsp * (nsp - 1) * 0.5; const int mod = nsp * (nsp - 1) * 0.5;
int offdiag = const int offdiag =
2 * nsp * nsp; // number of generators not in the cartan subalgebra 2 * nsp * nsp; // number of generators not in the cartan subalgebra
int wmod = 4 * mod; const int wmod = 4 * mod;
int zmod = wmod + nsp; const int zmod = wmod + nsp;
if (lieIndex >= offdiag) { if (lieIndex >= offdiag) {
diagIndex = lieIndex - offdiag; // 0, ... ,N-1 diagIndex = lieIndex - offdiag; // 0, ... ,N-1
// std::cout << GridLogMessage << "diag type " << std::endl; // std::cout << GridLogMessage << "diag type " << std::endl;
@ -78,6 +79,7 @@ template <class cplx, ONLY_IF_Sp>
static void generatorDiagtype(int diagIndex, iSp2nMatrix<cplx> &ta) { static void generatorDiagtype(int diagIndex, iSp2nMatrix<cplx> &ta) {
// ta(i,i) = - ta(i+N,i+N) = 1/2 for each i index of the cartan subalgebra // ta(i,i) = - ta(i+N,i+N) = 1/2 for each i index of the cartan subalgebra
const int nsp=ncolour/2;
ta = Zero(); ta = Zero();
RealD nrm = 1.0 / 2; RealD nrm = 1.0 / 2;
@ -91,6 +93,7 @@ static void generatorAtype(int aIndex, iSp2nMatrix<cplx> &ta) {
// with i<j and i=0,...,N-2 // with i<j and i=0,...,N-2
// follows that j=i+1, ... , N // follows that j=i+1, ... , N
int i1, i2; int i1, i2;
const int nsp=ncolour/2;
ta = Zero(); ta = Zero();
RealD nrm = 1 / (2 * std::sqrt(2)); RealD nrm = 1 / (2 * std::sqrt(2));
@ -109,6 +112,7 @@ static void generatorBtype(int bIndex, iSp2nMatrix<cplx> &ta) {
// with i<j and i=0,...,N-2 // with i<j and i=0,...,N-2
// follows that j=i+1, ... , N-1 // follows that j=i+1, ... , N-1
const int nsp=ncolour/2;
int i1, i2; int i1, i2;
ta = Zero(); ta = Zero();
cplx i(0.0, 1.0); cplx i(0.0, 1.0);
@ -127,6 +131,7 @@ template <class cplx, ONLY_IF_Sp>
static void generatorCtype(int cIndex, iSp2nMatrix<cplx> &ta) { static void generatorCtype(int cIndex, iSp2nMatrix<cplx> &ta) {
// ta(i,j+N) = ta(j,i+N) = ta(i+N,j) = ta(j+N,i) = 1 / 2 sqrt(2) // 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;
int i1, i2; int i1, i2;
ta = Zero(); ta = Zero();
RealD nrm = 1 / (2 * std::sqrt(2)); RealD nrm = 1 / (2 * std::sqrt(2));
@ -144,6 +149,7 @@ template <class cplx, ONLY_IF_Sp>
static void generatorDtype(int dIndex, iSp2nMatrix<cplx> &ta) { static void generatorDtype(int dIndex, iSp2nMatrix<cplx> &ta) {
// ta(i,j+N) = ta(j,i+N) = -ta(i+N,j) = -ta(j+N,i) = i / 2 sqrt(2) // 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;
int i1, i2; int i1, i2;
ta = Zero(); ta = Zero();
cplx i(0.0, 1.0); cplx i(0.0, 1.0);
@ -162,6 +168,7 @@ template <class cplx, ONLY_IF_Sp>
static void generatorWtype(int wIndex, iSp2nMatrix<cplx> &ta) { static void generatorWtype(int wIndex, iSp2nMatrix<cplx> &ta) {
// ta(i,i+N) = ta(i+N,i) = 1/2 // ta(i,i+N) = ta(i+N,i) = 1/2
const int nsp=ncolour/2;
ta = Zero(); ta = Zero();
RealD nrm = 1.0 / 2; // check RealD nrm = 1.0 / 2; // check
@ -175,6 +182,7 @@ template <class cplx, ONLY_IF_Sp>
static void generatorZtype(int zIndex, iSp2nMatrix<cplx> &ta) { static void generatorZtype(int zIndex, iSp2nMatrix<cplx> &ta) {
// ta(i,i+N) = - ta(i+N,i) = i/2 // ta(i,i+N) = - ta(i+N,i) = i/2
const int nsp=ncolour/2;
ta = Zero(); ta = Zero();
RealD nrm = 1.0 / 2; // check RealD nrm = 1.0 / 2; // check
cplx i(0.0, 1.0); cplx i(0.0, 1.0);
@ -189,6 +197,7 @@ static void generatorZtype(int zIndex, iSp2nMatrix<cplx> &ta) {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
template <ONLY_IF_Sp> template <ONLY_IF_Sp>
static void su2SubGroupIndex(int &i1, int &i2, int su2_index, GroupName::Sp) { static void su2SubGroupIndex(int &i1, int &i2, int su2_index, GroupName::Sp) {
const int nsp=ncolour/2;
assert((su2_index >= 0) && (su2_index < (nsp * (nsp - 1)) / 2)); assert((su2_index >= 0) && (su2_index < (nsp * (nsp - 1)) / 2));
int spare = su2_index; int spare = su2_index;
@ -239,6 +248,7 @@ template <ONLY_IF_Sp>
static void OmegaInvariance(ColourMatrix &in) { static void OmegaInvariance(ColourMatrix &in) {
ColourMatrix Omega; ColourMatrix Omega;
Omega = Zero(); Omega = Zero();
const int nsp=ncolour/2;
std::cout << GridLogMessage << "I am a ColourMatrix" << std::endl; std::cout << GridLogMessage << "I am a ColourMatrix" << std::endl;
@ -289,6 +299,7 @@ static void OmegaInvariance(GaugeField &in) {
template <ONLY_IF_Sp> template <ONLY_IF_Sp>
static void OmegaInvariance(LatticeColourMatrixD &in) { static void OmegaInvariance(LatticeColourMatrixD &in) {
const int nsp=ncolour/2;
LatticeColourMatrixD OmegaLatt(in.Grid()); LatticeColourMatrixD OmegaLatt(in.Grid());
LatticeColourMatrixD identity(in.Grid()); LatticeColourMatrixD identity(in.Grid());
RealD vol = in.Grid()->gSites(); RealD vol = in.Grid()->gSites();

View File

@ -21,7 +21,7 @@ int main (int argc, char **argv)
double vol = Umu.Grid()->gSites(); double vol = Umu.Grid()->gSites();
const int nsp = Sp<Nc>::nsp; const int nsp = Nc/2;
identity = 1.; identity = 1.;
Cidentity = 1.; Cidentity = 1.;

View File

@ -20,8 +20,7 @@ int main (int argc, char **argv)
LatticeColourMatrixD aux(&Grid); LatticeColourMatrixD aux(&Grid);
LatticeColourMatrixD identity(&Grid); LatticeColourMatrixD identity(&Grid);
//const int nsp = Nc / 2; const int nsp = Nc / 2;
const int nsp = Sp<Nc>::nsp;
identity = 1.0; identity = 1.0;
RealD epsilon = 0.01; RealD epsilon = 0.01;