CHROMA
t_mesplq.cc
Go to the documentation of this file.
1 
2 #include "chroma.h"
3 #include <iostream>
4 #include <cstdio>
5 
6 
7 using namespace Chroma;
8 
9 int main(int argc, char *argv[])
10 {
11  // Put the machine into a known state
12  Chroma::initialize(&argc, &argv);
13 
14  // Setup the layout
15  const int foo[] = {4,4,4,8};
16  multi1d<int> nrow(Nd);
17  nrow = foo; // Use only Nd elements
18  Layout::setLattSize(nrow);
19  Layout::create();
20 
21  XMLFileWriter xml("t_mesplq.xml");
22  push(xml, "t_mesplq");
23 
24  push(xml,"lattis");
25  write(xml,"Nd", Nd);
26  write(xml,"Nc", Nc);
27  write(xml,"nrow", nrow);
28  pop(xml);
29 
30  //! Example of calling a plaquette routine
31  /*! NOTE: the STL is *not* used to hold gauge fields */
32  multi1d<LatticeColorMatrix> u(Nd);
34 
35 #if 1
36  QDPIO::cout << "Start gaussian\n";
37  for(int m=0; m < u.size(); ++m)
38  gaussian(u[m]);
39 
40  // Reunitarize the gauge field
41  for(int m=0; m < u.size(); ++m)
42  reunit(u[m]);
43 #else
44  {
45  XMLReader gauge_xml;
46  readSzin(gauge_xml, u, std::string("CFGIN"));
47  xml << gauge_xml;
48  }
49 
51 #endif
52 
53  // Try out the plaquette routine
55  QDPIO::cout << "w_plaq = " << w_plaq << std::endl;
56  QDPIO::cout << "link = " << link << std::endl;
57 
58  // Test polyakov routine
59  multi1d<DComplex> pollp(Nd);
60  for(int mu = 0; mu < Nd; ++mu)
61  polylp(u, pollp[mu], mu);
62 
63  // Write out the results
64  push(xml,"Observables");
65  write(xml,"w_plaq", w_plaq);
66  write(xml,"link", link);
67  write(xml,"pollp", pollp);
68  pop(xml);
69 
70 
71  // Test gauge invariance
72  rgauge(u);
73 
75  for(int mu = 0; mu < Nd; ++mu)
76  polylp(u, pollp[mu], mu);
77 
78  QDPIO::cout << "w_plaq = " << w_plaq << std::endl;
79  QDPIO::cout << "link = " << link << std::endl;
80 
81  push(xml,"Observables_after_gt");
82  write(xml,"w_plaq", w_plaq);
83  write(xml,"link", link);
84  write(xml,"pollp", pollp);
85  pop(xml);
86 
87  pop(xml);
88  xml.close();
89 
90  // Time to bolt
92 
93  exit(0);
94 }
Primary include file for CHROMA in application codes.
int mu
Definition: cool.cc:24
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
Definition: unit_check.cc:20
void rgauge(multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &g)
Do a random gauge transformation on the u fields.
Definition: rgauge.cc:24
void polylp(const multi1d< LatticeColorMatrixF3 > &u, DComplex &poly_loop, int mu)
Compute Polyakov loop.
Definition: polylp.cc:40
void readSzin(SzinGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Read a SZIN configuration file.
Definition: readszin.cc:31
static int m[4]
Definition: make_seeds.cc:16
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
void reunit(LatticeColorMatrixF3 &xa)
Definition: reunit.cc:467
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979
Double link
Definition: pade_trln_w.cc:146
Double t_plaq
Definition: pade_trln_w.cc:145
Double w_plaq
Definition: pade_trln_w.cc:143
Double s_plaq
Definition: pade_trln_w.cc:144
int main(int argc, char *argv[])
Definition: t_mesplq.cc:9