#include using namespace Grid; int main (int argc, char **argv) { Grid_init(&argc,&argv); Coordinate latt_size = GridDefaultLatt(); Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd()); Coordinate mpi_layout = GridDefaultMpi(); GridCartesian Grid(latt_size,simd_layout,mpi_layout); GridRedBlackCartesian RBGrid(&Grid); LatticeGaugeField Umu(&Grid); LatticeColourMatrixD U(&Grid); LatticeColourMatrixD aux(&Grid); LatticeColourMatrixD identity(&Grid); identity = 1.0; RealD epsilon = 0.01; Complex i(0., 1.); RealD u = 0.; double vol = Umu.Grid()->gSites(); std::vector pseeds({1,2,3,4,5}); std::vector sseeds({6,7,8,9,10}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(pseeds); GridSerialRNG sRNG; sRNG.SeedFixedIntegers(sseeds); SU::HotConfiguration(pRNG,Umu); U = PeekIndex(Umu,2); // it is unitary aux = U*adj(U) - identity; std::cout <(U,c1,c2); auto Wstar = PeekIndex(U,c1+nsp,c2+nsp); auto Ww = conjugate( Wstar ); auto amizero = sum(W - Ww); auto amizeroo = TensorRemove(amizero); std::cout << GridLogMessage << "diff(real,im) = " << amizeroo << std::endl; assert( amizeroo.real() < 10e-6 ); amizeroo *= i; assert( amizeroo.real() < 10e-6 ); std::cout << GridLogMessage << "ok " << std::endl; } } std::cout <(U,c1,c2+nsp); auto minusXstar = PeekIndex(U,c1+nsp,c2); auto minusXx = conjugate(minusXstar); auto amizero = sum (X + minusXx); auto amizeroo = TensorRemove(amizero); std::cout << GridLogMessage << "diff(real,im) = " << amizeroo << std::endl; assert( amizeroo.real() < 10e-6 ); amizeroo *= i; assert( amizeroo.real() < 10e-6 ); std::cout << GridLogMessage << "ok " << std::endl; } } // an explicit check for sp2 if (Nc == 2) { assert(Nc==2); ColourMatrix A; A = Zero(); Complex a(25041994., 12.); Complex b(39., 0.22); Complex d(10000., -2222.3333); A()()(0,0) = a; A()()(0,1) = b; A()()(1,0) = i; A()()(1,1) = d; std::cout <