Grid 0.7.0
LatticeTheories.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/qcd/QCD.h
6
7Copyright (C) 2015
8
9Author: Azusa Yamaguchi <ayamaguc@staffmail.ed.ac.uk>
10Author: Peter Boyle <paboyle@ph.ed.ac.uk>
11Author: Peter Boyle <peterboyle@Peters-MacBook-Pro-2.local>
12Author: neo <cossu@post.kek.jp>
13Author: paboyle <paboyle@ph.ed.ac.uk>
14
15This program is free software; you can redistribute it and/or modify
16it under the terms of the GNU General Public License as published by
17the Free Software Foundation; either version 2 of the License, or
18(at your option) any later version.
19
20This program is distributed in the hope that it will be useful,
21but WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23GNU General Public License for more details.
24
25You should have received a copy of the GNU General Public License along
26with this program; if not, write to the Free Software Foundation, Inc.,
2751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28
29See the full license in the file "LICENSE" in the top level distribution
30directory
31*************************************************************************************/
32/* END LEGAL */
33#ifndef GRID_LT_H
34#define GRID_LT_H
35namespace Grid{
36
37// First steps in the complete generalization of the Physics part
38// Design not final
39namespace LatticeTheories {
40
41template <int Dimensions>
43 static const int Nd = Dimensions;
44 static const int Nds = Dimensions * 2; // double stored field
45 template <typename vtype>
47};
48
49template <int Dimensions, int Colours>
50struct LatticeGaugeTheory : public LatticeTheory<Dimensions> {
51 static const int Nds = Dimensions * 2;
52 static const int Nd = Dimensions;
53 static const int Nc = Colours;
54
55 template <typename vtype>
57 template <typename vtype>
59 template <typename vtype>
61 template <typename vtype>
63};
64
65template <int Dimensions, int Colours, int Spin>
67 : public LatticeGaugeTheory<Dimensions, Colours> {
68 static const int Nd = Dimensions;
69 static const int Nds = Dimensions * 2;
70 static const int Nc = Colours;
71 static const int Ns = Spin;
72
73 template <typename vtype>
75 template <typename vtype>
77 template <typename vtype>
79 template <typename vtype>
81 // These 2 only if Spin is a multiple of 2
82 static const int Nhs = Spin / 2;
83 template <typename vtype>
85 template <typename vtype>
87
88 //tests
92
93
94};
95
96// Examples, not complete now.
97struct QCD : public FermionicLatticeGaugeTheory<4, 3, 4> {
98 static const int Xp = 0;
99 static const int Yp = 1;
100 static const int Zp = 2;
101 static const int Tp = 3;
102 static const int Xm = 4;
103 static const int Ym = 5;
104 static const int Zm = 6;
105 static const int Tm = 7;
106
108
112
113};
114struct QED : public FermionicLatticeGaugeTheory<4, 1, 4> {//fill
115};
116
117template <int Dimensions>
118struct Scalar : public LatticeTheory<Dimensions> {};
119
120}; // LatticeTheories
121
122} // Grid
123
124#endif
Definition Log.h:46
iScalar< iVector< iScalar< vtype >, Ns > > iSpinVector
iScalar< iMatrix< iMatrix< vtype, Nc >, Ns > > iSpinColourMatrix
iScalar< iVector< iVector< vtype, Nc >, Nhs > > iHalfSpinColourVector
iScalar< iMatrix< iScalar< vtype >, Ns > > iSpinMatrix
iScalar< iVector< iVector< vtype, Nc >, Ns > > iSpinColourVector
iScalar< iVector< iScalar< vtype >, Nhs > > iHalfSpinVector
iScalar< iScalar< iMatrix< vtype, Nc > > > iColourMatrix
iVector< iScalar< iMatrix< vtype, Nc > >, Nds > iDoubleStoredColourMatrix
iVector< iScalar< iMatrix< vtype, Nc > >, Nd > iLorentzColourMatrix
iScalar< iScalar< iVector< vtype, Nc > > > iColourVector
iScalar< iScalar< iScalar< vtype > > > iSinglet
FLGT::iSpinMatrix< ComplexD > SpinMatrixD
FLGT::iSpinMatrix< ComplexF > SpinMatrixF
FLGT::iSpinMatrix< Complex > SpinMatrix
FermionicLatticeGaugeTheory FLGT