/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid Source file: ./tests/debug/Test_icosahedron.cc Copyright (C) 2015 Author: Peter Boyle This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory *************************************************************************************/ /* END LEGAL */ #include #include using namespace std; using namespace Grid; const int MyNd=3; template using iIcosahedralLorentzComplex = iVector >, MyNd+1 > ; typedef iIcosahedralLorentzComplex IcosahedralLorentzComplexD; typedef iIcosahedralLorentzComplex vIcosahedralLorentzComplexD; typedef Lattice LatticeIcosahedralLorentzComplexD; int main (int argc, char ** argv) { Grid_init(&argc,&argv); const int L=8; const int Npatch = IcosahedralPatches; // Put SIMD all in time direction Coordinate latt_size = GridDefaultLatt(); Coordinate simd_layout({1,1,vComplexD::Nsimd(),1}); Coordinate mpi_layout = GridDefaultMpi(); std::cout << GridLogMessage << " mpi "<_adjoint; auto pol = SE1->_polarisation; auto s1 = SE1->_offset; auto L1 = Umu_v(s1)(pol); if(doAdj) L1 = adj(L1); coalescedWrite(plaq1_v[ss](),trace(Lx*L1*adj(Ld) ) ); } // for trace [ U_y(z) adj(U_d(z)) U_x(z+\hat y) ] { auto SE2 = stencil_v.GetEntry(1,ss); auto doAdj = SE2->_adjoint; auto pol = SE2->_polarisation; auto s2 = SE2->_offset; auto L2 = Umu_v(s2)(pol); if(doAdj) L2 = adj(L2); coalescedWrite(plaq2_v[ss](),trace(Ly*adj(Ld)*L2 ) ); } }); } std::cout << " plaq1 "<< norm2(plaq1)<