#ifndef GRID_QCD_H #define GRID_QCD_H namespace Grid{ namespace QCD { static const int Nc=3; static const int Ns=4; static const int Nd=4; static const int Nhs=2; // half spinor static const int CbRed =0; static const int CbBlack=1; ////////////////////////////////////////////////////////////////////////////// // QCD iMatrix types // Index conventions: Lorentz x Spin x Colour ////////////////////////////////////////////////////////////////////////////// static const int ColourIndex = 1; static const int SpinIndex = 2; static const int LorentzIndex= 3; // ChrisK very keen to add extra space for Gparity doubling. // // Also add domain wall index, in a way where Wilson operator // naturally distributes across the 5th dimensions. // // That probably makes for GridRedBlack4dCartesian grid. template using iSinglet = iScalar > >; template using iSpinMatrix = iScalar, Ns> >; template using iSpinColourMatrix = iScalar, Ns> >; template using iColourMatrix = iScalar > > ; template using iLorentzColourMatrix = iVector >, Nd > ; template using iSpinVector = iScalar, Ns> >; template using iColourVector = iScalar > >; template using iSpinColourVector = iScalar, Ns> >; template using iHalfSpinVector = iScalar, Nhs> >; template using iHalfSpinColourVector = iScalar, Nhs> >; typedef iSpinMatrix SpinMatrix; typedef iColourMatrix ColourMatrix; typedef iSpinColourMatrix SpinColourMatrix; typedef iLorentzColourMatrix LorentzColourMatrix; typedef iLorentzColourMatrix LorentzColourMatrixF; typedef iLorentzColourMatrix LorentzColourMatrixD; typedef iSpinVector SpinVector; typedef iColourVector ColourVector; typedef iSpinColourVector SpinColourVector; typedef iHalfSpinVector HalfSpinVector; typedef iHalfSpinColourVector HalfSpinColourVector; typedef iSpinMatrix vSpinMatrix; typedef iColourMatrix vColourMatrix; typedef iSpinColourMatrix vSpinColourMatrix; typedef iLorentzColourMatrix vLorentzColourMatrix; typedef iSpinVector vSpinVector; typedef iColourVector vColourVector; typedef iSpinColourVector vSpinColourVector; typedef iHalfSpinVector vHalfSpinVector; typedef iHalfSpinColourVector vHalfSpinColourVector; typedef iSinglet TComplex; // FIXME This is painful. Tensor singlet complex type. typedef iSinglet vTComplex; // what if we don't know the tensor structure typedef iSinglet TReal; // Shouldn't need these; can I make it work without? typedef iSinglet vTReal; typedef iSinglet vTInteger; typedef iSinglet TInteger; typedef Lattice LatticeReal; typedef Lattice LatticeComplex; typedef Lattice LatticeInteger; // Predicates for "where" typedef Lattice LatticeColourMatrix; typedef Lattice LatticeSpinMatrix; typedef Lattice LatticeSpinColourMatrix; typedef Lattice LatticeSpinVector; typedef Lattice LatticeColourVector; typedef Lattice LatticeSpinColourVector; typedef Lattice LatticeHalfSpinVector; typedef Lattice LatticeHalfSpinColourVector; /////////////////////////////////////////// // Physical names for things /////////////////////////////////////////// typedef Lattice LatticeHalfFermion; typedef Lattice LatticeFermion; typedef Lattice LatticePropagator; typedef Lattice LatticeGaugeField; // Uhgg... typing this hurt ;) // (my keyboard got burning hot when I typed this, must be the anti-Fermion) typedef Lattice LatticeStaggeredFermion; typedef Lattice LatticeStaggeredPropagator; ////////////////////////////////////////////////////////////////////////////// // Peek and Poke named after physics attributes ////////////////////////////////////////////////////////////////////////////// //spin template auto peekSpin(const vobj &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekSpin(const vobj &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } template auto peekSpin(const Lattice &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekSpin(const Lattice &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } //colour template auto peekColour(const vobj &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekColour(const vobj &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } template auto peekColour(const Lattice &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekColour(const Lattice &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } //lorentz template auto peekLorentz(const vobj &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekLorentz(const vobj &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } template auto peekLorentz(const Lattice &rhs,int i) -> decltype(peekIndex(rhs,0)) { return peekIndex(rhs,i); } template auto peekLorentz(const Lattice &rhs,int i,int j) -> decltype(peekIndex(rhs,0,0)) { return peekIndex(rhs,i,j); } } //namespace QCD } // Grid #include #include //#include #endif