// $Id: t_mesplq.cc,v 1.1 2003/02/17 21:41:27 edwards Exp $ #include #include #include "qdp.h" #include "tutorial.h" using namespace QDP; int main(int argc, char *argv[]) { // Put the machine into a known state QDP_initialize(&argc, &argv); // Setup the layout const int foo[] = {4,4,4,4}; multi1d nrow(Nd); nrow = foo; // Use only Nd elements Layout::setLattSize(nrow); Layout::create(); NmlWriter nml("t_mesplq.nml"); push(nml,"lattis"); Write(nml,Nd); Write(nml,Nc); Write(nml,nrow); pop(nml); //! Example of calling a plaquette routine multi1d u(Nd); Double w_plaq, s_plaq, t_plaq, link; cerr << "Start gaussian\n"; for(int m=0; m < u.size(); ++m) gaussian(u[m]); // Try out the plaquette routine cerr << "Start mesplq\n"; MesPlq(u, w_plaq, s_plaq, t_plaq, link); cerr << "w_plaq = " << w_plaq << endl; cerr << "link = " << link << endl; // Write out the results push(nml,"observables"); Write(nml,w_plaq); Write(nml,link); pop(nml); // Time to bolt QDP_finalize(); return 0; }