00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00014 bool mdp_field_test(int argc, char** argv) { 00015 mpi.open_wormholes(argc, argv); 00016 00017 int box[]={4,4,4,4}; 00018 mdp_lattice lattice(4,box); 00019 mdp_matrix_field M(lattice,3,3); 00020 mdp_site x(lattice); 00021 double counter=0; 00022 00023 forallsites(x) 00024 M(x)=M.lattice().random(x).SU(3); 00025 00026 forallsites(x) 00027 counter+=real(trace(M(x)*inv(M(x))))/3; 00028 00029 mpi.add(counter); 00030 counter/=lattice.size(); 00031 00032 assert((counter-1)<mdp_precision); 00033 printf("lattice and field ...test passed.\n"); 00034 00035 mpi.close_wormholes(); 00036 return (mdp_int) counter; 00037 }